Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1262634
| From | mchristi@redhat.com |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 13/32] mm: prepare for bi_rw split |
| Date | 2015-11-04 23:10 +0100 |
| Message-ID | <qrepK-6lw-37@gated-at.bofh.it> (permalink) |
| References | <qrepI-6lw-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Mike Christie <mchristi@redhat.com>
This patch prepares mm's submit_bio use 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 will now pass them in seperately.
This patch modifies the code related to the submit_bio calls
so the flags and operation are seperated. When this is done
for all code, one of the later patches in the series will
the actual submit_bio call, so the patches are bisectable.
Signed-off-by: Mike Christie <mchristi@redhat.com>
---
mm/page_io.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/mm/page_io.c b/mm/page_io.c
index b995a5b..ec7ad22 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -253,7 +253,8 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
bio_end_io_t end_write_func)
{
struct bio *bio;
- int ret, rw = WRITE;
+ int ret;
+ u32 op_flags = 0;
struct swap_info_struct *sis = page_swap_info(page);
if (sis->flags & SWP_FILE) {
@@ -312,11 +313,11 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
goto out;
}
if (wbc->sync_mode == WB_SYNC_ALL)
- rw |= REQ_SYNC;
+ op_flags |= REQ_SYNC;
count_vm_event(PSWPOUT);
set_page_writeback(page);
unlock_page(page);
- submit_bio(rw, bio);
+ submit_bio(REQ_OP_WRITE | op_flags, bio);
out:
return ret;
}
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RESEND RFC PATCH 00/32] separate operations from flags in the bio/request structs mchristi@redhat.com - 2015-11-04 23:10 +0100
[PATCH 32/32] block: remove __REQ op defs and reduce bi_op/bi_rw sizes mchristi@redhat.com - 2015-11-04 23:10 +0100
Re: [PATCH 32/32] block: remove __REQ op defs and reduce bi_op/bi_rw sizes Christoph Hellwig <hch@infradead.org> - 2015-11-07 11:30 +0100
[PATCH 11/32] gfs2: prepare for bi_rw split mchristi@redhat.com - 2015-11-04 23:10 +0100
[PATCH 23/32] block/fs: pass in op and flags to ll_rw_block mchristi@redhat.com - 2015-11-04 23:10 +0100
[PATCH 13/32] mm: prepare for bi_rw split mchristi@redhat.com - 2015-11-04 23:10 +0100
[PATCH 24/32] dm: pass dm stats data dir instead of bi_rw mchristi@redhat.com - 2015-11-04 23:20 +0100
[PATCH 21/32] bcache: set bi_op to REQ_OP mchristi@redhat.com - 2015-11-04 23:20 +0100
[PATCH 27/32] cfq/cgroup: pass operation and flags seperately mchristi@redhat.com - 2015-11-04 23:20 +0100
[PATCH 12/32] xfs: prepare for bi_rw split mchristi@redhat.com - 2015-11-04 23:20 +0100
[PATCH 22/32] block/fs/drivers: set bi_op to REQ_OP mchristi@redhat.com - 2015-11-04 23:20 +0100
[PATCH 20/32] md: set bi_op to REQ_OP mchristi@redhat.com - 2015-11-04 23:20 +0100
[PATCH 30/32] drbd: don't use bi_rw for operations mchristi@redhat.com - 2015-11-04 23:20 +0100
[PATCH 28/32] block/fs/drivers: use bio/rq_data_dir helpers mchristi@redhat.com - 2015-11-04 23:20 +0100
[PATCH 18/32] drbd: set bio bi_op to REQ_OP mchristi@redhat.com - 2015-11-04 23:20 +0100
[PATCH 26/32] ide cd: do not set REQ_WRITE on requests. mchristi@redhat.com - 2015-11-04 23:20 +0100
[PATCH 25/32] block: add operation field to request struct mchristi@redhat.com - 2015-11-04 23:20 +0100
[PATCH 19/32] block: add helper to get data dir from op mchristi@redhat.com - 2015-11-04 23:20 +0100
Re: [dm-devel] [PATCH 19/32] block: add helper to get data dir from op Mike Christie <mchristi@redhat.com> - 2015-11-05 18:40 +0100
Re: [dm-devel] [PATCH 19/32] block: add helper to get data dir from op Christoph Hellwig <hch@infradead.org> - 2015-11-07 11:20 +0100
[PATCH 29/32] block/drivers: rm request cmd_flags REQ_OP use mchristi@redhat.com - 2015-11-04 23:20 +0100
[PATCH 05/32] drbd: prepare drbd for bi_rw split mchristi@redhat.com - 2015-11-04 23:30 +0100
[PATCH 03/32] dio/btrfs: prep dio->submit_bio users for bi_rw split. mchristi@redhat.com - 2015-11-04 23:30 +0100
[PATCH 16/32] block/fs/md: pass in op and flags to submit_bh mchristi@redhat.com - 2015-11-04 23:30 +0100
[PATCH 07/32] dm: prepare for bi_rw split mchristi@redhat.com - 2015-11-04 23:30 +0100
[PATCH 10/32] f2fs: prepare for bi_rw split mchristi@redhat.com - 2015-11-04 23:30 +0100
[PATCH 15/32] btrfs: prepare for bi_rw split mchristi@redhat.com - 2015-11-04 23:30 +0100
[PATCH 08/32] target: prepare for bi_rw split mchristi@redhat.com - 2015-11-04 23:30 +0100
[PATCH 17/32] block: add operation field to bio struct mchristi@redhat.com - 2015-11-04 23:30 +0100
[PATCH 06/32] xen blkback: prepare for bi_rw split mchristi@redhat.com - 2015-11-04 23:30 +0100
[PATCH 02/32] block/fs/mm: prepare submit_bio_wait users for bi_rw split mchristi@redhat.com - 2015-11-04 23:30 +0100
[PATCH 14/32] block/fs/mm: pass in op and flags to submit_bio mchristi@redhat.com - 2015-11-04 23:30 +0100
[PATCH 01/32] block/fs: add REQ_OP definitions. mchristi@redhat.com - 2015-11-04 23:40 +0100
Re: [RESEND RFC PATCH 00/32] separate operations from flags in the bio/request structs Bob Peterson <rpeterso@redhat.com> - 2015-11-05 17:50 +0100
Re: [RESEND RFC PATCH 00/32] separate operations from flags in the bio/request structs Christoph Hellwig <hch@infradead.org> - 2015-11-07 11:20 +0100
csiph-web