Re: [PATCH 2/4] btrfs: detect uninitialized btrfs_root::anon_dev for user visible subvolumes

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

 



On 6/16/20 6:49 PM, Qu Wenruo wrote:


On 2020/6/17 上午3:25, Josef Bacik wrote:
On 6/15/20 10:17 PM, Qu Wenruo wrote:
btrfs_root::anon_dev is an indicator for different subvolume namespaces.
Thus it should always be initialized to an anonymous block device.

Add a safe net to catch such uninitialized values.

Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>

Can we handle stat->dev not having a device set?  Or will this blow up
in other ways?  Thanks,

We can handle it without any problem, just users get confused.

As a common practice, we use different bdev as a namespace for different
subvolumes.
Without a valid bdev, some user space tools may not be able to
distinguish inodes in different subvolumes.


Alright that's fine then. But I feel like stat is one of those things that'll flood the console, can we put this somewhere else that's going to be hit less? Thanks,

Josef



[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