mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
block: seperate bio/request unplug and sync bits
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
1308835fff
commit
213d9417fe
3 changed files with 17 additions and 8 deletions
|
@ -163,12 +163,15 @@ struct bio {
|
|||
#define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */
|
||||
#define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */
|
||||
#define BIO_RW_BARRIER 2
|
||||
#define BIO_RW_SYNC 3
|
||||
#define BIO_RW_META 4
|
||||
#define BIO_RW_DISCARD 5
|
||||
#define BIO_RW_FAILFAST_DEV 6
|
||||
#define BIO_RW_FAILFAST_TRANSPORT 7
|
||||
#define BIO_RW_FAILFAST_DRIVER 8
|
||||
#define BIO_RW_SYNCIO 3
|
||||
#define BIO_RW_UNPLUG 4
|
||||
#define BIO_RW_META 5
|
||||
#define BIO_RW_DISCARD 6
|
||||
#define BIO_RW_FAILFAST_DEV 7
|
||||
#define BIO_RW_FAILFAST_TRANSPORT 8
|
||||
#define BIO_RW_FAILFAST_DRIVER 9
|
||||
|
||||
#define BIO_RW_SYNC (BIO_RW_SYNCIO | BIO_RW_UNPLUG)
|
||||
|
||||
/*
|
||||
* upper 16 bits of bi_rw define the io priority of this bio
|
||||
|
@ -194,7 +197,8 @@ struct bio {
|
|||
#define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx)
|
||||
#define bio_sectors(bio) ((bio)->bi_size >> 9)
|
||||
#define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER))
|
||||
#define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC))
|
||||
#define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNCIO))
|
||||
#define bio_unplug(bio) ((bio)->bi_rw & (1 << BIO_RW_UNPLUG))
|
||||
#define bio_failfast_dev(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DEV))
|
||||
#define bio_failfast_transport(bio) \
|
||||
((bio)->bi_rw & (1 << BIO_RW_FAILFAST_TRANSPORT))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue