linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Dave Chinner <david@fromorbit.com>
Cc: Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	"Darrick J. Wong" <djwong@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH DRAFT RFC 34/34] buffer: port block device access to files and get rid of bd_inode access
Date: Wed, 17 Jan 2024 17:15:00 +0100	[thread overview]
Message-ID: <20240117161500.bibuljso32a2a26y@quack3> (raw)
In-Reply-To: <ZZuNgqLNimnMBTIC@dread.disaster.area>

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@kernel.org>
> > ---
> >  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@suse.com>
SUSE Labs, CR

  reply	other threads:[~2024-01-17 16:15 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03 12:54 [PATCH RFC 00/34] Open block devices as files & a bd_inode proposal Christian Brauner
2024-01-03 12:54 ` [PATCH RFC 01/34] bdev: open block device as files Christian Brauner
2024-01-08  5:37   ` Dave Chinner
2024-01-08 11:34     ` Christian Brauner
2024-01-17 15:31   ` Jan Kara
2024-01-18 17:22     ` Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 02/34] block/ioctl: port blkdev_bszset() to file Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 03/34] block/genhd: port disk_scan_partitions() " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 04/34] md: port block device access " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 05/34] swap: port block device usage " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 06/34] power: port block device access " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 07/34] xfs: port block device access to files Christian Brauner
2024-01-08  5:34   ` Dave Chinner
2024-01-08 11:34     ` Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 08/34] drbd: port block device access to file Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 09/34] pktcdvd: " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 10/34] rnbd: " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 11/34] xen: " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 12/34] zram: " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 13/34] bcache: port block device access to files Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 14/34] block2mtd: port " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 15/34] nvme: port block device access to file Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 16/34] s390: " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 17/34] target: " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 18/34] bcachefs: " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 19/34] btrfs: port " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 20/34] erofs: " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 21/34] ext4: port block " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 22/34] f2fs: port block device access to files Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 23/34] jfs: port block device access to file Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 24/34] nfs: port block device access to files Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 25/34] ocfs2: port block device access to file Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 26/34] reiserfs: " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 27/34] bdev: remove bdev_open_by_path() Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 28/34] bdev: make bdev_release() private to block layer Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 29/34] bdev: make struct bdev_handle private to the " Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 30/34] bdev: rework bdev_open_by_dev() Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 31/34] ext4: rely on sb->f_bdev only Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 32/34] block: expose bdev_file_inode() Christian Brauner
2024-01-03 12:55 ` [PATCH RFC 33/34] ext4: use bdev_file_inode() Christian Brauner
2024-01-03 12:55 ` [PATCH DRAFT RFC 34/34] buffer: port block device access to files and get rid of bd_inode access Christian Brauner
2024-01-08  5:52   ` Dave Chinner
2024-01-17 16:15     ` Jan Kara [this message]
2024-01-17 16:24       ` Christoph Hellwig
2024-01-17 16:33         ` Jan Kara
2024-01-18 17:39           ` Christian Brauner
2024-01-17 16:32   ` Jan Kara
2024-01-18 17:41     ` Christian Brauner
2024-01-08 16:26 ` [PATCH RFC 00/34] Open block devices as files & a bd_inode proposal Christoph Hellwig
2024-01-09  8:46   ` Jan Kara
2024-01-15 14:24     ` Christian Brauner
2024-01-17 16:46 ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240117161500.bibuljso32a2a26y@quack3 \
    --to=jack@suse.cz \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).