[Ocfs2-tools-devel] [PATCH 03/44] libocfs2: Add ocfs2_read_refcount_block().
Tao Ma
tao.ma at oracle.com
Wed Dec 30 23:38:17 PST 2009
Joel Becker wrote:
> On Mon, Dec 28, 2009 at 05:00:48PM +0800, Tao Ma wrote:
>
>> +errcode_t ocfs2_read_refcount_block(ocfs2_filesys *fs, uint64_t blkno,
>> + char *rb_buf)
>> +{
>> + errcode_t ret;
>> + struct ocfs2_refcount_block *rb =
>> + (struct ocfs2_refcount_block *)rb_buf;
>> +
>> + ret = ocfs2_read_refcount_block_nocheck(fs, blkno, rb_buf);
>> +
>> + if (ret == 0 && rb->rf_list.l_next_free_rec > rb->rf_list.l_count)
>> + ret = OCFS2_ET_CORRUPT_EXTENT_BLOCK;
>> +
>> + return ret;
>> +}
>>
>
> Do you know why we have a nocheck version? Because I can't
> remember why. Is it useful?
>
the only place we call it is fsck.ocfs2. And I guess we just copied the
functions we wrote for extent block and modified it to work for refcount
block. ;)
Regards,
Tao
> Joel
>
>
More information about the Ocfs2-tools-devel
mailing list