Received: by 2002:a05:7412:a9a3:b0:f9:93eb:408e with SMTP id o35csp55827rdh; Wed, 20 Dec 2023 22:51:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHl4M9j1XdFBOYhfbQoZU2pJio8N4D5eANiMw5UKy8+sSb8xoEy8Vs4aZCaM4abWPYmwMik X-Received: by 2002:a05:6359:1a94:b0:170:70c5:3d57 with SMTP id rv20-20020a0563591a9400b0017070c53d57mr916895rwb.53.1703141464855; Wed, 20 Dec 2023 22:51:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703141464; cv=none; d=google.com; s=arc-20160816; b=VfP26Ysj+TdQmGeDuOSR7GmRly8xFaJG58pYu9Xt/LD6WEkFYSYrCPVi8S31d69uAi 0m65FMyvOkDmIUtmG8IC5i2DLfiBw/TJcNomx9PfL3kpdjzJ1X2LQZxKz4BShiINEC4/ jduJestrudZ65fz3+PpJ3S5vyeDXDHu4Ax9HnaErk9CKWMSPYsODcGHkHYdU9TocLJdr POWEKRcj5/PKeeHWeLVBi+fIb2tMJD/D2D0zrDMC0VaWyJG9rd8LR4RqEEwas1eIgtPv +ZDW6leVwQguoqq3JcVm7Ch8KtL9cJ+xRS7ql6ARlGqpxfycyx7JJr6LcgaTiuLRhIeG nR7A== 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=AhJbbrHKIM9opP5YEt3qP8OcL5li8ma8DykbBxaIbFE=; fh=pRFDb1qzPVEVLkPLiwPjjL6kEjGObSneCb7bU5CT3Q8=; b=jDUoLMro0WVSCFGDEOA8r371rV61SijlA1OtlketEPx5q1/pbbGGA9fCX+70NAGHPH IDM/QCVRoarwYVe/8q5qN4sufAbW89sddg+lAmA3teRJ23ETETZgc9QJ/6NWSpjqmYF1 iUj8988KMX0MQItvPl5fGpLbkERR+K/8gECSrAZt4yJJk1Hv+AYulF4GRTcl2oHu/AcR cAK4RaUvlPYI2pXldF4ZzkyS6uH0/91RR7GcpIpA62Z5sslviK/e0E2FwN7ldB9B4AVH o7swh180fxH4vn4Gbz2CA/Av7sY/dN7QtNZiyROoP8RVcvuWgGXqsrnATFTN/4ERz2rP 6hcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-7901-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7901-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z16-20020aa79e50000000b006d8174b97efsi1054074pfq.104.2023.12.20.22.51.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 22:51:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7901-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-7901-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7901-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 54C1C287396 for ; Thu, 21 Dec 2023 06:51:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B003DD29B; Thu, 21 Dec 2023 06:50:44 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org 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 9BC96BE49; Thu, 21 Dec 2023 06:50:41 +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 2ECBC68C4E; Thu, 21 Dec 2023 07:50:31 +0100 (CET) Date: Thu, 21 Dec 2023 07:50:31 +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, jaswin@linux.ibm.com, bvanassche@acm.org Subject: Re: [PATCH v2 00/16] block atomic writes Message-ID: <20231221065031.GA25778@lst.de> References: <20231212110844.19698-1-john.g.garry@oracle.com> <20231212163246.GA24594@lst.de> <20231213154409.GA7724@lst.de> <20231219051456.GB3964019@frogsfrogsfrogs> <20231219052121.GA338@lst.de> <76c85021-dd9e-49e3-80e3-25a17c7ca455@oracle.com> <20231219151759.GA4468@lst.de> 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: User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, Dec 19, 2023 at 04:53:27PM +0000, John Garry wrote: > On 19/12/2023 15:17, Christoph Hellwig wrote: >> On Tue, Dec 19, 2023 at 12:41:37PM +0000, John Garry wrote: >>> How about something based on fcntl, like below? We will prob also require >>> some per-FS flag for enabling atomic writes without HW support. That flag >>> might be also useful for XFS for differentiating forcealign for atomic >>> writes with just forcealign. >> I would have just exposed it through a user visible flag instead of >> adding yet another ioctl/fcntl opcode and yet another method. >> > > Any specific type of flag? > > I would suggest a file attribute which we can set via chattr, but that is > still using an ioctl and would require a new inode flag; but at least there > is standard userspace support. I'd be fine with that, but we're kinda running out of flag there. That's why I suggested the FS_XFLAG_ instead, which basically works the same.