Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp37807rdb; Fri, 29 Sep 2023 15:53:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH9oqrxYO2S3LfpGDrtaFV2DA+0xHXhherLjDQfgGLW7A4RLieJq0m9K3+Kv/v4cAVKqDhy X-Received: by 2002:a17:902:f7cf:b0:1bc:7441:d81a with SMTP id h15-20020a170902f7cf00b001bc7441d81amr4304542plw.6.1696027983312; Fri, 29 Sep 2023 15:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696027983; cv=none; d=google.com; s=arc-20160816; b=uZdbUPt1YzNqDIj5gHcBe/IrJc8S40HkUn/f/MbHl5zZGvZ4nag8pXpLYORV50w9Lr C3hfxEYoDH6Jrqf4VeCie/zYBskhAyzMZ7cvdKP1oXCbE+FSf2pK1u5yL9ZMae3NdQ1n ixh3UtItjnoYw7qNU9n/QUQDgyPfz93sbbR0675amEorSRGRtFuPoVUtSuBn4AimHp/n KNvzhOjJe9wlLk5UxK2OhWnpP7h0QuZ2M/QKXJOtbY+LkuYfHqdcA8/GZAws2ReQMNeI ZF4oNjPOFWBIDB8NprLraxtXNme1Y0ZrjvAtKcKgNPqTucnwG2zeD1AJtvhKUonPZSt/ XICQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KAwIiP82CTT8ssqwInBeFz+VGFATtc1QtMI4c1kdYto=; fh=2iUIYFhS1YoMoQifGtodHvRcNZEvNuDpOxjIfXlKPdc=; b=SR109pth4hxAfouD8rBRIvq9CXhq9Jx4R2Z5TqgaOzcP/KKl+juNXRNlZvW5FiYa9V styDVeZqjYkOowismdpHduL2KpE1XFxfkx+1l2Dpb0ofc4NgZibNLW7cVfVbiIPnNxj5 hD8xv+gR1TpeMk3mTrTK77tc/DFNrbcx0Do3b+VfLuA6q09JdPe861lj7P7N9SdHVlDG sUN6IBlByFt47ImCUrc6+L8fQRiq92K91ZUsJW3TsxJh4N4qFcjHL1BzbIC7AAcE0hHQ ZfuQRyBfddDdD3nzII1Jml1qgfLsjNGEY/f2/OVhpaUgae804Ii7meeYOr53vmSgpoPN BOxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RqmEBvEL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id y15-20020a17090322cf00b001c470c25409si22947044plg.327.2023.09.29.15.53.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 15:53:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RqmEBvEL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2CD7E821706C; Fri, 29 Sep 2023 15:49:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233918AbjI2Wt2 (ORCPT + 99 others); Fri, 29 Sep 2023 18:49:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbjI2Wt0 (ORCPT ); Fri, 29 Sep 2023 18:49:26 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 807ECDD; Fri, 29 Sep 2023 15:49:24 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B57E9C433C8; Fri, 29 Sep 2023 22:49:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696027764; bh=Ufhqxo3yas1XlwZ8/C+WysTlrYXwdeYXTChlz66gL/0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RqmEBvELKiKJrPdmj27E6wWm3wbgoGhbztCnJy3K8fbCsufv51Lo9qUuXj8sTFb4C zU3wRai4oALXDco5xkF66XgYStzG6E7Va5LNHKv2nVFCtNMduKicVQ7BzAu6Gg3pLo DyVc3WaIDXXS3CqCCT0fschckPSyFzmlt/dbLDBIpO+CvPw8eAtrVBCEpTUG6UJ+bE sM6pS/HdnnAFfJXBhYTF3VU7HubdFFtuXEKr8TIhEZZpMR0qJOHhOjaM14WcTCkW8u 3/kp7PQcfopDGxKohL2jgFUOHFzUYt/CpLGVJQYxOo+j5L/uayzxWPWpO76hsI2ut3 Ym9Y7/TXMwICw== Date: Fri, 29 Sep 2023 22:49:22 +0000 From: Eric Biggers To: John Garry Cc: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, jejb@linux.ibm.com, martin.petersen@oracle.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, Prasad Singamsetty Subject: Re: [PATCH 03/21] fs/bdev: Add atomic write support info to statx Message-ID: <20230929224922.GB11839@google.com> References: <20230929102726.2985188-1-john.g.garry@oracle.com> <20230929102726.2985188-4-john.g.garry@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230929102726.2985188-4-john.g.garry@oracle.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 (snail.vger.email [0.0.0.0]); Fri, 29 Sep 2023 15:49:34 -0700 (PDT) On Fri, Sep 29, 2023 at 10:27:08AM +0000, John Garry wrote: > diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h > index 7cab2c65d3d7..c99d7cac2aa6 100644 > --- a/include/uapi/linux/stat.h > +++ b/include/uapi/linux/stat.h > @@ -127,7 +127,10 @@ struct statx { > __u32 stx_dio_mem_align; /* Memory buffer alignment for direct I/O */ > __u32 stx_dio_offset_align; /* File offset alignment for direct I/O */ > /* 0xa0 */ > - __u64 __spare3[12]; /* Spare space for future expansion */ > + __u32 stx_atomic_write_unit_max; > + __u32 stx_atomic_write_unit_min; Maybe min first and then max? That seems a bit more natural, and a lot of the code you've written handle them in that order. > +#define STATX_ATTR_WRITE_ATOMIC 0x00400000 /* File supports atomic write operations */ How would this differ from stx_atomic_write_unit_min != 0? - Eric