From patchwork Wed Dec 19 22:52:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Salisbury X-Patchwork-Id: 207537 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 16FA32C009B for ; Thu, 20 Dec 2012 09:53:33 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TlSVv-0003uD-G5; Wed, 19 Dec 2012 22:53:23 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TlSVt-0003ty-Ga for kernel-team@lists.ubuntu.com; Wed, 19 Dec 2012 22:53:21 +0000 Received: from 68-184-17-227.dhcp.unas.ma.charter.com ([68.184.17.227] helo=salisbury) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1TlSVt-0005L8-CQ for kernel-team@lists.ubuntu.com; Wed, 19 Dec 2012 22:53:21 +0000 Received: by salisbury (Postfix, from userid 1000) id 45CE8A00FA; Wed, 19 Dec 2012 17:52:39 -0500 (EST) From: joseph.salisbury@canonical.com To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/2] dm-crypt: never use write same Date: Wed, 19 Dec 2012 17:52:39 -0500 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: In-Reply-To: References: X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Joseph Salisbury BugLink: http://bugs.launchpad.net/bugs/1089818 Signed-off-by: Milan Broz Signed-off-by: Joseph Salisbury --- drivers/md/dm-crypt.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index bbf459b..60f5461 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1844,6 +1844,12 @@ static int crypt_iterate_devices(struct dm_target *ti, return fn(ti, cc->dev, cc->start, ti->len, data); } +static void crypt_io_hints(struct dm_target *ti, + struct queue_limits *limits) +{ + limits->max_write_same_sectors = 0; +} + static struct target_type crypt_target = { .name = "crypt", .version = {1, 11, 0}, @@ -1858,6 +1864,7 @@ static struct target_type crypt_target = { .message = crypt_message, .merge = crypt_merge, .iterate_devices = crypt_iterate_devices, + .io_hints = crypt_io_hints, }; static int __init dm_crypt_init(void)