diff options
| author | Christoph Hellwig <[email protected]> | 2020-01-24 01:01:34 +0800 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2020-01-23 11:40:01 -0700 |
| commit | 6321bef028de43724c47cfa7f9dee69ecb783796 (patch) | |
| tree | 2662f6f43b7ee040d48c2e9a049b8ab821ebae9b /include/uapi/linux | |
| parent | 475389ae5c08656f8bb5cc3adc88a531c7c4877f (diff) | |
bcache: use read_cache_page_gfp to read the superblock
Avoid a pointless dependency on buffer heads in bcache by simply open
coding reading a single page. Also add a SB_OFFSET define for the
byte offset of the superblock instead of using magic numbers.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Coly Li <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/bcache.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/bcache.h b/include/uapi/linux/bcache.h index 1d8b3a9fc080..9a1965c6c3d0 100644 --- a/include/uapi/linux/bcache.h +++ b/include/uapi/linux/bcache.h @@ -148,6 +148,7 @@ static inline struct bkey *bkey_idx(const struct bkey *k, unsigned int nr_keys) #define BCACHE_SB_MAX_VERSION 4 #define SB_SECTOR 8 +#define SB_OFFSET (SB_SECTOR << SECTOR_SHIFT) #define SB_SIZE 4096 #define SB_LABEL_SIZE 32 #define SB_JOURNAL_BUCKETS 256U |