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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -148,6 +148,7 @@ static inline struct bkey *bkey_idx(const struct bkey *k, unsigned int nr_keys) · 147 unmodified lines | |||
| 148 | #define BCACHE_SB_MAX_VERSION 4 | 148 | #define BCACHE_SB_MAX_VERSION 4 |
| 149 | 149 | ||
| 150 | #define SB_SECTOR 8 | 150 | #define SB_SECTOR 8 |
| 151 | #define SB_OFFSET (SB_SECTOR << SECTOR_SHIFT) | ||
| 151 | #define SB_SIZE 4096 | 152 | #define SB_SIZE 4096 |
| 152 | #define SB_LABEL_SIZE 32 | 153 | #define SB_LABEL_SIZE 32 |
| 153 | #define SB_JOURNAL_BUCKETS 256U | 154 | #define SB_JOURNAL_BUCKETS 256U |