Re: [RFC v4 linux-next 19/19] fs & block: remove bdev->bd_inode

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

 



Hi,

在 2024/03/18 5:38, Christoph Hellwig 写道:
On Thu, Feb 22, 2024 at 08:45:55PM +0800, Yu Kuai wrote:
The only user that doesn't rely on files is the block layer itself in
block/fops.c where we only have access to the block device. As the bdev
filesystem doesn't open block devices as files obviously.

Why is that obvious?  Maybe I'm just thick but this seems odd to me.

Because there is a real filesystem(devtmpfs) used for raw block devcie
file operations, open syscall to devtmpfs:

blkdev_open
 bdev = blkdev_get_no_open
 bdev_open -> pass in file is from devtmpfs
 -> in this case, file inode is from devtmpfs,

Then later, in blkdev_iomap_begin(), bd_inode is passed in and there is
no access to the devtmpfs file, we can't use s_bdev_file() as other
filesystems here.

Thanks,
Kuai


.






[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux