mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Merge branch 'for-4.11/block' into for-4.11/rq-refactor
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
commit
f924ba70c1
38 changed files with 3099 additions and 676 deletions
|
|
@ -666,7 +666,7 @@ static inline struct search *search_alloc(struct bio *bio,
|
|||
s->iop.write_prio = 0;
|
||||
s->iop.error = 0;
|
||||
s->iop.flags = 0;
|
||||
s->iop.flush_journal = (bio->bi_opf & (REQ_PREFLUSH|REQ_FUA)) != 0;
|
||||
s->iop.flush_journal = op_is_flush(bio->bi_opf);
|
||||
s->iop.wq = bcache_wq;
|
||||
|
||||
return s;
|
||||
|
|
|
|||
|
|
@ -787,8 +787,7 @@ static void check_if_tick_bio_needed(struct cache *cache, struct bio *bio)
|
|||
struct per_bio_data *pb = get_per_bio_data(bio, pb_data_size);
|
||||
|
||||
spin_lock_irqsave(&cache->lock, flags);
|
||||
if (cache->need_tick_bio &&
|
||||
!(bio->bi_opf & (REQ_FUA | REQ_PREFLUSH)) &&
|
||||
if (cache->need_tick_bio && !op_is_flush(bio->bi_opf) &&
|
||||
bio_op(bio) != REQ_OP_DISCARD) {
|
||||
pb->tick = true;
|
||||
cache->need_tick_bio = false;
|
||||
|
|
@ -828,11 +827,6 @@ static dm_oblock_t get_bio_block(struct cache *cache, struct bio *bio)
|
|||
return to_oblock(block_nr);
|
||||
}
|
||||
|
||||
static int bio_triggers_commit(struct cache *cache, struct bio *bio)
|
||||
{
|
||||
return bio->bi_opf & (REQ_PREFLUSH | REQ_FUA);
|
||||
}
|
||||
|
||||
/*
|
||||
* You must increment the deferred set whilst the prison cell is held. To
|
||||
* encourage this, we ask for 'cell' to be passed in.
|
||||
|
|
@ -884,7 +878,7 @@ static void issue(struct cache *cache, struct bio *bio)
|
|||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (!bio_triggers_commit(cache, bio)) {
|
||||
if (!op_is_flush(bio->bi_opf)) {
|
||||
accounted_request(cache, bio);
|
||||
return;
|
||||
}
|
||||
|
|
@ -1069,8 +1063,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_opf & (REQ_PREFLUSH | REQ_FUA);
|
||||
return bio_op(bio) == REQ_OP_DISCARD || op_is_flush(bio->bi_opf);
|
||||
}
|
||||
|
||||
static void __cell_defer(struct cache *cache, struct dm_bio_prison_cell *cell)
|
||||
|
|
|
|||
|
|
@ -699,7 +699,7 @@ static void remap_to_origin(struct thin_c *tc, struct bio *bio)
|
|||
|
||||
static int bio_triggers_commit(struct thin_c *tc, struct bio *bio)
|
||||
{
|
||||
return (bio->bi_opf & (REQ_PREFLUSH | REQ_FUA)) &&
|
||||
return op_is_flush(bio->bi_opf) &&
|
||||
dm_thin_changed_this_transaction(tc->td);
|
||||
}
|
||||
|
||||
|
|
@ -870,8 +870,7 @@ static void __inc_remap_and_issue_cell(void *context,
|
|||
struct bio *bio;
|
||||
|
||||
while ((bio = bio_list_pop(&cell->bios))) {
|
||||
if (bio->bi_opf & (REQ_PREFLUSH | REQ_FUA) ||
|
||||
bio_op(bio) == REQ_OP_DISCARD)
|
||||
if (op_is_flush(bio->bi_opf) || bio_op(bio) == REQ_OP_DISCARD)
|
||||
bio_list_add(&info->defer_bios, bio);
|
||||
else {
|
||||
inc_all_io_entry(info->tc->pool, bio);
|
||||
|
|
@ -1716,9 +1715,8 @@ static void __remap_and_issue_shared_cell(void *context,
|
|||
struct bio *bio;
|
||||
|
||||
while ((bio = bio_list_pop(&cell->bios))) {
|
||||
if ((bio_data_dir(bio) == WRITE) ||
|
||||
(bio->bi_opf & (REQ_PREFLUSH | REQ_FUA) ||
|
||||
bio_op(bio) == REQ_OP_DISCARD))
|
||||
if (bio_data_dir(bio) == WRITE || op_is_flush(bio->bi_opf) ||
|
||||
bio_op(bio) == REQ_OP_DISCARD)
|
||||
bio_list_add(&info->defer_bios, bio);
|
||||
else {
|
||||
struct dm_thin_endio_hook *h = dm_per_bio_data(bio, sizeof(struct dm_thin_endio_hook));;
|
||||
|
|
@ -2635,8 +2633,7 @@ static int thin_bio_map(struct dm_target *ti, struct bio *bio)
|
|||
return DM_MAPIO_SUBMITTED;
|
||||
}
|
||||
|
||||
if (bio->bi_opf & (REQ_PREFLUSH | REQ_FUA) ||
|
||||
bio_op(bio) == REQ_OP_DISCARD) {
|
||||
if (op_is_flush(bio->bi_opf) || bio_op(bio) == REQ_OP_DISCARD) {
|
||||
thin_defer_bio_with_throttle(tc, bio);
|
||||
return DM_MAPIO_SUBMITTED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue