This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
The following commit(s) were added to refs/heads/master by this push:
new 9a78f5b8 mkfs.gfs2: Remove some posix_fadvise calls
9a78f5b8 is described below
commit 9a78f5b8c3ff3fad40741bdc8e278e9d623addf4
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Thu Feb 4 15:35:29 2021 +0000
mkfs.gfs2: Remove some posix_fadvise calls
These posix_fadvise() calls were added to aid performance but tests on a
striped 300TB volume show that they slow mkfs.gfs2 down unnecessarily.
Remove those calls and reduce the run time from approx. 8 minutes to
approx. 5 minutes.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/mkfs/main_mkfs.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index 573e0413..3722d64a 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -941,7 +941,6 @@ static int place_rgrps(struct gfs2_sbd *sdp, lgfs2_rgrps_t rgs, uint64_t *rgaddr
return 0;
}
gfs2_progress_close(&progress, _("Done\n"));
- posix_fadvise(sdp->device_fd, 0, sdp->fssize * sdp->bsize, POSIX_FADV_DONTNEED);
return 0;
}
@@ -1093,8 +1092,6 @@ static int open_dev(struct mkfs_dev *dev, int withprobe)
/* Freshen up the cache */
posix_fadvise(dev->fd, 0, 0, POSIX_FADV_DONTNEED);
- /* Turn off readahead, we're just writing new blocks */
- posix_fadvise(dev->fd, 0, 0, POSIX_FADV_RANDOM);
error = fstat(dev->fd, &dev->stat);
if (error < 0) {
@@ -1286,7 +1283,6 @@ int main(int argc, char *argv[])
perror(opts.dev.path);
exit(EXIT_FAILURE);
}
- posix_fadvise(opts.dev.fd, 0, 0, POSIX_FADV_DONTNEED);
error = close(opts.dev.fd);
if (error){
perror(opts.dev.path);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.