From: Bob Peterson Date: Thu, 6 Mar 2014 08:46:24 -0500 (EST) Subject: [Cluster-devel] GFS2: Clean up journal extent mapping In-Reply-To: <1394106908.2729.15.camel@menhir> References: <1394106908.2729.15.camel@menhir> Message-ID: <2080409125.10226925.1394113584445.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ----- 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