Re: [PATCH DRAFT RFC 34/34] buffer: port block device access to files and get rid of bd_inode access

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

 



On Wed 17-01-24 17:24:23, Christoph Hellwig wrote:
> On Wed, Jan 17, 2024 at 05:15:00PM +0100, Jan Kara wrote:
> > > >  	iomap->bdev = bdev;
> > > > +	BUG_ON(true /* TODO(brauner): This is the only place where we don't go from inode->i_sb->s_f_bdev for obvious reasons. Thoughts? */);
> > > 
> > > Maybe block devices should have their own struct file created when the
> > > block device is instantiated and torn down when the block device is
> > > trashed?
> > 
> > OK, but is there a problem with I_BDEV() which is currently used in
> > blkdev_iomap_begin()?
> 
> Well, blkdev_iomap_begin is always called on the the actual bdev fs
> inode that is allocated together with the bdev itself.  So we'll always
> be able to get to it using container_of variants.

Yes, that was exactly my point.

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR




[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