From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 039CAC433B4 for ; Thu, 20 May 2021 05:57:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CBDCB610CC for ; Thu, 20 May 2021 05:57:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229681AbhETF7Q (ORCPT ); Thu, 20 May 2021 01:59:16 -0400 Received: from mx2.suse.de ([195.135.220.15]:48948 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229676AbhETF7O (ORCPT ); Thu, 20 May 2021 01:59:14 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 34AEFAD71; Thu, 20 May 2021 05:57:53 +0000 (UTC) Subject: Re: [PATCH v2 08/11] dm: Forbid requeue of writes to zones To: Damien Le Moal , dm-devel@redhat.com, Mike Snitzer , linux-block@vger.kernel.org, Jens Axboe References: <20210520042228.974083-1-damien.lemoal@wdc.com> <20210520042228.974083-9-damien.lemoal@wdc.com> From: Hannes Reinecke Message-ID: <275d8cc1-495f-54fd-276a-ec1adbca5b04@suse.de> Date: Thu, 20 May 2021 07:57:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210520042228.974083-9-damien.lemoal@wdc.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On 5/20/21 6:22 AM, Damien Le Moal wrote: > A target map method requesting the requeue of a bio with > DM_MAPIO_REQUEUE or completing it with DM_ENDIO_REQUEUE can cause > unaligned write errors if the bio is a write operation targeting a > sequential zone. If a zoned target request such a requeue, warn about > it and kill the IO. > > The function dm_is_zone_write() is introduced to detect write operations > to zoned targets. > > This change does not affect the target drivers supporting zoned devices > and exposing a zoned device, namely dm-crypt, dm-linear and dm-flakey as > none of these targets ever request a requeue. > > Signed-off-by: Damien Le Moal > --- > drivers/md/dm-zone.c | 17 +++++++++++++++++ > drivers/md/dm.c | 18 +++++++++++++++--- > drivers/md/dm.h | 5 +++++ > 3 files changed, 37 insertions(+), 3 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 634F9C433ED for ; Thu, 20 May 2021 06:05:30 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C0A9D61186 for ; Thu, 20 May 2021 06:05:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0A9D61186 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-429-Wd9dLgBMPJyZ4VXvNvkYRA-1; Thu, 20 May 2021 02:05:14 -0400 X-MC-Unique: Wd9dLgBMPJyZ4VXvNvkYRA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EE7B4EC1A4; Thu, 20 May 2021 06:05:09 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD79C2C26F; Thu, 20 May 2021 06:05:09 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A4987180102A; Thu, 20 May 2021 06:05:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 14K5w2AL015374 for ; Thu, 20 May 2021 01:58:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id BE118205D6AF; Thu, 20 May 2021 05:58:02 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B90E7205D6B4 for ; Thu, 20 May 2021 05:57:57 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F33B8101A531 for ; Thu, 20 May 2021 05:57:56 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-78-X70wPIXsN8yJIck9HUKzDQ-1; Thu, 20 May 2021 01:57:54 -0400 X-MC-Unique: X70wPIXsN8yJIck9HUKzDQ-1 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 34AEFAD71; Thu, 20 May 2021 05:57:53 +0000 (UTC) To: Damien Le Moal , dm-devel@redhat.com, Mike Snitzer , linux-block@vger.kernel.org, Jens Axboe References: <20210520042228.974083-1-damien.lemoal@wdc.com> <20210520042228.974083-9-damien.lemoal@wdc.com> From: Hannes Reinecke Message-ID: <275d8cc1-495f-54fd-276a-ec1adbca5b04@suse.de> Date: Thu, 20 May 2021 07:57:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210520042228.974083-9-damien.lemoal@wdc.com> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 14K5w2AL015374 X-loop: dm-devel@redhat.com Subject: Re: [dm-devel] [PATCH v2 08/11] dm: Forbid requeue of writes to zones X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" T24gNS8yMC8yMSA2OjIyIEFNLCBEYW1pZW4gTGUgTW9hbCB3cm90ZToKPiBBIHRhcmdldCBtYXAg bWV0aG9kIHJlcXVlc3RpbmcgdGhlIHJlcXVldWUgb2YgYSBiaW8gd2l0aAo+IERNX01BUElPX1JF UVVFVUUgb3IgY29tcGxldGluZyBpdCB3aXRoIERNX0VORElPX1JFUVVFVUUgY2FuIGNhdXNlCj4g dW5hbGlnbmVkIHdyaXRlIGVycm9ycyBpZiB0aGUgYmlvIGlzIGEgd3JpdGUgb3BlcmF0aW9uIHRh cmdldGluZyBhCj4gc2VxdWVudGlhbCB6b25lLiBJZiBhIHpvbmVkIHRhcmdldCByZXF1ZXN0IHN1 Y2ggYSByZXF1ZXVlLCB3YXJuIGFib3V0Cj4gaXQgYW5kIGtpbGwgdGhlIElPLgo+IAo+IFRoZSBm dW5jdGlvbiBkbV9pc196b25lX3dyaXRlKCkgaXMgaW50cm9kdWNlZCB0byBkZXRlY3Qgd3JpdGUg b3BlcmF0aW9ucwo+IHRvIHpvbmVkIHRhcmdldHMuCj4gCj4gVGhpcyBjaG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