diff options
author | Abhi Das <adas@redhat.com> | 2019-05-02 14:17:40 -0500 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2019-05-07 23:39:15 +0200 |
commit | f4686c26ecc34e8e458b8235f0af5198c9b13bfd (patch) | |
tree | 6768f35e9f263165a70e22b3f5d164e0b400e856 /fs/gfs2/super.c | |
parent | d0a22a4b03b8475b7aa3fa41243c26c291407844 (diff) | |
download | lwn-f4686c26ecc34e8e458b8235f0af5198c9b13bfd.tar.gz lwn-f4686c26ecc34e8e458b8235f0af5198c9b13bfd.zip |
gfs2: read journal in large chunks
Use bios to read in the journal into the address space of the journal inode
(jd_inode), sequentially and in large chunks. This is faster for locating the
journal head that the previous binary search approach. When performing
recovery, we keep the journal in the address space until recovery is done,
which further speeds up things.
Signed-off-by: Abhi Das <adas@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r-- | fs/gfs2/super.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 5b148cf03293..fbf6b1fd330b 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -45,6 +45,7 @@ #include "util.h" #include "sys.h" #include "xattr.h" +#include "lops.h" #define args_neq(a1, a2, x) ((a1)->ar_##x != (a2)->ar_##x) @@ -425,7 +426,7 @@ int gfs2_make_fs_rw(struct gfs2_sbd *sdp) j_gl->gl_ops->go_inval(j_gl, DIO_METADATA); - error = gfs2_find_jhead(sdp->sd_jdesc, &head); + error = gfs2_find_jhead(sdp->sd_jdesc, &head, false); if (error) goto fail; @@ -680,7 +681,7 @@ static int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp, error = gfs2_jdesc_check(jd); if (error) break; - error = gfs2_find_jhead(jd, &lh); + error = gfs2_find_jhead(jd, &lh, false); if (error) break; if (!(lh.lh_flags & GFS2_LOG_HEAD_UNMOUNT)) { |