Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp289886rdh; Mon, 18 Dec 2023 21:21:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPOFzfPhSFEI3QpL1SAgcI8Qy5egLiP0kAiNrvLo+2fnUphWb7wGFL09r9ryEhRDC4x+mK X-Received: by 2002:a17:902:e810:b0:1d0:6ffd:6e60 with SMTP id u16-20020a170902e81000b001d06ffd6e60mr9963606plg.88.1702963304872; Mon, 18 Dec 2023 21:21:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702963304; cv=none; d=google.com; s=arc-20160816; b=Kgw4LcsPor77RJviM2U2wn0J57Iufzzcnqd1dNiUhGNQD+vU6J7W+awIy32DyO2egh gvB7hTFpiyXuO1j6RPqjkRzKGAFes4cy0TJdxTefP8xRWyPtofNa9K//9Hi5un1c/C9e kl89yHxAs86/DG3/6N2ggPx6D7OOEBKe4YqPGjqavC2XtWemClevVjuVakzltBMWHwrD LgkL+aBZZ5iuzZ8N0iBa941GHTPNNOAjoL33++0Jy4HwZkjqOS4pS0YYJJH/9j+njkgt +O9miF23SLrP4zkEM/ZOs85R7XfTfn3LXCbh57ZQinzkMoau7AS1bwBUQFChTFU6aSG2 gYRQ== 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=wDDuJPbOnZIW8GFTGVXnSMnwOADG+46WPtNCCOVT/aI=; fh=OkmjbJIuHjG4JcUgbz7St0LLadBU0upxn1/PGlbaM+g=; b=aJ5CsZc1dTIBFt1K7urHPxVpluX7feynnJRCiOxngyWgBniMPYQA06yV7sqjE1me6z SyMbvVtkZceyVcG8ZVH2u29OoZUYCaxNSPQWIbEw9gntVXJ31CPKXpWfEyQucjDxfMh0 CurHWEfLeLzkpFVMIG/eurmGWSPRWgEgkty1GC3DPcV9DcW0g1cmd2xwmHwOIRqwoh3Y /o586PjNUQ5ghqeYqq0E94r+YQRUgfgRzVYfbhjhrJtadyonjUoDMvtYt/Di3X+WFXAO g/oYucEOorXaEsgcZzoc9WmVJLC2hIp6RqiKPjwSgo/ovvxpgnqPCA9xiTnok3xAC4lP BiqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4711-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4711-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d6-20020a170902cec600b001d00a92b9d4si20034822plg.575.2023.12.18.21.21.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 21:21:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4711-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4711-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4711-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 8D35F28480C for ; Tue, 19 Dec 2023 05:21:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4E378BFD; Tue, 19 Dec 2023 05:21:28 +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 B50138472; Tue, 19 Dec 2023 05:21:26 +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 9A84268AFE; Tue, 19 Dec 2023 06:21:21 +0100 (CET) Date: Tue, 19 Dec 2023 06:21:21 +0100 From: Christoph Hellwig To: "Darrick J. Wong" Cc: John Garry , Christoph Hellwig , 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: <20231219052121.GA338@lst.de> References: <20231212110844.19698-1-john.g.garry@oracle.com> <20231212163246.GA24594@lst.de> <20231213154409.GA7724@lst.de> <20231219051456.GB3964019@frogsfrogsfrogs> 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: <20231219051456.GB3964019@frogsfrogsfrogs> User-Agent: Mutt/1.5.17 (2007-11-01) On Mon, Dec 18, 2023 at 09:14:56PM -0800, Darrick J. Wong wrote: > /me stumbles back in with plenty of covidbrain to go around. > > So ... Christoph, you're asking for a common API for > sysadmins/applications to signal to the filesystem that they want all > data allocations aligned to a given value, right? > > e.g. if a nvme device advertises a capability for untorn writes between > $lbasize and 64k, then we need a way to set up each untorn-file with > some alignment between $lbasize and 64k? > > or if cxl storage becomes not ung-dly expensive, then we'd want a way to > set up files with an alignment of 2M (x86) or 512M (arm64lol) to take > advantage of PMD mmap mappings? The most important point is to not mix these up. If we want to use a file for atomic writes I should tell the fs about it, and preferably in a way that does not require me to know about weird internal implementation details of every file system. I really just want to use atomic writes. Preferably I'd just start using them after asking for the limits. But that's obviously not going to work for file systems that use the hardware offload and don't otherwise align to the limit (which would suck for very small files anyway :)) So as a compromise I tell the file system before writing or otherwise adding any data [1] to file that I want to use atomic writes so that the fs can take the right decisions. [1] reflinking data into a such marked file will be ... interesting.