From: Omar Sandoval <osandov@osandov.com>
To: dsterba@suse.cz, Al Viro <viro@ZenIV.linux.org.uk>,
linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
kernel-team@fb.com
Subject: Re: [PATCH 1/3] fs: add initial bh_result->b_private value to __blockdev_direct_IO()
Date: Fri, 29 Jun 2018 00:02:42 -0700 [thread overview]
Message-ID: <20180629070242.GA14870@vader> (raw)
In-Reply-To: <20180625171638.GH27958@twin.jikos.cz>
On Mon, Jun 25, 2018 at 07:16:38PM +0200, David Sterba wrote:
> On Mon, May 14, 2018 at 06:35:48PM +0200, David Sterba wrote:
> > On Fri, May 11, 2018 at 01:30:01PM -0700, Omar Sandoval wrote:
> > > On Fri, May 11, 2018 at 09:05:38PM +0100, Al Viro wrote:
> > > > On Thu, May 10, 2018 at 11:30:10PM -0700, Omar Sandoval wrote:
> > > > > do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode,
> > > > > struct block_device *bdev, struct iov_iter *iter,
> > > > > get_block_t get_block, dio_iodone_t end_io,
> > > > > - dio_submit_t submit_io, int flags)
> > > > > + dio_submit_t submit_io, int flags, void *private)
> > > >
> > > > Oh, dear... That's what, 9 arguments? I agree that the hack in question
> > > > is obscene, but so is this ;-/
> > >
> > > So looking at these one by one, obviously needed:
> > >
> > > - iocb
> > > - inode
> > > - iter
> > >
> > > bdev is almost always inode->i_sb->s_bdev, except for Btrfs :(
> > >
> > > These could _maybe_ go in struct kiocb:
> > >
> > > - flags could maybe be folded into ki_flags
> > > - private could maybe go in iocb->private, but I haven't yet read
> > > through to figure out if we're already using iocb->private for direct
> > > I/O
> >
> > I think the kiocb::private can be used for the purpose. There's only one
> > user, ext4, that also passes some DIO data around so it would in line
> > with the interface AFAICS.
>
> Omar, do you have an update to the patchset? Thanks.
Al, what do you think of changing all users of map_bh->b_private to use
iocb->private? We'd have to pass the iocb to get_block() and
submit_io(), but we could get rid of dio->private.
next prev parent reply other threads:[~2018-06-29 7:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-11 6:30 [PATCH 0/3] Btrfs: stop abusing current->journal_info for direct I/O Omar Sandoval
2018-05-11 6:30 ` [PATCH 1/3] fs: add initial bh_result->b_private value to __blockdev_direct_IO() Omar Sandoval
2018-05-11 20:05 ` Al Viro
2018-05-11 20:30 ` Omar Sandoval
2018-05-11 20:32 ` Al Viro
2018-05-11 20:41 ` Omar Sandoval
2018-05-14 16:35 ` David Sterba
2018-06-25 17:16 ` David Sterba
2018-06-29 7:02 ` Omar Sandoval [this message]
2018-05-11 6:30 ` [PATCH 2/3] fs: add private argument to dio_submit_t Omar Sandoval
2018-05-11 6:30 ` [PATCH 3/3] Btrfs: stop abusing current->journal_info in btrfs_direct_IO() Omar Sandoval
2018-05-11 9:26 ` [PATCH 0/3] Btrfs: stop abusing current->journal_info for direct I/O David Sterba
2018-05-11 9:53 ` Nikolay Borisov
2018-05-11 10:24 ` David Sterba
2018-05-11 17:28 ` Omar Sandoval
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=20180629070242.GA14870@vader \
--to=osandov@osandov.com \
--cc=dsterba@suse.cz \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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).