Pull block driver updates from Jens Axboe: "Like the core side, not a lot of changes here, just two main items: - Series of patches (via Coly) with fixes for bcache (Coly, Christoph) - MD pull request from Song" * tag 'for-5.6/drivers-2020-01-27' of git://git.kernel.dk/linux-block: (31 commits) bcache: reap from tail of c->btree_cache in bch_mca_scan() bcache: reap c->btree_cache_freeable from the tail in bch_mca_scan() bcache: remove member accessed from struct btree bcache: print written and keys in trace_bcache_btree_write bcache: avoid unnecessary btree nodes flushing in btree_flush_write() bcache: add code comments for state->pool in __btree_sort() lib: crc64: include <linux/crc64.h> for 'crc64_be' bcache: use read_cache_page_gfp to read the superblock bcache: store a pointer to the on-disk sb in the cache and cached_dev structures bcache: return a pointer to the on-disk sb from read_super bcache: transfer the sb_page reference to register_{bdev,cache} bcache: fix use-after-free in register_bcache() bcache: properly initialize 'path' and 'err' in register_bcache() bcache: rework error unwinding in register_bcache bcache: use a separate data structure for the on-disk super block bcache: cached_dev_free needs to put the sb page md/raid1: introduce wait_for_serialization md/raid1: use bucket based mechanism for IO serialization md: introduce a new struct for IO serialization md: don't destroy serial_info_pool if serialize_policy is true ...
Showing the changes to include/uapi/linux (1 of 17 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 | 148 | #define BCACHE_SB_MAX_VERSION 4 |
| 149 | 149 | |
| 150 | 150 | #define SB_SECTOR 8 |
| 151 | +#define SB_OFFSET (SB_SECTOR << SECTOR_SHIFT) | |
| 151 | 152 | #define SB_SIZE 4096 |
| 152 | 153 | #define SB_LABEL_SIZE 32 |
| 153 | 154 | #define SB_JOURNAL_BUCKETS 256U |
| @@ -156,6 +157,57 @@ static inline struct bkey *bkey_idx(const struct bkey *k, unsigned int nr_keys) · 2 unmodified lines | ||
| 156 | 157 | |
| 157 | 158 | #define BDEV_DATA_START_DEFAULT 16 /* sectors */ |
| 158 | 159 | |
| 160 | +struct cache_sb_disk { | |
| 161 | + __le64 csum; | |
| 162 | + __le64 offset; /* sector where this sb was written */ | |
| 163 | + __le64 version; | |
| 164 | + | |
| 165 | + __u8 magic[16]; | |
| 166 | + | |
| 167 | + __u8 uuid[16]; | |
| 168 | + union { | |
| 169 | + __u8 set_uuid[16]; | |
| 170 | + __le64 set_magic; | |
| 171 | + }; | |
| 172 | + __u8 label[SB_LABEL_SIZE]; | |
| 173 | + | |
| 174 | + __le64 flags; | |
| 175 | + __le64 seq; | |
| 176 | + __le64 pad[8]; | |
| 177 | + | |
| 178 | + union { | |
| 179 | + struct { | |
| 180 | + /* Cache devices */ | |
| 181 | + __le64 nbuckets; /* device size */ | |
| 182 | + | |
| 183 | + __le16 block_size; /* sectors */ | |
| 184 | + __le16 bucket_size; /* sectors */ | |
| 185 | + | |
| 186 | + __le16 nr_in_set; | |
| 187 | + __le16 nr_this_dev; | |
| 188 | + }; | |
| 189 | + struct { | |
| 190 | + /* Backing devices */ | |
| 191 | + __le64 data_offset; | |
| 192 | + | |
| 193 | + /* | |
| 194 | + * block_size from the cache device section is still used by | |
| 195 | + * backing devices, so don't add anything here until we fix | |
| 196 | + * things to not need it for backing devices anymore | |
| 197 | + */ | |
| 198 | + }; | |
| 199 | + }; | |
| 200 | + | |
| 201 | + __le32 last_mount; /* time overflow in y2106 */ | |
| 202 | + | |
| 203 | + __le16 first_bucket; | |
| 204 | + union { | |
| 205 | + __le16 njournal_buckets; | |
| 206 | + __le16 keys; | |
| 207 | + }; | |
| 208 | + __le64 d[SB_JOURNAL_BUCKETS]; /* journal buckets */ | |
| 209 | +}; | |
| 210 | + | |
| 159 | 211 | struct cache_sb { |
| 160 | 212 | __u64 csum; |
| 161 | 213 | __u64 offset; /* sector where this sb was written */ |