summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-10-31 15:19:36 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-10-31 15:19:36 -0700
commit523e13455ec9ec4457a5a1d24ff7132949742b70 (patch)
tree50ae06a3daba2c8b7a2aaf416cc30d8e22c71c20 /drivers
parent4bb0fb57f3bbe2ed7d4aad75a3c60a051afbd1db (diff)
parentbae818ee1577c27356093901a0ea48f672eda514 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull Ceph fix from Sage Weil: "This sets the stable pages flag on the RBD block device when we have CRCs enabled. (This is necessary since the default assumption for block devices changed in 3.9)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: rbd: require stable pages if message data CRCs are enabled
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/rbd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 6f26cf38c6f9..128e7df5b807 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -3780,6 +3780,9 @@ static int rbd_init_disk(struct rbd_device *rbd_dev)
blk_queue_max_discard_sectors(q, segment_size / SECTOR_SIZE);
q->limits.discard_zeroes_data = 1;
+ if (!ceph_test_opt(rbd_dev->rbd_client->client, NOCRC))
+ q->backing_dev_info.capabilities |= BDI_CAP_STABLE_WRITES;
+
disk->queue = q;
q->queuedata = rbd_dev;