mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
block: unify flags for struct bio and struct request
Remove the current bio flags and reuse the request flags for the bio, too. This allows to more easily trace the type of I/O from the filesystem down to the block driver. There were two flags in the bio that were missing in the requests: BIO_RW_UNPLUG and BIO_RW_AHEAD. Also I've renamed two request flags that had a superflous RW in them. Note that the flags are in bio.h despite having the REQ_ name - as blkdev.h includes bio.h that is the only way to go for now. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
33659ebbae
commit
7b6d91daee
47 changed files with 242 additions and 289 deletions
5
fs/bio.c
5
fs/bio.c
|
|
@ -843,7 +843,8 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
|
|||
if (!bio)
|
||||
goto out_bmd;
|
||||
|
||||
bio->bi_rw |= (!write_to_vm << BIO_RW);
|
||||
if (!write_to_vm)
|
||||
bio->bi_rw |= REQ_WRITE;
|
||||
|
||||
ret = 0;
|
||||
|
||||
|
|
@ -1024,7 +1025,7 @@ static struct bio *__bio_map_user_iov(struct request_queue *q,
|
|||
* set data direction, and check if mapped pages need bouncing
|
||||
*/
|
||||
if (!write_to_vm)
|
||||
bio->bi_rw |= (1 << BIO_RW);
|
||||
bio->bi_rw |= REQ_WRITE;
|
||||
|
||||
bio->bi_bdev = bdev;
|
||||
bio->bi_flags |= (1 << BIO_USER_MAPPED);
|
||||
|
|
|
|||
Loading…
Reference in a new issue