[Ocfs2-devel] [PATCH V2] ocfs2: don't clear bh uptodate for block read

Junxiao Bi junxiao.bi at oracle.com
Sun Nov 18 23:12:37 PST 2018


On 11/19/18 3:01 PM, jiangyiwen wrote:

> On 2018/11/19 14:34, Junxiao Bi wrote:
>> On 11/19/18 2:14 PM, jiangyiwen wrote:
>>
>>> On 2018/11/19 13:46, Junxiao Bi wrote:
>>>> On 11/19/18 11:05 AM, jiangyiwen wrote:
>>>>> On 2018/11/14 8:00, Junxiao Bi wrote:
>>>>>> For sync io read in ocfs2_read_blocks_sync(), first clear bh uptodate flag
>>>>>> and submit the io, second wait io done, last check whether bh uptodate,
>>>>>> if not return io error.
>>>>>>
>>>>>> If two sync io for the same bh were issued, it could be the first io done
>>>>>> and set uptodate flag, but just before check that flag, the second io came
>>>>>> in and cleared uptodate, then ocfs2_read_blocks_sync() for the first io
>>>>>> will return IO error.
>>>>>>
>>>>>> Indeed it's not necessary to clear uptodate flag, as the io end handler
>>>>>> end_buffer_read_sync() will set or clear it based on io succeed or failed.
>>>>>>
>>>>>> The following message was found from a nfs server but the underlying
>>>>>> storage returned no error.
>>>>>>
>>>>>> [4106438.567376] (nfsd,7146,3):ocfs2_get_suballoc_slot_bit:2780 ERROR: read block 1238823695 failed -5
>>>>>> [4106438.567569] (nfsd,7146,3):ocfs2_get_suballoc_slot_bit:2812 ERROR: status = -5
>>>>>> [4106438.567611] (nfsd,7146,3):ocfs2_test_inode_bit:2894 ERROR: get alloc slot and bit failed -5
>>>>>> [4106438.567643] (nfsd,7146,3):ocfs2_test_inode_bit:2932 ERROR: status = -5
>>>>>> [4106438.567675] (nfsd,7146,3):ocfs2_get_dentry:94 ERROR: test inode bit failed -5
>>>>>>
>>>>>> Same issue in non sync read ocfs2_read_blocks(), fixed it as well.
>>>>>>
>>>>>> Signed-off-by: Junxiao Bi<junxiao.bi at oracle.com>
> Reviewed-by: Yiwen Jiang<jiangyiwen at huawei.com>

Yiwen, many thanks for your review.


>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20181119/bd47b7f6/attachment.html 


More information about the Ocfs2-devel mailing list