On 2017年11月02日 13:50, Lakshmipathi.G wrote:
>>
>> I'll try to reproduce it with FS_CHECK_INTEGRITY enabled.
>>
> 
> Okay thanks for the details.  Here's the kernel config file which hits
> this issue:
> https://github.com/Lakshmipathi/btrfsqa/blob/master/setup/config/kernel.config#L3906

Although I didn't reproduced your problem, I found fstests can easily
trigger the same problem.

The problem turns out to be that setup_items_for_insert() will call
btrfs_mark_buffer_dirty(), however that's not done at correct timing.

If FS_CHECK_INTEGRITY is enabled, every time we call
btrfs_mark_buffer_dirty(), we must ensure have setup the leaf correctly.

However for setup_items_for_insert(), it doesn't really insert the data
but only keys, leaving item data uninitialized, and triggering the bug.
(That's to say, we should not do leaf validation check at
btrfs_mark_buffer_dirty() time).

I'll try to move it to leaf write time to fix the problem.

For now, please disable FS_CHECK_INTEGRITY.

Thanks,
Qu

> 
> thanks!
> ----
> Cheers,
> Lakshmipathi.G
> http://www.giis.co.in http://www.webminal.org
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to