block: rename bio bi_rw to bi_opf
Since commit 63a4cc2486
, bio->bi_rw contains flags in the lower
portion and the op code in the higher portions. This means that
old code that relies on manually setting bi_rw is most likely
going to be broken. Instead of letting that brokeness linger,
rename the member, to force old and out-of-tree code to break
at compile time instead of at runtime.
No intended functional changes in this commit.
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
@@ -8209,7 +8209,7 @@ static void btrfs_end_dio_bio(struct bio *bio)
|
||||
if (err)
|
||||
btrfs_warn(BTRFS_I(dip->inode)->root->fs_info,
|
||||
"direct IO failed ino %llu rw %d,%u sector %#Lx len %u err no %d",
|
||||
btrfs_ino(dip->inode), bio_op(bio), bio->bi_rw,
|
||||
btrfs_ino(dip->inode), bio_op(bio), bio->bi_opf,
|
||||
(unsigned long long)bio->bi_iter.bi_sector,
|
||||
bio->bi_iter.bi_size, err);
|
||||
|
||||
@@ -8373,7 +8373,7 @@ static int btrfs_submit_direct_hook(struct btrfs_dio_private *dip,
|
||||
if (!bio)
|
||||
return -ENOMEM;
|
||||
|
||||
bio_set_op_attrs(bio, bio_op(orig_bio), orig_bio->bi_rw);
|
||||
bio_set_op_attrs(bio, bio_op(orig_bio), orig_bio->bi_opf);
|
||||
bio->bi_private = dip;
|
||||
bio->bi_end_io = btrfs_end_dio_bio;
|
||||
btrfs_io_bio(bio)->logical = file_offset;
|
||||
@@ -8411,7 +8411,7 @@ next_block:
|
||||
start_sector, GFP_NOFS);
|
||||
if (!bio)
|
||||
goto out_err;
|
||||
bio_set_op_attrs(bio, bio_op(orig_bio), orig_bio->bi_rw);
|
||||
bio_set_op_attrs(bio, bio_op(orig_bio), orig_bio->bi_opf);
|
||||
bio->bi_private = dip;
|
||||
bio->bi_end_io = btrfs_end_dio_bio;
|
||||
btrfs_io_bio(bio)->logical = file_offset;
|
||||
|
Reference in New Issue
Block a user