From patchwork Thu Oct 15 18:50:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ronny Hegewald X-Patchwork-Id: 7408901 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 36400BF90C for ; Thu, 15 Oct 2015 18:49:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5F04020681 for ; Thu, 15 Oct 2015 18:49:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0812720795 for ; Thu, 15 Oct 2015 18:49:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752088AbbJOStL (ORCPT ); Thu, 15 Oct 2015 14:49:11 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:61518 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751850AbbJOStJ (ORCPT ); Thu, 15 Oct 2015 14:49:09 -0400 Received: from server2-groupware.localnet ([217.51.110.243]) by mrelayeu.kundenserver.de (mreue001) with ESMTPSA (Nemesis) id 0LwAJy-1adtXU0Jyg-0182MR; Thu, 15 Oct 2015 20:49:02 +0200 From: Ronny Hegewald Subject: [PATCH] mark rbd requiring stable pages Date: Thu, 15 Oct 2015 18:50:46 +0000 User-Agent: KMail/1.13.5 (Linux/3.19.8-64-patched; KDE/4.4.5; x86_64; svn-1222987; 2010-06-22) Cc: Ilya Dryomov , Sage Weil , Alex Elder MIME-Version: 1.0 To: ceph-devel@vger.kernel.org Message-Id: <201510151850.48348.ronny.hegewald@online.de> X-Provags-ID: V03:K0:xSL0H2GBny4/qYCVIhnex+pzHOnlI/aDM6o0qNCtF5giMLDu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-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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). This patch seems also to fix data and filesystem corruptions on ext4 formatted rbd devices that were previously seen on pretty much a daily basis. But it is unknown at the moment why this is the case. Signed-off-by: Ronny Hegewald --- That the mentioned corruption issue is really affected through this patch i could verify through the system logs. Since installation of this patch i have seen only a 2-3 filesystem corruptions. But these could be also just leftovers of corruptions that happened before the installation but got noticed from ext4 only later after the patched kernel was installed. This seems even more likely as i have seen not a single data corruption issue since the patch. -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- linux/drivers/block/rbd.c.org 2015-10-07 01:32:55.906666667 +0000 +++ linux/drivers/block/rbd.c 2015-09-04 02:21:22.349999999 +0000 @@ -3786,6 +3786,7 @@ blk_queue_merge_bvec(q, rbd_merge_bvec); disk->queue = q; + disk->queue->backing_dev_info.capabilities |= BDI_CAP_STABLE_WRITES; q->queuedata = rbd_dev;