block, drivers, fs: rename REQ_FLUSH to REQ_PREFLUSH
To avoid confusion between REQ_OP_FLUSH, which is handled by request_fn drivers, and upper layers requesting the block layer perform a flush sequence along with possibly a WRITE, this patch renames REQ_FLUSH to REQ_PREFLUSH. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:

committed by
Jens Axboe

parent
a418090aa8
commit
28a8f0d317
@@ -788,7 +788,7 @@ static void check_if_tick_bio_needed(struct cache *cache, struct bio *bio)
|
||||
|
||||
spin_lock_irqsave(&cache->lock, flags);
|
||||
if (cache->need_tick_bio &&
|
||||
!(bio->bi_rw & (REQ_FUA | REQ_FLUSH)) &&
|
||||
!(bio->bi_rw & (REQ_FUA | REQ_PREFLUSH)) &&
|
||||
bio_op(bio) != REQ_OP_DISCARD) {
|
||||
pb->tick = true;
|
||||
cache->need_tick_bio = false;
|
||||
@@ -830,7 +830,7 @@ static dm_oblock_t get_bio_block(struct cache *cache, struct bio *bio)
|
||||
|
||||
static int bio_triggers_commit(struct cache *cache, struct bio *bio)
|
||||
{
|
||||
return bio->bi_rw & (REQ_FLUSH | REQ_FUA);
|
||||
return bio->bi_rw & (REQ_PREFLUSH | REQ_FUA);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1069,7 +1069,7 @@ static void dec_io_migrations(struct cache *cache)
|
||||
static bool discard_or_flush(struct bio *bio)
|
||||
{
|
||||
return bio_op(bio) == REQ_OP_DISCARD ||
|
||||
bio->bi_rw & (REQ_FLUSH | REQ_FUA);
|
||||
bio->bi_rw & (REQ_PREFLUSH | REQ_FUA);
|
||||
}
|
||||
|
||||
static void __cell_defer(struct cache *cache, struct dm_bio_prison_cell *cell)
|
||||
@@ -1614,8 +1614,8 @@ static void process_flush_bio(struct cache *cache, struct bio *bio)
|
||||
remap_to_cache(cache, bio, 0);
|
||||
|
||||
/*
|
||||
* REQ_FLUSH is not directed at any particular block so we don't
|
||||
* need to inc_ds(). REQ_FUA's are split into a write + REQ_FLUSH
|
||||
* REQ_PREFLUSH is not directed at any particular block so we don't
|
||||
* need to inc_ds(). REQ_FUA's are split into a write + REQ_PREFLUSH
|
||||
* by dm-core.
|
||||
*/
|
||||
issue(cache, bio);
|
||||
@@ -1980,7 +1980,7 @@ static void process_deferred_bios(struct cache *cache)
|
||||
|
||||
bio = bio_list_pop(&bios);
|
||||
|
||||
if (bio->bi_rw & REQ_FLUSH)
|
||||
if (bio->bi_rw & REQ_PREFLUSH)
|
||||
process_flush_bio(cache, bio);
|
||||
else if (bio_op(bio) == REQ_OP_DISCARD)
|
||||
process_discard_bio(cache, &structs, bio);
|
||||
|
Reference in New Issue
Block a user