This patchset uses bio(s) to read in the journal in large chunks to lookup the journal head. This will replace the existing bisect method of reading the journal block-by-block to find the head.
These are RHEL7 patches because it was simpler for me to test. Upstream versions shouldn't be very dissimilar. I'll port once I get some feedback on this. I'm seeing some promising results with some preliminary testing. I have 5 lock_nolock filesystems saved off using 'gfs2_edit savemeta' after killing the node mid-IO so as to save unrecovered journals. All times are in milliseconds. This table below shows the overall time taken for recovery and the jhead column represents the time taken to find the jhead alone. Finding the jhead is a big chunk of the overall time taken for recovery. bisect | bio overall jhead | overall jhead ------------------------------|----------------------- fs1 1702 1642 | 394 325 fs2 761 334 | 706 356 fs3 1150 904 | 1356 1089 fs4 953 596 | 691 343 fs5 1262 1233 | 554 524 Abhi Das (3): gfs2: allow map_journal_extents() to take a journal descriptor as argument gfs2: add timing info for various stages of journal recovery gfs2: read journal in large chunks to locate the head fs/gfs2/incore.h | 7 ++- fs/gfs2/log.c | 2 +- fs/gfs2/log.h | 2 + fs/gfs2/lops.c | 115 +++++++++++++++++++++++++++++++++++++++--- fs/gfs2/lops.h | 1 + fs/gfs2/ops_fstype.c | 10 ++-- fs/gfs2/recovery.c | 138 +++++++++------------------------------------------ fs/gfs2/recovery.h | 1 + 8 files changed, 149 insertions(+), 127 deletions(-) -- 2.4.11