Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bcache: use REQ_PRIO to indicate bio for metadata

In cached_dev_cache_miss() and check_should_bypass(), REQ_META is used
to check whether a bio is for metadata request. REQ_META is used for
blktrace, the correct REQ_ flag should be REQ_PRIO. This flag means the
bio should be prior to other bio, and frequently be used to indicate
metadata io in file system code.

This patch replaces REQ_META with correct flag REQ_PRIO.

CC Adam Manzanares because he explains to me what REQ_PRIO is for.

Signed-off-by: Coly Li <colyli@suse.de>
Cc: Adam Manzanares <adam.manzanares@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Coly Li and committed by
Jens Axboe
752f66a7 502b2915

+2 -2
+2 -2
drivers/md/bcache/request.c
··· 395 395 * unless the read-ahead request is for metadata (eg, for gfs2). 396 396 */ 397 397 if (bio->bi_opf & (REQ_RAHEAD|REQ_BACKGROUND) && 398 - !(bio->bi_opf & REQ_META)) 398 + !(bio->bi_opf & REQ_PRIO)) 399 399 goto skip; 400 400 401 401 if (bio->bi_iter.bi_sector & (c->sb.block_size - 1) || ··· 877 877 } 878 878 879 879 if (!(bio->bi_opf & REQ_RAHEAD) && 880 - !(bio->bi_opf & REQ_META) && 880 + !(bio->bi_opf & REQ_PRIO) && 881 881 s->iop.c->gc_stats.in_use < CUTOFF_CACHE_READA) 882 882 reada = min_t(sector_t, dc->readahead >> 9, 883 883 get_capacity(bio->bi_disk) - bio_end_sector(bio));