diff options
author | David Sterba <dsterba@suse.com> | 2021-07-27 15:47:09 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-05-16 18:17:31 +0300 |
commit | 2a5232a8cef299a28536b4bb32eb5f75d0002293 (patch) | |
tree | d6d8fd1bb79255e48cd85e19e8e68e925a8a4fc6 /fs/btrfs/extent_io.h | |
parent | 572f3dad5221c98d8c8507f2b6373780751b90d9 (diff) | |
download | linux-2a5232a8cef299a28536b4bb32eb5f75d0002293.tar.xz |
btrfs: simplify handling of bio_ctrl::bio_flags
The bio_flags are used only to encode the compression and there are no
other EXTENT_BIO_* flags, so the compress type can be stored directly.
The struct member name is left unchanged and will be cleaned in later
patches.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r-- | fs/btrfs/extent_io.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index b390ec79f9a8..ba793cb7a3a2 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -9,13 +9,6 @@ #include <linux/btrfs_tree.h> #include "ulist.h" -/* - * flags for bio submission. The high bits indicate the compression - * type for this bio - */ -#define EXTENT_BIO_COMPRESSED 1 -#define EXTENT_BIO_FLAG_SHIFT 16 - enum { EXTENT_BUFFER_UPTODATE, EXTENT_BUFFER_DIRTY, @@ -150,12 +143,12 @@ static inline void extent_changeset_free(struct extent_changeset *changeset) static inline void extent_set_compress_type(unsigned long *bio_flags, int compress_type) { - *bio_flags |= compress_type << EXTENT_BIO_FLAG_SHIFT; + *bio_flags = compress_type; } static inline int extent_compress_type(unsigned long bio_flags) { - return bio_flags >> EXTENT_BIO_FLAG_SHIFT; + return bio_flags; } struct extent_map_tree; |