summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/request.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-11-01 02:46:42 +0400
committerKent Overstreet <kmo@daterainc.com>2013-11-11 09:56:33 +0400
commit81ab4190ac17df41686a37c97f701623276b652a (patch)
treebe7f48b5ad6d36fadbac4658d37953d324d760d0 /drivers/md/bcache/request.c
parent2599b53b7b0ea6103d1661dca74d35480cb8fa1f (diff)
downloadlinux-81ab4190ac17df41686a37c97f701623276b652a.tar.xz
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)
bio_sectors(bio), (uint64_t) bio->bi_sector);
while (bio_sectors(bio)) {
- unsigned len = min(bio_sectors(bio), 1U << 14);
+ unsigned sectors = min(bio_sectors(bio),
+ 1U << (KEY_SIZE_BITS - 1));
if (bch_keylist_realloc(&op->insert_keys, 0, op->c))
goto out;
- bio->bi_sector += len;
- bio->bi_size -= len << 9;
+ bio->bi_sector += sectors;
+ bio->bi_size -= sectors << 9;
bch_keylist_add(&op->insert_keys,
- &KEY(op->inode, bio->bi_sector, len));
+ &KEY(op->inode, bio->bi_sector, sectors));
}
op->insert_data_done = true;