This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
commit 3cd2d8d45f2fd8ea55f20ca3e7b2db9c6876228c
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Thu May 7 01:40:05 2020 +0100
savemeta: Use larger buffers for gzip compression
Increase the buffer size that zlib will use for (de)compression. This
results in a measurable speed-up of the save/restoremeta part of the
testsuite.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/edit/savemeta.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index 7dc506a..3bd3584 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -121,6 +121,7 @@ static int restore_try_gzip(struct metafd *mfd)
mfd->gzfd = gzdopen(mfd->fd, "rb");
if (!mfd->gzfd)
return 1;
+ gzbuffer(mfd->gzfd, (1<<20)); /* Increase zlib's buffers to 1MB */
restore_left = mfd->read(mfd, restore_buf, RESTORE_BUF_SIZE);
if (restore_left < 512)
return -1;
@@ -475,6 +476,7 @@ static struct metafd savemetaopen(char *out_fn, int gziplevel)
fprintf(stderr, "gzdopen error: %s\n", strerror(errno));
exit(1);
}
+ gzbuffer(mfd.gzfd, (1<<20)); /* Increase zlib's buffers to 1MB */
}
return mfd;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date