From: mchristi@redhat.com
To: linux-f2fs-devel@lists.sourceforge.net,
linux-ext4@vger.kernel.org, konrad.wilk@oracle.com,
drbd-dev@lists.linbit.com, philipp.reisner@linbit.com,
lars.ellenberg@linbit.com, linux-raid@vger.kernel.org,
dm-devel@redhat.com, linux-fsdevel@vger.kernel.org,
linux-bcache@vger.kernel.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-mtd@lists.infradead.org, target-devel@vger.kernel.org,
linux-btrfs@vger.kernel.org, osd-dev@open-osd.org,
xfs@oss.sgi.com, ocfs2-devel@oss.oracle.com
Cc: Mike Christie <mchristi@redhat.com>
Subject: [PATCH 12/35] gfs2: set bi_op to REQ_OP
Date: Wed, 24 Feb 2016 13:47:49 -0600 [thread overview]
Message-ID: <1456343292-14535-13-git-send-email-mchristi@redhat.com> (raw)
In-Reply-To: <1456343292-14535-1-git-send-email-mchristi@redhat.com>
From: Mike Christie <mchristi@redhat.com>
This patch has gfs2 set the bio bi_op to a REQ_OP, and
rq_flag_bits to bi_rw.
This patch is compile tested only.
v2:
Bob, I did not add your signed off, because there was
the gfs2_submit_bhs changes since last time you reviewed
it.
Signed-off-by: Mike Christie <mchristi@redhat.com>
---
fs/gfs2/log.c | 8 ++++----
fs/gfs2/lops.c | 12 +++++++-----
fs/gfs2/lops.h | 2 +-
fs/gfs2/meta_io.c | 8 +++++---
fs/gfs2/ops_fstype.c | 1 +
5 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 0ff028c..e58ccef0 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -657,7 +657,7 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags)
struct gfs2_log_header *lh;
unsigned int tail;
u32 hash;
- int rw = WRITE_FLUSH_FUA | REQ_META;
+ int op_flags = WRITE_FLUSH_FUA | REQ_META;
struct page *page = mempool_alloc(gfs2_page_pool, GFP_NOIO);
enum gfs2_freeze_state state = atomic_read(&sdp->sd_freeze_state);
lh = page_address(page);
@@ -682,12 +682,12 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags)
if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags)) {
gfs2_ordered_wait(sdp);
log_flush_wait(sdp);
- rw = WRITE_SYNC | REQ_META | REQ_PRIO;
+ op_flags = WRITE_SYNC | REQ_META | REQ_PRIO;
}
sdp->sd_log_idle = (tail == sdp->sd_log_flush_head);
gfs2_log_write_page(sdp, page);
- gfs2_log_flush_bio(sdp, rw);
+ gfs2_log_flush_bio(sdp, REQ_OP_WRITE, op_flags);
log_flush_wait(sdp);
if (sdp->sd_log_tail != tail)
@@ -738,7 +738,7 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl,
gfs2_ordered_write(sdp);
lops_before_commit(sdp, tr);
- gfs2_log_flush_bio(sdp, WRITE);
+ gfs2_log_flush_bio(sdp, REQ_OP_WRITE, 0);
if (sdp->sd_log_head != sdp->sd_log_flush_head) {
log_flush_wait(sdp);
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index ce28242..c1099b4 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -230,17 +230,19 @@ static void gfs2_end_log_write(struct bio *bio)
/**
* gfs2_log_flush_bio - Submit any pending log bio
* @sdp: The superblock
- * @rw: The rw flags
+ * @op: REQ_OP
+ * @op_flags: rq_flag_bits
*
* Submit any pending part-built or full bio to the block device. If
* there is no pending bio, then this is a no-op.
*/
-void gfs2_log_flush_bio(struct gfs2_sbd *sdp, int rw)
+void gfs2_log_flush_bio(struct gfs2_sbd *sdp, int op, int op_flags)
{
if (sdp->sd_log_bio) {
atomic_inc(&sdp->sd_log_in_flight);
- sdp->sd_log_bio->bi_rw = rw;
+ sdp->sd_log_bio->bi_op = op;
+ sdp->sd_log_bio->bi_rw = op_flags;
submit_bio(sdp->sd_log_bio);
sdp->sd_log_bio = NULL;
}
@@ -300,7 +302,7 @@ static struct bio *gfs2_log_get_bio(struct gfs2_sbd *sdp, u64 blkno)
nblk >>= sdp->sd_fsb2bb_shift;
if (blkno == nblk)
return bio;
- gfs2_log_flush_bio(sdp, WRITE);
+ gfs2_log_flush_bio(sdp, REQ_OP_WRITE, 0);
}
return gfs2_log_alloc_bio(sdp, blkno);
@@ -329,7 +331,7 @@ static void gfs2_log_write(struct gfs2_sbd *sdp, struct page *page,
bio = gfs2_log_get_bio(sdp, blkno);
ret = bio_add_page(bio, page, size, offset);
if (ret == 0) {
- gfs2_log_flush_bio(sdp, WRITE);
+ gfs2_log_flush_bio(sdp, REQ_OP_WRITE, 0);
bio = gfs2_log_alloc_bio(sdp, blkno);
ret = bio_add_page(bio, page, size, offset);
WARN_ON(ret == 0);
diff --git a/fs/gfs2/lops.h b/fs/gfs2/lops.h
index a65a7ba..e529f53 100644
--- a/fs/gfs2/lops.h
+++ b/fs/gfs2/lops.h
@@ -27,7 +27,7 @@ extern const struct gfs2_log_operations gfs2_databuf_lops;
extern const struct gfs2_log_operations *gfs2_log_ops[];
extern void gfs2_log_write_page(struct gfs2_sbd *sdp, struct page *page);
-extern void gfs2_log_flush_bio(struct gfs2_sbd *sdp, int rw);
+extern void gfs2_log_flush_bio(struct gfs2_sbd *sdp, int op, int op_flags);
extern void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh);
static inline unsigned int buf_limit(struct gfs2_sbd *sdp)
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c
index 96c8140..f790f38 100644
--- a/fs/gfs2/meta_io.c
+++ b/fs/gfs2/meta_io.c
@@ -213,7 +213,8 @@ static void gfs2_meta_read_endio(struct bio *bio)
* Submit several consecutive buffer head I/O requests as a single bio I/O
* request. (See submit_bh_wbc.)
*/
-static void gfs2_submit_bhs(int rw, struct buffer_head *bhs[], int num)
+static void gfs2_submit_bhs(int op, int op_flags, struct buffer_head *bhs[],
+ int num)
{
struct buffer_head *bh = bhs[0];
struct bio *bio;
@@ -230,7 +231,8 @@ static void gfs2_submit_bhs(int rw, struct buffer_head *bhs[], int num)
bio_add_page(bio, bh->b_page, bh->b_size, bh_offset(bh));
}
bio->bi_end_io = gfs2_meta_read_endio;
- bio->bi_rw = rw;
+ bio->bi_op = op;
+ bio->bi_rw = op_flags;
submit_bio(bio);
}
@@ -281,7 +283,7 @@ int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags,
}
}
- gfs2_submit_bhs(READ_SYNC | REQ_META | REQ_PRIO, bhs, num);
+ gfs2_submit_bhs(REQ_OP_READ, READ_SYNC | REQ_META | REQ_PRIO, bhs, num);
if (!(flags & DIO_WAIT))
return 0;
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 4872a61..f3e1e0e 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -246,6 +246,7 @@ static int gfs2_read_super(struct gfs2_sbd *sdp, sector_t sector, int silent)
bio->bi_end_io = end_bio_io_page;
bio->bi_private = page;
+ bio->bi_op = REQ_OP_READ;
bio->bi_rw = READ_SYNC | REQ_META;
submit_bio(bio);
wait_on_page_locked(page);
--
1.8.3.1
next prev parent reply other threads:[~2016-02-24 19:47 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 19:47 [PATCH 00/35 v4] separate operations from flags in the bio/request structs mchristi
2016-02-24 19:47 ` [PATCH 01/35] block/fs/drivers: remove rw argument from submit_bio mchristi
2016-02-24 19:47 ` [PATCH 02/35] block: add REQ_OP definitions and bi_op/op fields mchristi
2016-02-24 19:47 ` [PATCH 03/35] block, fs, mm, drivers: set bi_op to REQ_OP mchristi
2016-02-24 19:47 ` [PATCH 04/35] fs: have submit_bh users pass in op and flags separately mchristi
2016-02-24 19:47 ` [PATCH 05/35] fs: have ll_rw_block " mchristi
2016-02-24 19:47 ` [PATCH 06/35] direct-io: set bi_op to REQ_OP mchristi
2016-02-24 19:47 ` [PATCH 07/35] btrfs: have submit_one_bio users setup bio bi_op mchristi
2016-02-24 19:47 ` [PATCH 08/35] btrfs: set bi_op tp REQ_OP mchristi
2016-02-24 19:47 ` [PATCH 09/35] btrfs: update __btrfs_map_block for bi_op transition mchristi
2016-02-24 19:47 ` [PATCH 10/35] btrfs: don't pass rq_flag_bits if there is a bio mchristi
2016-02-24 19:47 ` [PATCH 11/35] f2fs: set bi_op to REQ_OP mchristi
2016-02-24 19:47 ` mchristi [this message]
2016-02-24 19:47 ` [PATCH 13/35] xfs: " mchristi
2016-02-24 19:47 ` [PATCH 14/35] hfsplus: " mchristi
2016-02-24 19:47 ` [PATCH 15/35] mpage: " mchristi
2016-02-24 19:47 ` [PATCH 16/35] nilfs: " mchristi
2016-02-24 19:47 ` [PATCH 17/35] ocfs2: " mchristi
2016-02-24 19:47 ` [PATCH 18/35] pm: " mchristi
2016-02-24 19:47 ` [PATCH 19/35] dm: " mchristi
2016-02-24 19:47 ` [PATCH 20/35] dm: pass dm stats data dir instead of bi_rw mchristi
2016-02-24 19:47 ` [PATCH 21/35] bcache: set bi_op to REQ_OP mchristi
2016-02-24 19:47 ` [PATCH 22/35] drbd: " mchristi
2016-02-24 19:48 ` [PATCH 23/35] md/raid: " mchristi
2016-02-24 19:48 ` [PATCH 24/35] xen: " mchristi
2016-02-24 19:48 ` [PATCH 25/35] target: " mchristi
2016-02-24 19:48 ` [PATCH 26/35] block: set op " mchristi
2016-02-24 22:10 ` kbuild test robot
2016-02-24 19:48 ` [PATCH 27/35] drivers: set request " mchristi
2016-02-24 19:48 ` [PATCH 28/35] blktrace: get op from req->op/bio->bi_op mchristi
2016-02-24 19:48 ` [PATCH 29/35] ide cd: do not set REQ_WRITE on requests mchristi
2016-02-24 19:48 ` [PATCH 30/35] block, fs, drivers: do not test bi_rw for REQ_OPs mchristi
2016-02-24 19:48 ` [PATCH 31/35] block, fs: remove old REQ definitions mchristi
2016-02-25 0:54 ` kbuild test robot
2016-02-24 19:48 ` [PATCH 32/35] block: shrink bi_rw and bi_op mchristi
2016-02-24 19:48 ` [PATCH 33/35] block, drivers: add REQ_OP_FLUSH operation mchristi
2016-02-24 19:48 ` [PATCH 34/35] block: add QUEUE_FLAGs for flush and fua mchristi
2016-02-24 19:48 ` [PATCH 35/35] block, drivers, fs: rename REQ_FLUSH to REQ_PREFLUSH mchristi
2016-02-29 17:13 ` [PATCH 00/35 v4] separate operations from flags in the bio/request structs Christoph Hellwig
2016-02-29 17:30 ` Mike Christie
-- strict thread matches above, loose matches on Subject: below --
2016-01-11 20:20 [PATCH 00/35 v3] eparate " mchristi
2016-01-11 20:21 ` [PATCH 12/35] gfs2: set bi_op to REQ_OP mchristi
2016-01-05 20:53 [PATCH 00/35 v2] separate operations from flags in the bio/request structs mchristi
2016-01-05 20:53 ` [PATCH 12/35] gfs2: set bi_op to REQ_OP 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=1456343292-14535-13-git-send-email-mchristi@redhat.com \
--to=mchristi@redhat.com \
--cc=dm-devel@redhat.com \
--cc=drbd-dev@lists.linbit.com \
--cc=konrad.wilk@oracle.com \
--cc=lars.ellenberg@linbit.com \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-raid@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=ocfs2-devel@oss.oracle.com \
--cc=osd-dev@open-osd.org \
--cc=philipp.reisner@linbit.com \
--cc=target-devel@vger.kernel.org \
--cc=xfs@oss.sgi.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;
as well as URLs for NNTP newsgroup(s).