[Ocfs2-tools-devel] [PATCH 6/9] dx_dirs: stop iteration of dir trailer initialization for I/O error

Tao Ma tao.ma at oracle.com
Mon Apr 26 22:45:02 PDT 2010


Hi coly,

Coly Li wrote:
> 
> On 04/27/2010 09:28 AM, Tao Ma Wrote:
>> Hi coly,
>>
>> Coly Li wrote:
> [snip]
>>> @@ -180,12 +181,20 @@ static int dir_trailer_func(ocfs2_filesys *fs,
>>>
>>>      /* here we don't trust trailer, cannot use
>>>       * ocfs2_read_dir_block() */
>>> -    ret = ocfs2_read_blocks(fs, blkno, 1, blk);
>>> -    if (ret)
>>> +    err = ocfs2_read_blocks(fs, blkno, 1, blk);
>>> +    if (err) {
>>> +        ctxt->err = err;
>>> +        ret = OCFS2_EXTENT_ERROR;
>> I am afraid we need to set OCFS2_EXTENT_ABORT here since there is no
>> extent error actually? The same below.
> 
> It's not clear to me in which condition I should use OCFS2_EXTENT_ABORT or OCFS2_EXTENT_ERROR. What I did was, searched
> the source code, found OCFS2_EXTENT_ABORT were set by non-libocfs2 code, like tunefs.ocfs2/feature_metaecc.c
> So I assumed for non-libocfs2 code, using OCFS2_EXTENT_ABORT to stop the iteration. Maybe my explain doesn't make sense,
> I don't find any code set OCFS2_EXTENT_ABORT in libocfs2. That's why I use OCFS2_EXTENT_ERROR here.
ok, it works for me.

Regards,
Tao



More information about the Ocfs2-tools-devel mailing list