aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/blktrace.c2
-rw-r--r--drivers/md/dm-io.c2
-rw-r--r--drivers/md/dm-kcopyd.c2
-rw-r--r--drivers/md/md.c4
-rw-r--r--include/linux/bio.h2
-rw-r--r--include/linux/blktrace_api.h1
-rw-r--r--include/linux/fs.h6
-rw-r--r--kernel/power/swap.c5
-rw-r--r--mm/page_io.c2
9 files changed, 13 insertions, 13 deletions
diff --git a/block/blktrace.c b/block/blktrace.c
index 39cc3bfe56e4..7cf9d1ff45a0 100644
--- a/block/blktrace.c
+++ b/block/blktrace.c
@@ -142,7 +142,7 @@ static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
142 142
143 what |= ddir_act[rw & WRITE]; 143 what |= ddir_act[rw & WRITE];
144 what |= MASK_TC_BIT(rw, BARRIER); 144 what |= MASK_TC_BIT(rw, BARRIER);
145 what |= MASK_TC_BIT(rw, SYNC); 145 what |= MASK_TC_BIT(rw, SYNCIO);
146 what |= MASK_TC_BIT(rw, AHEAD); 146 what |= MASK_TC_BIT(rw, AHEAD);
147 what |= MASK_TC_BIT(rw, META); 147 what |= MASK_TC_BIT(rw, META);
148 what |= MASK_TC_BIT(rw, DISCARD); 148 what |= MASK_TC_BIT(rw, DISCARD);
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c
index a34338567a2a..f14813be4eff 100644
--- a/drivers/md/dm-io.c
+++ b/drivers/md/dm-io.c
@@ -328,7 +328,7 @@ static void dispatch_io(int rw, unsigned int num_regions,
328 struct dpages old_pages = *dp; 328 struct dpages old_pages = *dp;
329 329
330 if (sync) 330 if (sync)
331 rw |= (1 << BIO_RW_SYNC); 331 rw |= (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG);
332 332
333 /* 333 /*
334 * For multiple regions we need to be careful to rewind 334 * For multiple regions we need to be careful to rewind
diff --git a/drivers/md/dm-kcopyd.c b/drivers/md/dm-kcopyd.c
index 3073618269ea..0a225da21272 100644
--- a/drivers/md/dm-kcopyd.c
+++ b/drivers/md/dm-kcopyd.c
@@ -344,7 +344,7 @@ static int run_io_job(struct kcopyd_job *job)
344{ 344{
345 int r; 345 int r;
346 struct dm_io_request io_req = { 346 struct dm_io_request io_req = {
347 .bi_rw = job->rw | (1 << BIO_RW_SYNC), 347 .bi_rw = job->rw | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG),
348 .mem.type = DM_IO_PAGE_LIST, 348 .mem.type = DM_IO_PAGE_LIST,
349 .mem.ptr.pl = job->pages, 349 .mem.ptr.pl = job->pages,
350 .mem.offset = job->offset, 350 .mem.offset = job->offset,
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 4495104f6c9f..03b4cd0a6344 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -474,7 +474,7 @@ void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev,
474 * causes ENOTSUPP, we allocate a spare bio... 474 * causes ENOTSUPP, we allocate a spare bio...
475 */ 475 */
476 struct bio *bio = bio_alloc(GFP_NOIO, 1); 476 struct bio *bio = bio_alloc(GFP_NOIO, 1);
477 int rw = (1<<BIO_RW) | (1<<BIO_RW_SYNC); 477 int rw = (1<<BIO_RW) | (1<<BIO_RW_SYNCIO) | (1<<BIO_RW_UNPLUG);
478 478
479 bio->bi_bdev = rdev->bdev; 479 bio->bi_bdev = rdev->bdev;
480 bio->bi_sector = sector; 480 bio->bi_sector = sector;
@@ -531,7 +531,7 @@ int sync_page_io(struct block_device *bdev, sector_t sector, int size,
531 struct completion event; 531 struct completion event;
532 int ret; 532 int ret;
533 533
534 rw |= (1 << BIO_RW_SYNC); 534 rw |= (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG);
535 535
536 bio->bi_bdev = bdev; 536 bio->bi_bdev = bdev;
537 bio->bi_sector = sector; 537 bio->bi_sector = sector;
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 2aa283ab062b..1b16108a5417 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -171,8 +171,6 @@ struct bio {
171#define BIO_RW_FAILFAST_TRANSPORT 8 171#define BIO_RW_FAILFAST_TRANSPORT 8
172#define BIO_RW_FAILFAST_DRIVER 9 172#define BIO_RW_FAILFAST_DRIVER 9
173 173
174#define BIO_RW_SYNC (BIO_RW_SYNCIO | BIO_RW_UNPLUG)
175
176#define bio_rw_flagged(bio, flag) ((bio)->bi_rw & (1 << (flag))) 174#define bio_rw_flagged(bio, flag) ((bio)->bi_rw & (1 << (flag)))
177 175
178/* 176/*
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
index 25379cba2370..6e915878e88c 100644
--- a/include/linux/blktrace_api.h
+++ b/include/linux/blktrace_api.h
@@ -15,6 +15,7 @@ enum blktrace_cat {
15 BLK_TC_WRITE = 1 << 1, /* writes */ 15 BLK_TC_WRITE = 1 << 1, /* writes */
16 BLK_TC_BARRIER = 1 << 2, /* barrier */ 16 BLK_TC_BARRIER = 1 << 2, /* barrier */
17 BLK_TC_SYNC = 1 << 3, /* sync IO */ 17 BLK_TC_SYNC = 1 << 3, /* sync IO */
18 BLK_TC_SYNCIO = BLK_TC_SYNC,
18 BLK_TC_QUEUE = 1 << 4, /* queueing/merging */ 19 BLK_TC_QUEUE = 1 << 4, /* queueing/merging */
19 BLK_TC_REQUEUE = 1 << 5, /* requeueing */ 20 BLK_TC_REQUEUE = 1 << 5, /* requeueing */
20 BLK_TC_ISSUE = 1 << 6, /* issue */ 21 BLK_TC_ISSUE = 1 << 6, /* issue */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 6022f44043f2..67857dc16365 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -87,10 +87,10 @@ struct inodes_stat_t {
87#define WRITE 1 87#define WRITE 1
88#define READA 2 /* read-ahead - don't block if no resources */ 88#define READA 2 /* read-ahead - don't block if no resources */
89#define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */ 89#define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */
90#define READ_SYNC (READ | (1 << BIO_RW_SYNC)) 90#define READ_SYNC (READ | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG))
91#define READ_META (READ | (1 << BIO_RW_META)) 91#define READ_META (READ | (1 << BIO_RW_META))
92#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) 92#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG))
93#define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNC)) 93#define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG))
94#define WRITE_BARRIER (WRITE | (1 << BIO_RW_BARRIER)) 94#define WRITE_BARRIER (WRITE | (1 << BIO_RW_BARRIER))
95#define DISCARD_NOBARRIER (1 << BIO_RW_DISCARD) 95#define DISCARD_NOBARRIER (1 << BIO_RW_DISCARD)
96#define DISCARD_BARRIER ((1 << BIO_RW_DISCARD) | (1 << BIO_RW_BARRIER)) 96#define DISCARD_BARRIER ((1 << BIO_RW_DISCARD) | (1 << BIO_RW_BARRIER))
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 6da14358537c..505f319e489c 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -60,6 +60,7 @@ static struct block_device *resume_bdev;
60static int submit(int rw, pgoff_t page_off, struct page *page, 60static int submit(int rw, pgoff_t page_off, struct page *page,
61 struct bio **bio_chain) 61 struct bio **bio_chain)
62{ 62{
63 const int bio_rw = rw | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG);
63 struct bio *bio; 64 struct bio *bio;
64 65
65 bio = bio_alloc(__GFP_WAIT | __GFP_HIGH, 1); 66 bio = bio_alloc(__GFP_WAIT | __GFP_HIGH, 1);
@@ -80,7 +81,7 @@ static int submit(int rw, pgoff_t page_off, struct page *page,
80 bio_get(bio); 81 bio_get(bio);
81 82
82 if (bio_chain == NULL) { 83 if (bio_chain == NULL) {
83 submit_bio(rw | (1 << BIO_RW_SYNC), bio); 84 submit_bio(bio_rw, bio);
84 wait_on_page_locked(page); 85 wait_on_page_locked(page);
85 if (rw == READ) 86 if (rw == READ)
86 bio_set_pages_dirty(bio); 87 bio_set_pages_dirty(bio);
@@ -90,7 +91,7 @@ static int submit(int rw, pgoff_t page_off, struct page *page,
90 get_page(page); /* These pages are freed later */ 91 get_page(page); /* These pages are freed later */
91 bio->bi_private = *bio_chain; 92 bio->bi_private = *bio_chain;
92 *bio_chain = bio; 93 *bio_chain = bio;
93 submit_bio(rw | (1 << BIO_RW_SYNC), bio); 94 submit_bio(bio_rw, bio);
94 } 95 }
95 return 0; 96 return 0;
96} 97}
diff --git a/mm/page_io.c b/mm/page_io.c
index dc6ce0afbded..3023c475e041 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -111,7 +111,7 @@ int swap_writepage(struct page *page, struct writeback_control *wbc)
111 goto out; 111 goto out;
112 } 112 }
113 if (wbc->sync_mode == WB_SYNC_ALL) 113 if (wbc->sync_mode == WB_SYNC_ALL)
114 rw |= (1 << BIO_RW_SYNC); 114 rw |= (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG);
115 count_vm_event(PSWPOUT); 115 count_vm_event(PSWPOUT);
116 set_page_writeback(page); 116 set_page_writeback(page);
117 unlock_page(page); 117 unlock_page(page);