mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-12 00:43:36 -04:00
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 <hch@lst.de> Signed-off-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
475389ae5c
commit
6321bef028
2 changed files with 8 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue