[Ocfs2-devel] [PATCH 03/39] ocfs2: Add ocfs2_read_refcount_block.

Joel Becker Joel.Becker at oracle.com
Thu Apr 30 16:17:11 PDT 2009


On Thu, Apr 30, 2009 at 06:58:15AM +0800, Tao Ma wrote:
> +static int ocfs2_validate_refcount_block(struct super_block *sb,
> +					 struct buffer_head *bh)
> +{
> +	int rc;
> +	struct ocfs2_refcount_block *rb =
> +		(struct ocfs2_refcount_block *)bh->b_data;
> +
> +	mlog(0, "Validating refcount block %llu\n",
> +	     (unsigned long long)bh->b_blocknr);
> +
> +	BUG_ON(!buffer_uptodate(bh));
> +
> +	/*
> +	 * If the ecc fails, we return the error but otherwise
> +	 * leave the filesystem running.  We know any error is
> +	 * local to this block.
> +	 */
> +	rc = ocfs2_validate_meta_ecc(sb, bh->b_data, &rb->rf_check);
> +	if (rc) {
> +		mlog(ML_ERROR, "Checksum failed for extent block %llu\n",
> +		     (unsigned long long)bh->b_blocknr);

	'refcount block' instead of 'extent block' :-)

Joel

-- 

"The lawgiver, of all beings, most owes the law allegiance.  He of all
 men should behave as though the law compelled him.  But it is the
 universal weakness of mankind that what we are given to administer we
 presently imagine we own."
        - H.G. Wells

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-devel mailing list