Commit 295fe46f authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David Sterba

btrfs: remove struct btrfs_bio::is_metadata flag

This flag is unused now, so remove it.  Re-expand the mirror_num field
to 8 bits, and move it to the I/O completion internal section of the
structure.
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 0d3acb25
...@@ -30,16 +30,6 @@ typedef void (*btrfs_bio_end_io_t)(struct btrfs_bio *bbio); ...@@ -30,16 +30,6 @@ typedef void (*btrfs_bio_end_io_t)(struct btrfs_bio *bbio);
* passed to btrfs_submit_bio for mapping to the physical devices. * passed to btrfs_submit_bio for mapping to the physical devices.
*/ */
struct btrfs_bio { struct btrfs_bio {
unsigned int mirror_num:7;
/*
* Extra indicator for metadata bios.
* For some btrfs bios they use pages without a mapping, thus
* we can not rely on page->mapping->host to determine if
* it's a metadata bio.
*/
unsigned int is_metadata:1;
/* Inode and offset into it that this I/O operates on. */ /* Inode and offset into it that this I/O operates on. */
struct btrfs_inode *inode; struct btrfs_inode *inode;
u64 file_offset; u64 file_offset;
...@@ -64,6 +54,7 @@ struct btrfs_bio { ...@@ -64,6 +54,7 @@ struct btrfs_bio {
void *private; void *private;
/* For internal use in read end I/O handling */ /* For internal use in read end I/O handling */
unsigned int mirror_num;
struct work_struct end_io_work; struct work_struct end_io_work;
/* /*
......
...@@ -846,7 +846,6 @@ void btrfs_submit_metadata_bio(struct btrfs_inode *inode, struct bio *bio, int m ...@@ -846,7 +846,6 @@ void btrfs_submit_metadata_bio(struct btrfs_inode *inode, struct bio *bio, int m
blk_status_t ret; blk_status_t ret;
bio->bi_opf |= REQ_META; bio->bi_opf |= REQ_META;
bbio->is_metadata = 1;
if (btrfs_op(bio) != BTRFS_MAP_WRITE) { if (btrfs_op(bio) != BTRFS_MAP_WRITE) {
btrfs_submit_bio(fs_info, bio, mirror_num); btrfs_submit_bio(fs_info, bio, mirror_num);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment