aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/request.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-10-31 18:46:42 -0400
committerKent Overstreet <kmo@daterainc.com>2013-11-11 00:56:33 -0500
commit81ab4190ac17df41686a37c97f701623276b652a (patch)
treebe7f48b5ad6d36fadbac4658d37953d324d760d0 /drivers/md/bcache/request.c
parent2599b53b7b0ea6103d1661dca74d35480cb8fa1f (diff)
bcache: Pull on disk data structures out into a separate header
Now, the on disk data structures are in a header that can be exported to userspace - and having them all centralized is nice too. Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/request.c')
-rw-r--r--drivers/md/bcache/request.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
index cf7850a7592c..932300f18973 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -264,16 +264,17 @@ static void bch_data_invalidate(struct closure *cl)
264 bio_sectors(bio), (uint64_t) bio->bi_sector); 264 bio_sectors(bio), (uint64_t) bio->bi_sector);
265 265
266 while (bio_sectors(bio)) { 266 while (bio_sectors(bio)) {
267 unsigned len = min(bio_sectors(bio), 1U << 14); 267 unsigned sectors = min(bio_sectors(bio),
268 1U << (KEY_SIZE_BITS - 1));
268 269
269 if (bch_keylist_realloc(&op->insert_keys, 0, op->c)) 270 if (bch_keylist_realloc(&op->insert_keys, 0, op->c))
270 goto out; 271 goto out;
271 272
272 bio->bi_sector += len; 273 bio->bi_sector += sectors;
273 bio->bi_size -= len << 9; 274 bio->bi_size -= sectors << 9;
274 275
275 bch_keylist_add(&op->insert_keys, 276 bch_keylist_add(&op->insert_keys,
276 &KEY(op->inode, bio->bi_sector, len)); 277 &KEY(op->inode, bio->bi_sector, sectors));
277 } 278 }
278 279
279 op->insert_data_done = true; 280 op->insert_data_done = true;