Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2755132rdb; Wed, 4 Oct 2023 10:22:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERX3aefAZ52aHQT/c6AHlNCWjabRVxpFAgLyvFFFOzy23g3+7BHVKtZZY0AwKyrm4ya7Bs X-Received: by 2002:a17:902:724a:b0:1bb:3979:d467 with SMTP id c10-20020a170902724a00b001bb3979d467mr2692207pll.63.1696440157164; Wed, 04 Oct 2023 10:22:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696440157; cv=none; d=google.com; s=arc-20160816; b=boG18u3Yt+/XILimbewKrRFJpA4GT8aJ6tGjN8qespZez09Gnmxt9JosZK2kLFbO7W 00F7XSlRZWq5MnmRflb8M+P6zU9AJTbxjsuFJXElgKkK7bsA5N0CsPlix+D/73hLUTve H6lUsKGNjzKH7A7tfY9qj5BnY60FgAsTTIzPoNWhqYwaeGH3Et8CdNyLy9RS6rb00zuh kuOMcQpUyYAWcJvmYFbd4tKZ1yL3ZDtoiezxc/wJ1zeH/M+jZf0vJxe/vuN/n84NdQan AuuHNZCd3MEhWjYRLx3MzhIQXwNxDk8dOWuWNU1ZMdonieubPcBw0U9O4YfMOMU0ilNl qq1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=UrSFuIFom3a3FCpBLPqbU0TDngZDytGzCb9fcci2Vps=; fh=Smmlp9toxLGPeDt2MuR3XJkIBzSNxvMcfWEAWs8JXRY=; b=SE4Gprv6pycgF2x2+3YquoJGPTgVxIW/7LYnw4PoUc6sgakD8FZuAIH2tMTWQHF0Lz 3s4XeM+2g8RUTQoR4ffqLiWJLoz/cHd2gEAPIRSrRU54o2DoP9kNH4zWj6VoyWKCdIpb WxZgF7nAWjgNlAFItLJifnFiNckL8DduknBqmLa5eooqOz47TX4QXk4OfTiWLS0K5nLs 1woKF6uuRaqJPPZCEtlnWSYMc3j/7LJnHIbt4O5S56y2hX5ukvcFxr/90T76PqyPS9ru +b5ElK5SVneH+9oPBfsV7Jh4Nl1tLRRvd49Iw8pecHQOkgFpu/z2fEtX0/rWevVNnCKJ matA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id kt15-20020a170903088f00b001bc434b9d95si3950317plb.156.2023.10.04.10.22.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 10:22:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 838778370DB2; Wed, 4 Oct 2023 10:22:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233145AbjJDRWc (ORCPT + 99 others); Wed, 4 Oct 2023 13:22:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233250AbjJDRWb (ORCPT ); Wed, 4 Oct 2023 13:22:31 -0400 Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64214D8; Wed, 4 Oct 2023 10:22:28 -0700 (PDT) Received: by mail-ot1-f50.google.com with SMTP id 46e09a7af769-6c4d625da40so37896a34.1; Wed, 04 Oct 2023 10:22:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696440147; x=1697044947; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UrSFuIFom3a3FCpBLPqbU0TDngZDytGzCb9fcci2Vps=; b=L6ZW01o76NttKXwgElopu/dVoC6/zWfwOsAWYmeeezPmUecjm1rvJ/NpPMR/wJ73Mt 10HbUcI8CHx0AsBgrGcwvoScEdPDhWwoWaQnAcgSNEo73rDS0phSI37alsqgRRWTEDBu 4C4s/0CapCuMbkoDnGjZs96ryZZ5iuHYrHcB/yBt40hdmWxm6vlPbx8XR92Mmjyy0y8v R48Wv5O3Z0wFAoOn8vMKVqkbc0GwuozM3flnCGyaCM/DVOYEdtxr5y3EBwjqLPuFnJQC WFS4Q0NTQdXgJOasLL/hHIfXjArWw6Nbg+BtWMOMW/wFI0V4WVy+U2ycW6GLREe2bZS7 sQZg== X-Gm-Message-State: AOJu0YwvAw0cd3zk7BOgbs5C2+RvqCdFXgOEV0FOMTxEXEy4a/sko14H H59kWymZgoxo9iVzq6FPKqw= X-Received: by 2002:a05:6358:7f15:b0:143:786b:3de5 with SMTP id p21-20020a0563587f1500b00143786b3de5mr3022855rwn.9.1696440147475; Wed, 04 Oct 2023 10:22:27 -0700 (PDT) Received: from ?IPV6:2620:15c:211:201:969d:167a:787c:a6c7? ([2620:15c:211:201:969d:167a:787c:a6c7]) by smtp.gmail.com with ESMTPSA id t19-20020a63dd13000000b0055c178a8df1sm3537955pgg.94.2023.10.04.10.22.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Oct 2023 10:22:26 -0700 (PDT) Message-ID: <34c08488-a288-45f9-a28f-a514a408541d@acm.org> Date: Wed, 4 Oct 2023 10:22:23 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 10/21] block: Add fops atomic write support Content-Language: en-US To: "Martin K. Petersen" Cc: John Garry , axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, jejb@linux.ibm.com, djwong@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, chandan.babu@oracle.com, dchinner@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, tytso@mit.edu, jbongio@google.com, linux-api@vger.kernel.org References: <20230929102726.2985188-1-john.g.garry@oracle.com> <20230929102726.2985188-11-john.g.garry@oracle.com> <17ee1669-5830-4ead-888d-a6a4624b638a@acm.org> <5d26fa3b-ec34-bc39-ecfe-4616a04977ca@oracle.com> From: Bart Van Assche In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 04 Oct 2023 10:22:36 -0700 (PDT) On 10/3/23 19:53, Martin K. Petersen wrote: > > Bart, > >> I'm still wondering whether we really should support storage >> devices that report an ATOMIC TRANSFER LENGTH GRANULARITY that is >> larger than the logical block size. > > We should. The common case is that the device reports an ATOMIC > TRANSFER LENGTH GRANULARITY matching the reported physical block > size. I.e. a logical block size of 512 bytes and a physical block > size of 4KB. In that scenario a write of a single logical block would > require read-modify-write of a physical block. Block devices must serialize read-modify-write operations internally that happen when there are multiple logical blocks per physical block. Otherwise it is not guaranteed that a READ command returns the most recently written data to the same LBA. I think we can ignore concurrent and overlapping writes in this discussion since these can be considered as bugs in host software. In other words, also for the above example it is guaranteed that writes of a single logical block (512 bytes) are atomic, no matter what value is reported as the ATOMIC TRANSFER LENGTH GRANULARITY. >> Is my understanding correct that the NVMe specification makes it >> mandatory to support single logical block atomic writes since the >> smallest value that can be reported as the AWUN parameter is one >> logical block because this parameter is a 0's based value? Is my >> understanding correct that SCSI devices that report an ATOMIC >> TRANSFER LENGTH GRANULARITY that is larger than the logical block >> size are not able to support the NVMe protocol? > > That's correct. There are obviously things you can express in SCSI > that you can't in NVMe. And the other way around. Our intent is to > support both protocols. How about aligning the features of the two protocols as much as possible? My understanding is that all long-term T10 contributors are all in favor of this. Thanks, Bart.