* Backport of bae818ee1577
@ 2015-11-01 19:36 Ilya Dryomov
2015-11-01 19:36 ` [PATCH for 3.9-3.17] rbd: require stable pages if message data CRCs are enabled Ilya Dryomov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ilya Dryomov @ 2015-11-01 19:36 UTC (permalink / raw)
To: stable
Hello,
Please apply the following backport of bae818ee1577 ("rbd: require
stable pages if message data CRCs are enabled") to 3.9+.
I have two patches: one for 3.9-3.17 and another one for 3.18+. It
really is a single backport (git cherry-pick / git am -3 can handle the
remaining context just fine), but I know some of you use quilt for
queueing up patches, so I'm sending both just in case.
Thanks,
Ilya
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH for 3.9-3.17] rbd: require stable pages if message data CRCs are enabled
2015-11-01 19:36 Backport of bae818ee1577 Ilya Dryomov
@ 2015-11-01 19:36 ` Ilya Dryomov
2015-11-01 19:36 ` [PATCH for 3.18-4.2] " Ilya Dryomov
2015-11-11 15:31 ` Backport of bae818ee1577 Luis Henriques
2 siblings, 0 replies; 4+ messages in thread
From: Ilya Dryomov @ 2015-11-01 19:36 UTC (permalink / raw)
To: stable
From: Ronny Hegewald <ronny.hegewald@online.de>
rbd requires stable pages, as it performs a crc of the page data before
they are send to the OSDs.
But since kernel 3.9 (patch 1d1d1a767206fbe5d4c69493b7e6d2a8d08cc0a0
"mm: only enforce stable page writes if the backing device requires
it") it is not assumed anymore that block devices require stable pages.
This patch sets the necessary flag to get stable pages back for rbd.
In a ceph installation that provides multiple ext4 formatted rbd
devices "bad crc" messages appeared regularly (ca 1 message every 1-2
minutes on every OSD that provided the data for the rbd) in the
OSD-logs before this patch. After this patch this messages are pretty
much gone (only ca 1-2 / month / OSD).
Cc: stable@vger.kernel.org # 3.9+, needs backporting
Signed-off-by: Ronny Hegewald <Ronny.Hegewald@online.de>
[idryomov@gmail.com: require stable pages only in crc case, changelog]
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
[idryomov@gmail.com: backport to 3.9-3.17: context]
---
drivers/block/rbd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 2ea515509ca6..ff0dd53554cf 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -3443,6 +3443,9 @@ static int rbd_init_disk(struct rbd_device *rbd_dev)
blk_queue_io_opt(q, segment_size);
blk_queue_merge_bvec(q, rbd_merge_bvec);
+ 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;
--
2.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH for 3.18-4.2] rbd: require stable pages if message data CRCs are enabled
2015-11-01 19:36 Backport of bae818ee1577 Ilya Dryomov
2015-11-01 19:36 ` [PATCH for 3.9-3.17] rbd: require stable pages if message data CRCs are enabled Ilya Dryomov
@ 2015-11-01 19:36 ` Ilya Dryomov
2015-11-11 15:31 ` Backport of bae818ee1577 Luis Henriques
2 siblings, 0 replies; 4+ messages in thread
From: Ilya Dryomov @ 2015-11-01 19:36 UTC (permalink / raw)
To: stable
From: Ronny Hegewald <ronny.hegewald@online.de>
rbd requires stable pages, as it performs a crc of the page data before
they are send to the OSDs.
But since kernel 3.9 (patch 1d1d1a767206fbe5d4c69493b7e6d2a8d08cc0a0
"mm: only enforce stable page writes if the backing device requires
it") it is not assumed anymore that block devices require stable pages.
This patch sets the necessary flag to get stable pages back for rbd.
In a ceph installation that provides multiple ext4 formatted rbd
devices "bad crc" messages appeared regularly (ca 1 message every 1-2
minutes on every OSD that provided the data for the rbd) in the
OSD-logs before this patch. After this patch this messages are pretty
much gone (only ca 1-2 / month / OSD).
Cc: stable@vger.kernel.org # 3.9+, needs backporting
Signed-off-by: Ronny Hegewald <Ronny.Hegewald@online.de>
[idryomov@gmail.com: require stable pages only in crc case, changelog]
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
[idryomov@gmail.com: backport to 3.18-4.2: context]
---
drivers/block/rbd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 324bf35ec4dd..77324e9a9221 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -3819,6 +3819,9 @@ static int rbd_init_disk(struct rbd_device *rbd_dev)
q->limits.discard_zeroes_data = 1;
blk_queue_merge_bvec(q, rbd_merge_bvec);
+ 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;
--
2.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: Backport of bae818ee1577
2015-11-01 19:36 Backport of bae818ee1577 Ilya Dryomov
2015-11-01 19:36 ` [PATCH for 3.9-3.17] rbd: require stable pages if message data CRCs are enabled Ilya Dryomov
2015-11-01 19:36 ` [PATCH for 3.18-4.2] " Ilya Dryomov
@ 2015-11-11 15:31 ` Luis Henriques
2 siblings, 0 replies; 4+ messages in thread
From: Luis Henriques @ 2015-11-11 15:31 UTC (permalink / raw)
To: Ilya Dryomov; +Cc: stable
On Sun, Nov 01, 2015 at 08:36:50PM +0100, Ilya Dryomov wrote:
> Hello,
>
> Please apply the following backport of bae818ee1577 ("rbd: require
> stable pages if message data CRCs are enabled") to 3.9+.
>
> I have two patches: one for 3.9-3.17 and another one for 3.18+. It
> really is a single backport (git cherry-pick / git am -3 can handle the
> remaining context just fine), but I know some of you use quilt for
> queueing up patches, so I'm sending both just in case.
>
> Thanks,
>
> Ilya
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Thanks for providing these backports. I'll queue it for the 3.16 kernel.
Cheers,
--
Lu�s
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-11 15:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-01 19:36 Backport of bae818ee1577 Ilya Dryomov
2015-11-01 19:36 ` [PATCH for 3.9-3.17] rbd: require stable pages if message data CRCs are enabled Ilya Dryomov
2015-11-01 19:36 ` [PATCH for 3.18-4.2] " Ilya Dryomov
2015-11-11 15:31 ` Backport of bae818ee1577 Luis Henriques
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).