Re: [PATCH] Btrfs: do not start a transaction during fiemap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
>>
>> My concern is, if at this timing there is no running transaction, so we
>> continue with trans == NULL.
>>
>> But before we continue, some one started a transaction and
>> increased/decreased the extent reference number, this doesn't look as safe.
> 
> So?
> 
> If an extent is not shared but right before btrfs_check_shared()
> returns it becomes shared? We will report it as not shared.
> It's the same type of "problem".

Well, even if btrfs_check_shared() just return 1 no brain, it won't
cause any problem.
Just make nodatacow not that nodatacow.

Reviewed-by: Qu Wenruo <wqu@xxxxxxxx>

Thanks,
Qu

> 
>>
>> Or did I miss something?
>>
>> Thanks,
>> Qu
>>>               trans = NULL;
>>>               down_read(&fs_info->commit_root_sem);
>>>       } else {
>>> @@ -1523,6 +1527,7 @@ int btrfs_check_shared(struct btrfs_root *root, u64 inum, u64 bytenr)
>>>       } else {
>>>               up_read(&fs_info->commit_root_sem);
>>>       }
>>> +out:
>>>       ulist_free(tmp);
>>>       ulist_free(roots);
>>>       return ret;
>>>
>>

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux