From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Tue, 29 May 2018 10:57:51 +0100 Subject: [Cluster-devel] [RFC PATCH 1/3] gfs2: allow map_journal_extents() to take a journal descriptor as argument In-Reply-To: <1527581147-25544-2-git-send-email-adas@redhat.com> References: <1527581147-25544-1-git-send-email-adas@redhat.com> <1527581147-25544-2-git-send-email-adas@redhat.com> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Looks good. Acked-by: Steven Whitehouse Steve. On 29/05/18 09:05, Abhi Das wrote: > This function now maps the extents for the journal whose descriptor > is passed in as argument. > > Signed-off-by: Abhi Das > --- > fs/gfs2/log.h | 1 + > fs/gfs2/ops_fstype.c | 5 ++--- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h > index 92dcbe7..19c93df 100644 > --- a/fs/gfs2/log.h > +++ b/fs/gfs2/log.h > @@ -75,4 +75,5 @@ extern int gfs2_logd(void *data); > extern void gfs2_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd); > extern void gfs2_write_revokes(struct gfs2_sbd *sdp); > > +extern int map_journal_extents(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd); > #endif /* __LOG_DOT_H__ */ > diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c > index 228f38e..cf3e366 100644 > --- a/fs/gfs2/ops_fstype.c > +++ b/fs/gfs2/ops_fstype.c > @@ -524,9 +524,8 @@ out: > * but since it's only done at mount time, I'm not worried about the > * time it takes. > */ > -static int map_journal_extents(struct gfs2_sbd *sdp) > +int map_journal_extents(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd) > { > - struct gfs2_jdesc *jd = sdp->sd_jdesc; > unsigned int lb; > u64 db, prev_db; /* logical block, disk block, prev disk block */ > struct gfs2_inode *ip = GFS2_I(jd->jd_inode); > @@ -772,7 +771,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) > atomic_set(&sdp->sd_log_thresh2, 4*sdp->sd_jdesc->jd_blocks/5); > > /* Map the extents for this journal's blocks */ > - map_journal_extents(sdp); > + map_journal_extents(sdp, sdp->sd_jdesc); > } > trace_gfs2_log_blocks(sdp, atomic_read(&sdp->sd_log_blks_free)); >