Re: [PATCH vfs.all 22/26] block: stash a bdev_file to read/write raw blcok_device

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

 



On Wed, Apr 17, 2024 at 03:43:12PM +0200, Jan Kara wrote:

> > fs/btrfs/volumes.c:485: ret = set_blocksize(bdev, BTRFS_BDEV_BLOCKSIZE);
> > 	Some of the callers do not bother with exclusive open;
> > in particular, if btrfs_get_dev_args_from_path() ever gets a pathname
> > of a mounted device with something other than btrfs on it, it won't
> > be pretty.
> 
> Yeah and frankly reading through btrfs_read_dev_super() I'm not sure which
> code needs the block size set either. We use read_cache_page_gfp() for the
> IO there as well.

FWIW, I don't understand the use of invalidate_bdev() in btrfs_get_bdev_and_sb(),
especially when called from btrfs_get_dev_args_from_path() - what's the point
of evicting page cache before reading the on-disk superblock, when all we are
going to do with the data we get is scan through internal list of opened devices
for uuid, etc.  matches?

Could btrfs folks comment on that one?




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux