Commit 98583b3e authored by Abhi Das's avatar Abhi Das Committed by Andreas Gruenbacher

gfs2: add more timing info to journal recovery process

Tells you how many milliseconds map_journal_extents and find_jhead
take.
Signed-off-by: default avatarAbhi Das <adas@redhat.com>
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 0ebbe4f9
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/gfs2_ondisk.h> #include <linux/gfs2_ondisk.h>
#include <linux/crc32.h> #include <linux/crc32.h>
#include <linux/iomap.h> #include <linux/iomap.h>
#include <linux/ktime.h>
#include "gfs2.h" #include "gfs2.h"
#include "incore.h" #include "incore.h"
...@@ -2248,7 +2249,9 @@ int gfs2_map_journal_extents(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd) ...@@ -2248,7 +2249,9 @@ int gfs2_map_journal_extents(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd)
unsigned int shift = sdp->sd_sb.sb_bsize_shift; unsigned int shift = sdp->sd_sb.sb_bsize_shift;
u64 size; u64 size;
int rc; int rc;
ktime_t start, end;
start = ktime_get();
lblock_stop = i_size_read(jd->jd_inode) >> shift; lblock_stop = i_size_read(jd->jd_inode) >> shift;
size = (lblock_stop - lblock) << shift; size = (lblock_stop - lblock) << shift;
jd->nr_extents = 0; jd->nr_extents = 0;
...@@ -2268,8 +2271,9 @@ int gfs2_map_journal_extents(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd) ...@@ -2268,8 +2271,9 @@ int gfs2_map_journal_extents(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd)
lblock += (bh.b_size >> ip->i_inode.i_blkbits); lblock += (bh.b_size >> ip->i_inode.i_blkbits);
} while(size > 0); } while(size > 0);
fs_info(sdp, "journal %d mapped with %u extents\n", jd->jd_jid, end = ktime_get();
jd->nr_extents); fs_info(sdp, "journal %d mapped with %u extents in %lldms\n", jd->jd_jid,
jd->nr_extents, ktime_ms_delta(end, start));
return 0; return 0;
fail: fail:
......
...@@ -460,6 +460,8 @@ void gfs2_recover_func(struct work_struct *work) ...@@ -460,6 +460,8 @@ void gfs2_recover_func(struct work_struct *work)
if (error) if (error)
goto fail_gunlock_ji; goto fail_gunlock_ji;
t_jhd = ktime_get(); t_jhd = ktime_get();
fs_info(sdp, "jid=%u: Journal head lookup took %lldms\n", jd->jd_jid,
ktime_ms_delta(t_jhd, t_jlck));
if (!(head.lh_flags & GFS2_LOG_HEAD_UNMOUNT)) { if (!(head.lh_flags & GFS2_LOG_HEAD_UNMOUNT)) {
fs_info(sdp, "jid=%u: Acquiring the transaction lock...\n", fs_info(sdp, "jid=%u: Acquiring the transaction lock...\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment