Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp416936rdd; Tue, 9 Jan 2024 08:02:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHT8sT2G88m3oX8VPY8n0Bs9nGGAKmLjCxsaxCmZ6YaQ2MkgGYGdGQB+Q47EqRjLKpFps4B X-Received: by 2002:a17:906:d284:b0:a2a:7a55:5dd with SMTP id ay4-20020a170906d28400b00a2a7a5505ddmr794767ejb.16.1704816175005; Tue, 09 Jan 2024 08:02:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704816174; cv=none; d=google.com; s=arc-20160816; b=PQa/EoZw4FRSWnQkEc9W7n2JX5R0wKNnSbWFxSJoxThXlJTUp8a5Y80I5+DyqeBRQh wbfI+Ah0BmR6hYscMseVNm4k6Cm5b6g5WnzUV682uQRzjns40NsfRJzuy3wxM0sP8nyM XUxtrhVTrlMgqI2qO7FVMdTc51MJoCk2hrMMEW+itpVcZCMJln/8HH7CwHKQJJ20HXGf uYH6vkvMMMnrRe/eqdgwLY6nwdPtsbTCpuo17QZasDCeJEhfS7Wgb6k9DeJSLoO15Pl3 ALHjVWqSEXBbq30TLBFj6VFxow5Zd59gG9B6gH3SXMCzEH74bd2SbfsO9bJvB4/Vs9Po oAYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=Lql9X72W4wEDKbW+TlkVeWbQSJY0E5ER8JGCc5S+EEI=; fh=wzbNXne7qkXtp62J13oTqJFjNcWqwO5Ggy0XYAXqBlg=; b=FCjAUjqC6VaD9ktzXHLU+Oc7lvqPxSK5qGAFI0n14QzlXBhAFmfrH2vmpH3jTGFFja D+zRZqOG4mC/kAlFvDHnkqo2PT6WWq4NrUsksatjGmQIKNBXZFli2W7qwWvc1UWh3riC chngfqSXhqeteb47mb87IOlJJ3MfxWjH9c0xzY/09CcI2GFqTbiKhw+cI6tGchp6hs9n /MoCZxRL6JmzfM3V3FHqeGuUdeloTBO/MQlMUkpmxZojmyZaYaHHB+82DMMBwUQtbu0R 3UAY3JqOMSw00NgsW/Lym1FnKdg2LQrJydz89l0FEsJJwPsiZ3sQUDJbxpYR7+SgT6SF Bxpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-21087-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21087-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dc24-20020a170906c7d800b00a2b61bbdc9fsi472034ejb.214.2024.01.09.08.02.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 08:02:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21087-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-21087-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21087-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BA8C61F25098 for ; Tue, 9 Jan 2024 16:02:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC6C43A1C2; Tue, 9 Jan 2024 16:02:36 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2F6638DC1; Tue, 9 Jan 2024 16:02:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 97BB368B05; Tue, 9 Jan 2024 17:02:23 +0100 (CET) Date: Tue, 9 Jan 2024 17:02:23 +0100 From: Christoph Hellwig To: John Garry Cc: Christoph Hellwig , "Darrick J. Wong" , axboe@kernel.dk, kbusch@kernel.org, sagi@grimberg.me, jejb@linux.ibm.com, martin.petersen@oracle.com, viro@zeniv.linux.org.uk, brauner@kernel.org, dchinner@redhat.com, jack@suse.cz, 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-scsi@vger.kernel.org, ming.lei@redhat.com, bvanassche@acm.org, ojaswin@linux.ibm.com Subject: Re: [PATCH v2 00/16] block atomic writes Message-ID: <20240109160223.GA7737@lst.de> References: <20231213154409.GA7724@lst.de> <20231219051456.GB3964019@frogsfrogsfrogs> <20231219052121.GA338@lst.de> <76c85021-dd9e-49e3-80e3-25a17c7ca455@oracle.com> <20231219151759.GA4468@lst.de> <20231221065031.GA25778@lst.de> <73d03703-6c57-424a-80ea-965e636c34d6@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <73d03703-6c57-424a-80ea-965e636c34d6@oracle.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, Jan 09, 2024 at 09:55:24AM +0000, John Garry wrote: > So a user can issue: > > >xfs_io -c "atomic-writes 64K" mnt/file > >xfs_io -c "atomic-writes" mnt/file > [65536] mnt/file Let me try to decipher that: - the first call sets a 64k fsx_atomicwrites_size size - the secon call queries fsx_atomicwrites_size? > The user will still have to issue statx to get the actual atomic write > limit for a file, as 'xfs_io -c "atomic-writes"' does not take into account > any HW/linux block layer atomic write limits. So will the set side never fail? > Is this the sort of userspace API which you would like to see? What I had in mind (and that's doesn't mean it's right..) was that the user just sets a binary flag, and the fs reports the best it could. But there might be reasons to do it differently.