[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Cluster-devel] GFS2: Clean up journal extent mapping



----- Original Message -----
| +int gfs2_map_journal_extents(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd)
| +{
| +	u64 lblock = 0;
| +	u64 lblock_stop;
| +	struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
| +	struct buffer_head bh;
| +	unsigned int shift = sdp->sd_sb.sb_bsize_shift;
| +	u64 size;
| +	int rc;
| +
| +	lblock_stop = i_size_read(jd->jd_inode) >> shift;
| +	size = (lblock_stop - lblock) << shift;

Since lblock is 0, this could be simplified to lblock_stop << shift;
unless, of course, there's a piece missing.
Other than that, this looks like a nice cleanup.

Bob Peterson
Red Hat File Systems


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]