Commit 80cb3836 authored by David Sterba's avatar David Sterba

btrfs: switch EXTENT_BUFFER_* to enums

We can use simple enum for values that are not part of on-disk format:
extent buffer flags;
Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 61fa90c1
...@@ -37,18 +37,22 @@ ...@@ -37,18 +37,22 @@
#define EXTENT_BIO_COMPRESSED 1 #define EXTENT_BIO_COMPRESSED 1
#define EXTENT_BIO_FLAG_SHIFT 16 #define EXTENT_BIO_FLAG_SHIFT 16
/* these are bit numbers for test/set bit */ enum {
#define EXTENT_BUFFER_UPTODATE 0 EXTENT_BUFFER_UPTODATE,
#define EXTENT_BUFFER_DIRTY 2 EXTENT_BUFFER_DIRTY,
#define EXTENT_BUFFER_CORRUPT 3 EXTENT_BUFFER_CORRUPT,
#define EXTENT_BUFFER_READAHEAD 4 /* this got triggered by readahead */ /* this got triggered by readahead */
#define EXTENT_BUFFER_TREE_REF 5 EXTENT_BUFFER_READAHEAD,
#define EXTENT_BUFFER_STALE 6 EXTENT_BUFFER_TREE_REF,
#define EXTENT_BUFFER_WRITEBACK 7 EXTENT_BUFFER_STALE,
#define EXTENT_BUFFER_READ_ERR 8 /* read IO error */ EXTENT_BUFFER_WRITEBACK,
#define EXTENT_BUFFER_UNMAPPED 9 /* read IO error */
#define EXTENT_BUFFER_IN_TREE 10 EXTENT_BUFFER_READ_ERR,
#define EXTENT_BUFFER_WRITE_ERR 11 /* write IO error */ EXTENT_BUFFER_UNMAPPED,
EXTENT_BUFFER_IN_TREE,
/* write IO error */
EXTENT_BUFFER_WRITE_ERR,
};
/* these are flags for __process_pages_contig */ /* these are flags for __process_pages_contig */
#define PAGE_UNLOCK (1 << 0) #define PAGE_UNLOCK (1 << 0)
......
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