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 Sat, Apr 06, 2024 at 05:09:26PM +0800, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@xxxxxxxxxx>
> 
> So that iomap and bffer_head can convert to use bdev_file in following
> patches.

Let me see if I got it straight.  You introduce dummy struct file instances
(no methods, nothing).  The *ONLY* purpose they serve is to correspond to
opened instances of struct bdev.  No other use is possible.

You shove them into ->i_private of bdevfs inodes.  Lifetime rules are...
odd.

In bdev_open() you arrange for such beast to be present.  You never
return it anywhere, they only get accessed via ->i_private, exposing
it at least to fs/buffer.c.  Reference to those suckers get stored
(without grabbing refcount) into buffer_head instances.

And all of that is for... what, exactly?




[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