Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=fc4eb12a...
Commit: fc4eb12affd5282b77ada7739229bb3e54871f3d
Parent: 2c166cbe0233a56a4684717266553ee4396e5dc3
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Mon Jan 6 08:28:24 2014 -0600
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Tue Jul 22 14:43:45 2014 -0500
fsck.gfs2: Issue read-ahead for dinodes in each bitmap
This patch speeds up fsck.gfs2 by issuing read-ahead for each of the
dinodes found in each of the bitmaps, prior to processing the bitmap.
---
gfs2/fsck/pass1.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/gfs2/fsck/pass1.c b/gfs2/fsck/pass1.c
index 4f1b77a..c757922 100644
--- a/gfs2/fsck/pass1.c
+++ b/gfs2/fsck/pass1.c
@@ -1441,6 +1441,10 @@ static int pass1_process_bitmap(struct gfs2_sbd *sdp, struct
rgrp_tree *rgd, uin
struct gfs2_inode *ip;
uint8_t q;
+ /* Issue read-ahead for all dinodes in this bitmap */
+ for (i = 0; i < n; i++)
+ posix_fadvise(sdp->device_fd, ibuf[i] * sdp->bsize, sdp->bsize,
+ POSIX_FADV_WILLNEED);
for (i = 0; i < n; i++) {
int is_inode;
uint32_t check_magic;