Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp128027rdb; Thu, 21 Dec 2023 05:01:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHiVU6zGqunuinN9iymG4tmh8i4ZAb9+0wr7FhUj6GlYyIzelbHka/dVSmJmhRYPXefKdzm X-Received: by 2002:a05:6a00:2daa:b0:6d8:758a:6e2e with SMTP id fb42-20020a056a002daa00b006d8758a6e2emr5072935pfb.8.1703163688325; Thu, 21 Dec 2023 05:01:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703163688; cv=none; d=google.com; s=arc-20160816; b=vwKhCoDCEMA1+8Cm0dcQduhh42HF16pvK+cQqR/X67bI1fCpqG7lFFDnV3Bor4D2Q1 fzGWZ1O1k/qUlD6taT9IhqQkD3xCU/npufgy0wMvOoZH/ZZDEidBtwQWhbcr35+/9VS/ 7eksMBtvpFYqKm/MVuEv71sJh5x6FTyVLpwCWkrl/ibUzGq7wIsh62nEfotVeIF3zKgm AE44rHDp2AHhv4oUZKMBLGVu970mfhH64WW1O5HsEGdCQLropcmvJqH1AYnhtvMDHNQ4 zvZIbliUToi0yzKOTIVzjAMmT6fWLk20EPnLOzDZznEq2je/YcBpPjgs20fKwIS/6cn2 Alzw== 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=sv+mHNyRfEyGTB6TT8cZbkUG6r1En2QM+Hm0QRQPupM=; fh=pRFDb1qzPVEVLkPLiwPjjL6kEjGObSneCb7bU5CT3Q8=; b=H8msSrEC0l67IhdejAsXsjZEOP4/D1yBQeQWPsVX2aHphZZMnhMP7ojH243UObIzmn qC6Zz9X3ZwO0KCwQsR8U/aHues5RXSI4lgFx6ZByCrKx8N8Ls5Cz9nm3seAxoSCQ9jk8 K0jWUNeVWQd5jeFpZOZVryFT5CtM6HavUV/fnjleyoo8U8wIWChfzA+eCS0CpGthwJk7 a7h6626ilvAQ5NqMC6xvIvWWDaeTCUw9k1mVrhwkxZpEK9wIkNudN2WBrbH/SGWlcmY1 eqpfSA3art+66FljAb7/dn5PsfYdFoHOh/Y280JnUuySvTFbwVRpXCBY7YWqjrxQ1yCJ nI2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8413-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8413-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 y63-20020a636442000000b005c661efab79si1555686pgb.112.2023.12.21.05.01.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 05:01:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8413-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-8413-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8413-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 07BCC282EB9 for ; Thu, 21 Dec 2023 13:01:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F8FB745E9; Thu, 21 Dec 2023 12:57:21 +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 93C33697A0; Thu, 21 Dec 2023 12:57:18 +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 AEB9768B05; Thu, 21 Dec 2023 13:57:13 +0100 (CET) Date: Thu, 21 Dec 2023 13:57:13 +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: <20231221125713.GA24013@lst.de> References: <20231219051456.GB3964019@frogsfrogsfrogs> <20231219052121.GA338@lst.de> <76c85021-dd9e-49e3-80e3-25a17c7ca455@oracle.com> <20231219151759.GA4468@lst.de> <20231221065031.GA25778@lst.de> <20231221121925.GB17956@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 Thu, Dec 21, 2023 at 12:48:24PM +0000, John Garry wrote: >>> - ubuf / iovecs need to be PAGE-aligned >>> - each iovec needs to be length of multiple of atomic_write_unit_min. If >>> total length > PAGE_SIZE, each iovec also needs to be a multiple of >>> PAGE_SIZE. >>> >>> I'd rather something simpler. Maybe it's ok. >> If we decided to not support atomic writes on anything setting a virt >> boundary we don't have to care about the alignment of each vector, > > ok, I think that alignment is not so important, but we still need to > consider a minimum length per iovec, such that we will always be able to > fit a write of length atomic_write_unit_max in a bio. I don't think you man a minim length per iovec for that, but a maximum number of iovecs instead. For SGL-capable devices that would be BIO_MAX_VECS, otherwise 1.