From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Fri, 11 Jul 2014 17:07:51 +0100 Subject: [Cluster-devel] [gfs2-utils PATCH] fsck.gfs2: Issue read-ahead for dinodes in each bitmap In-Reply-To: <2099118726.6310652.1405011363612.JavaMail.zimbra@redhat.com> References: <2099118726.6310652.1405011363612.JavaMail.zimbra@redhat.com> Message-ID: <53C00BD7.9030502@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, On 10/07/14 17:56, Bob Peterson wrote: > Hi, > > 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. Looks good to me, Steve. > Regards, > > Bob Peterson > Red Hat File Systems > > Signed-off-by: Bob Peterson > --- > gfs2/fsck/pass1.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/gfs2/fsck/pass1.c b/gfs2/fsck/pass1.c > index fec2f64..90ca357 100644 > --- a/gfs2/fsck/pass1.c > +++ b/gfs2/fsck/pass1.c > @@ -1442,6 +1442,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; >