On Mon 08-01-24 16:52:02, Dave Chinner wrote: > On Wed, Jan 03, 2024 at 01:55:32PM +0100, Christian Brauner wrote: > > Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx> > > --- > > block/fops.c | 1 + > > drivers/md/md-bitmap.c | 1 + > > fs/affs/file.c | 1 + > > fs/btrfs/inode.c | 1 + > > fs/buffer.c | 69 ++++++++++++++++++++++--------------------- > > fs/direct-io.c | 2 +- > > fs/erofs/data.c | 7 +++-- > > fs/erofs/internal.h | 1 + > > fs/erofs/zmap.c | 1 + > > fs/ext2/inode.c | 8 +++-- > > fs/ext4/inode.c | 6 ++-- > > fs/ext4/super.c | 6 ++-- > > fs/f2fs/data.c | 6 +++- > > fs/f2fs/f2fs.h | 1 + > > fs/fuse/dax.c | 1 + > > fs/gfs2/aops.c | 1 + > > fs/gfs2/bmap.c | 1 + > > fs/hpfs/file.c | 1 + > > fs/jbd2/commit.c | 1 + > > fs/jbd2/journal.c | 26 +++++++++------- > > fs/jbd2/recovery.c | 6 ++-- > > fs/jbd2/revoke.c | 10 +++---- > > fs/jbd2/transaction.c | 1 + > > fs/mpage.c | 5 +++- > > fs/nilfs2/btnode.c | 2 ++ > > fs/nilfs2/gcinode.c | 1 + > > fs/nilfs2/mdt.c | 1 + > > fs/nilfs2/page.c | 2 ++ > > fs/nilfs2/recovery.c | 20 ++++++------- > > fs/nilfs2/the_nilfs.c | 1 + > > fs/ntfs/aops.c | 3 ++ > > fs/ntfs/file.c | 1 + > > fs/ntfs/mft.c | 2 ++ > > fs/ntfs3/fsntfs.c | 8 ++--- > > fs/ntfs3/inode.c | 1 + > > fs/ntfs3/super.c | 2 +- > > fs/ocfs2/journal.c | 2 +- > > fs/reiserfs/journal.c | 8 ++--- > > fs/reiserfs/reiserfs.h | 6 ++-- > > fs/reiserfs/tail_conversion.c | 1 + > > fs/xfs/xfs_iomap.c | 7 +++-- > > fs/zonefs/file.c | 2 ++ > > include/linux/buffer_head.h | 45 +++++++++++++++------------- > > include/linux/iomap.h | 1 + > > include/linux/jbd2.h | 6 ++-- > > 45 files changed, 172 insertions(+), 114 deletions(-) > > > > diff --git a/block/fops.c b/block/fops.c > > index e831196dafac..6557b71c7657 100644 > > --- a/block/fops.c > > +++ b/block/fops.c > > @@ -381,6 +381,7 @@ static int blkdev_iomap_begin(struct inode *inode, loff_t offset, loff_t length, > > loff_t isize = i_size_read(inode); > > > > 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()? Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR