Re: [PATCH 2/2] btrfs: Don't set SHAREABLE flag for data reloc tree

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

 




On 2020/5/13 下午9:51, David Sterba wrote:
> On Wed, May 13, 2020 at 02:49:11PM +0800, Qu Wenruo wrote:
>>>>  {
>>>>  	struct inode *inode = NULL;
>>>>  	struct btrfs_trans_handle *trans;
>>>> -	struct btrfs_root *root;
>>>> +	struct btrfs_root *root = fs_info->dreloc_root;
>>>
>>> So why haven't you added code in btrfs_get_fs_root to quickly return a
>>> refcounted root and instead reference it without incrementing the refcount?
>>
>> This is exactly the same as how we handle fs_root.
>> And since the lifespan of data reloc root will be the same as the fs, I
>> don't think there is any need for it to be grabbed each time we need it.
>
> I'd vote for some consistency in the refcounting, ie. even if it's for
> the same life span as the filesystem, set the reference.
>
OK, I'll call grab and put in next version.

Thanks,
Qu




[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