Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp791138rdb; Thu, 22 Feb 2024 22:57:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXEsoZ4Qigz9MUnteGB+zo8On5Q4ocStxUvgq4KBo24qTjnY0VPq4GK/1utCLdmh0+rrK3q4SdZDqlJvPY6Ll//goa3D2pVnojlC6H43A== X-Google-Smtp-Source: AGHT+IGsx+QGjbFtA1vIDaYpDifG+QT3QuT3jfX5GpfO1OWTVc7M7GwZZarg48BwZJMgePU/1Gf6 X-Received: by 2002:a17:902:c94e:b0:1db:f03b:6f4b with SMTP id i14-20020a170902c94e00b001dbf03b6f4bmr1030451pla.20.1708671447506; Thu, 22 Feb 2024 22:57:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708671447; cv=pass; d=google.com; s=arc-20160816; b=SlsSKK9HulRoPz3NN1AV/Z43i18CplcPyf4f6z+66KFIGny71/bZVzSN2cDhHvzSNh DMRCoegIWEPrbktkYFz6Go36INkkMYOa+KLVTO6KSURkxTBuVXLjXy+QvlgupO35+KTE GNLK+EIvAzh8alIk8kBHkakkBZVjcR9AlJ9p6Rb2J8GL3IAWvAy43PbSKVVVu/pQ2VXF XGyWj5Khdr9XFx6c0kNGtdsh5xHRNOqAPJmVQhQHVsJtAClL837ruT6mPoeZTgGHtKm8 Dez7JvbdLFautSypX05X8PyN31bb8x4Qei1EbxsqIjFfF+UgN0qS4YncyVzSykoT2vdD U5Yg== ARC-Message-Signature: i=2; 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=F3w+smyrG1YqQ7PpFEgkLYdrlTeIf94E+R0400y5pg8=; fh=/Md2XjEgFTcM0eXbPsl28ukFxq11z2aMOcJOORygxSk=; b=thgWIofPLGJg9MTAWo8YMIuLewEzA5C2Uoj2eaKhErQRRY84asVnSBpg3vadZdj1xs BP/pz4DSI6fmOL/lcBKCqApDnzGxBoMb81ks+7LwGkC820SSpcQWRpjWD5X6I/ASl6Rz YzhjoE9T+j7xIQtV7fvWda2/1poOnbWDzNxpmsq5zrx0M8UAZWo5jXCLMMj5b4YcsW8t h1o4k+fhz/JqCk6PzBdroYm09eBBtp2/R/dY6AukSTQoy4wflfUbTg00TPY7oUEVdzoh kzGQ5pP75irOLm+cHcwiXG/7zpACZCgBM4pnANlhFTLAJ9qoDhNBkC6FXppRqoVUeLCI b6xA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-77852-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77852-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 k6-20020a170902ce0600b001db2ad550d7si1689989plg.144.2024.02.22.22.57.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 22:57:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77852-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; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-77852-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77852-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 390B728427B for ; Fri, 23 Feb 2024 06:57:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C7D3A134AD; Fri, 23 Feb 2024 06:57:16 +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 CC809BA2B; Fri, 23 Feb 2024 06:57:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708671436; cv=none; b=F9WCW4kZOVuvEYyNrKKmRTUvWtHLYaJfzWoMXXvX1cgZLa1Hy/FtZ3FOyB6dOH0U1KkXi0+kt43x6/Xm/SFvndlp/9KT/dbiBnL9qzhybdLwFS4Q2bZpoAoq+qcOIUR3+7BoG5pW3QLY4cFKjyHR4FoBNmpyWPpK+j/D6I+jgMA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708671436; c=relaxed/simple; bh=hm6XHNj+0gbJT9j6deg6BuO41RjhBehAsR7NQVvqiAo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JBkUlrXEUvmGbq4HsBUptSpWDTNLpTghDakVQ5ZdemkxjCbt/YMY41xw6e0wGCHQSdyllUvW/4DP8tcTkWf0kfnfU+cxGn8nU6roNNsMl5oqlmKKomaRbzpszqcXKsSdNnByl7eLHCFS0MDrGCL/NBlS5fI4n2v/itM+4Qe8gqw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 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 8131A68C7B; Fri, 23 Feb 2024 07:57:10 +0100 (CET) Date: Fri, 23 Feb 2024 07:57:10 +0100 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Christoph Hellwig , John Garry , viro@zeniv.linux.org.uk, brauner@kernel.org, dchinner@redhat.com, jack@suse.cz, chandan.babu@oracle.com, martin.petersen@oracle.com, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, tytso@mit.edu, jbongio@google.com, ojaswin@linux.ibm.com Subject: Re: [PATCH 0/6] block atomic writes for XFS Message-ID: <20240223065710.GB11126@lst.de> References: <20240124142645.9334-1-john.g.garry@oracle.com> <20240213072237.GA24218@lst.de> <20240213175549.GU616564@frogsfrogsfrogs> <20240214074559.GB10006@lst.de> <20240221165615.GH6184@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: <20240221165615.GH6184@frogsfrogsfrogs> User-Agent: Mutt/1.5.17 (2007-11-01) On Wed, Feb 21, 2024 at 08:56:15AM -0800, Darrick J. Wong wrote: > Hmm. For rt reflink (whenever I get back to that, ha) I've been > starting to think that yes, we actually /do/ want to have a log item > that tracks the progress of remap and cow operations. That would solve > the problem of someone wanting to reflink a semi-written rtx. > > That said, it might complicate the reflink code quite a bit since right > now it writes zeroes to the unwritten parts of an rt file's rtx so that > there's only one mapping record for the whole rtx, and then it remaps > them. That's most of why I haven't bothered to implement that solution. I'm still not sure that supporting reflinks for rtextsize > 1 is a good idea.. > > I'm not planning to make you do it, because such a log item would > > generally be pretty useful for always COW mode. > > One other thing -- while I was refactoring the swapext code into > exch{range,maps}, it occurred to me that doing an exchange between the > cow and data forks isn't possible because log recovery won't be able to > do anything. There's no ondisk metadata to map a cow staging extent > back to the file it came from, which means we can't generally resume an > exchange operation. Yeah. > > Also if a file system supports logging data (which I have an > > XFS early prototype for that I plan to finish), we can even do > > the small double writes more efficiently than the application, > > all through the same interface. > > Heh. Ted's been trying to kill data=journal. Now we've found a use for > it after all. :) Well.. unconditional logging of data just seems like a really bad idea. Using it as an optimization for very small and/or synchronous writes is a pretty common technique.