From: Hannes Reinecke <hare@suse.de>
To: dm-devel@redhat.com
Subject: Re: [PATCH 02/32] block/fs/mm: prepare submit_bio_wait users for bi_rw split
Date: Thu, 05 Nov 2015 08:14:32 +0100 [thread overview]
Message-ID: <563B01D8.5040901@suse.de> (raw)
In-Reply-To: <1446674909-5371-3-git-send-email-mchristi@redhat.com>
On 11/04/2015 11:07 PM, mchristi@redhat.com wrote:
> From: Mike Christie <mchristi@redhat.com>
>
> This patch prepares submit_bio_wait callers for the next
> patches that split bi_rw into a operation and flags field.
> Instead of passing in a bitmap with both the operation and
> flags mixed in, the callers now pass them in seperately.
>
> Temp issue: When the fs.h read/write types, like WRITE_SYNC or
> WRITE_FUA, are used we still pass in the operation along with the
> flags in the flags argument. When all the code has been converted
> that will be cleaned up. It is left in here for compat and git
> bisect use and to try and make the patches smaller.
>
> Signed-off-by: Mike Christie <mchristi@redhat.com>
> ---
> block/bio.c | 8 ++++----
> block/blk-flush.c | 2 +-
> drivers/md/bcache/debug.c | 4 ++--
> drivers/md/md.c | 2 +-
> drivers/md/raid1.c | 2 +-
> drivers/md/raid10.c | 2 +-
> fs/btrfs/check-integrity.c | 8 ++++----
> fs/btrfs/check-integrity.h | 2 +-
> fs/btrfs/extent_io.c | 2 +-
> fs/btrfs/scrub.c | 6 +++---
> fs/ext4/crypto.c | 2 +-
> fs/f2fs/segment.c | 4 ++--
> fs/hfsplus/hfsplus_fs.h | 2 +-
> fs/hfsplus/part_tbl.c | 5 +++--
> fs/hfsplus/super.c | 6 ++++--
> fs/hfsplus/wrapper.c | 14 ++++++++------
> fs/logfs/dev_bdev.c | 2 +-
> include/linux/bio.h | 2 +-
> kernel/power/swap.c | 30 ++++++++++++++++++------------
> 19 files changed, 58 insertions(+), 47 deletions(-)
>
> diff --git a/block/bio.c b/block/bio.c
> index ad3f276..610c704 100644
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -859,21 +859,21 @@ static void submit_bio_wait_endio(struct bio *bio)
>
> /**
> * submit_bio_wait - submit a bio, and wait until it completes
> - * @rw: whether to %READ or %WRITE, or maybe to %READA (read ahead)
> + * @op: REQ_OP_*
> + * @flags: rq_flag_bits
> * @bio: The &struct bio which describes the I/O
> *
> * Simple wrapper around submit_bio(). Returns 0 on success, or the error from
> * bio_endio() on failure.
> */
> -int submit_bio_wait(int rw, struct bio *bio)
> +int submit_bio_wait(int op, int flags, struct bio *bio)
> {
> struct submit_bio_ret ret;
>
> - rw |= REQ_SYNC;
> init_completion(&ret.event);
> bio->bi_private = &ret;
> bio->bi_end_io = submit_bio_wait_endio;
> - submit_bio(rw, bio);
> + submit_bio(op | flags | REQ_SYNC, bio);
> wait_for_completion(&ret.event);
>
> return ret.error;
Personally, I find it a bit odd to have flags starting with
REQ_ to be applied to bios; I would have expected them to be
applicable for requests, not for bios.
Not sure if it's worth the trouble to have the entire flag
set duplicated with BIO_XXX; maybe we should be using a common
set of flags prefixed with something else.
But in the end this is just a style issue, not a technical one.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
next prev parent reply other threads:[~2015-11-05 7:14 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 22:07 [RESEND RFC PATCH 00/32] separate operations from flags in the bio/request structs mchristi
2015-11-04 22:07 ` [PATCH 01/32] block/fs: add REQ_OP definitions mchristi
2015-11-04 22:07 ` [PATCH 02/32] block/fs/mm: prepare submit_bio_wait users for bi_rw split mchristi
2015-11-05 7:14 ` Hannes Reinecke [this message]
2015-11-04 22:08 ` [PATCH 03/32] dio/btrfs: prep dio->submit_bio " mchristi
2015-11-04 22:08 ` [PATCH 04/32] block: prepare blkdev_issue_discard " mchristi
2015-11-04 22:08 ` [PATCH 05/32] drbd: prepare drbd " mchristi
2015-11-04 22:08 ` [PATCH 06/32] xen blkback: prepare " mchristi
[not found] ` <1446674909-5371-7-git-send-email-mchristi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-11-07 10:17 ` Christoph Hellwig
2015-11-07 14:04 ` Konrad Rzeszutek Wilk
2015-11-09 4:00 ` Bob Liu
2015-11-04 22:08 ` [PATCH 07/32] dm: " mchristi
2015-11-04 22:08 ` [PATCH 08/32] target: " mchristi
2015-11-04 22:08 ` [PATCH 09/32] btrfs: " mchristi
2015-11-04 22:08 ` [PATCH 10/32] f2fs: " mchristi
2015-11-04 22:08 ` [PATCH 11/32] gfs2: " mchristi
2015-11-04 22:08 ` [PATCH 12/32] xfs: " mchristi
2015-11-04 22:08 ` [PATCH 13/32] mm: " mchristi
2015-11-04 22:08 ` [PATCH 14/32] block/fs/mm: pass in op and flags to submit_bio mchristi
2015-11-04 22:08 ` [PATCH 15/32] btrfs: prepare for bi_rw split mchristi
2015-11-04 22:08 ` [PATCH 16/32] block/fs/md: pass in op and flags to submit_bh mchristi
2015-11-04 22:08 ` [PATCH 17/32] block: add operation field to bio struct mchristi
2015-11-04 22:08 ` [PATCH 18/32] drbd: set bio bi_op to REQ_OP mchristi
2015-11-04 22:08 ` [PATCH 19/32] block: add helper to get data dir from op mchristi
[not found] ` <1446674909-5371-20-git-send-email-mchristi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-11-04 22:44 ` [dm-devel] " Bart Van Assche
2015-11-05 17:34 ` Mike Christie
[not found] ` <563B930F.7040705-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-11-07 10:19 ` Christoph Hellwig
2015-11-04 22:08 ` [PATCH 20/32] md: set bi_op to REQ_OP mchristi
2015-11-04 22:08 ` [PATCH 21/32] bcache: " mchristi
2015-11-04 22:08 ` [PATCH 22/32] block/fs/drivers: " mchristi
2015-11-04 22:08 ` [PATCH 23/32] block/fs: pass in op and flags to ll_rw_block mchristi
2015-11-04 22:08 ` [PATCH 24/32] dm: pass dm stats data dir instead of bi_rw mchristi
2015-11-04 22:08 ` [PATCH 25/32] block: add operation field to request struct mchristi
2015-11-04 22:08 ` [PATCH 26/32] ide cd: do not set REQ_WRITE on requests mchristi
2015-11-04 22:08 ` [PATCH 27/32] cfq/cgroup: pass operation and flags seperately mchristi
2015-11-04 22:08 ` [PATCH 28/32] block/fs/drivers: use bio/rq_data_dir helpers mchristi
2015-11-04 22:08 ` [PATCH 29/32] block/drivers: rm request cmd_flags REQ_OP use mchristi
2015-11-04 22:08 ` [PATCH 30/32] drbd: don't use bi_rw for operations mchristi
2015-11-04 22:08 ` [PATCH 31/32] block/fs/driver: rm bio bi_rw REQ_OP use mchristi
2015-11-04 22:08 ` [PATCH 32/32] block: remove __REQ op defs and reduce bi_op/bi_rw sizes mchristi
[not found] ` <1446674909-5371-33-git-send-email-mchristi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-11-07 10:21 ` Christoph Hellwig
2015-11-05 16:44 ` [RESEND RFC PATCH 00/32] separate operations from flags in the bio/request structs Bob Peterson
2015-11-07 10:10 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2015-11-04 16:32 [RFC " mchristi
2015-11-04 16:32 ` [PATCH 02/32] block/fs/mm: prepare submit_bio_wait users for bi_rw split mchristi
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=563B01D8.5040901@suse.de \
--to=hare@suse.de \
--cc=dm-devel@redhat.com \
/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