From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C7AD92144D0; Mon, 3 Mar 2025 15:13:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741014832; cv=none; b=bXP1dLDpvhuCWVDcMW7aCPeEBPkuNOk928aDBlGI6MnJGg2SvRgROi7/WKd80sQkHCGawyPwflhQP6w3fHXJmfaQBjZNk/s7wLERmLZYUf4c8XXV4SqMDQxsN5W+sGYUCYZW+EPqyK0ZANA5xGkLvsqR2ELexNKOYUXvABJhj9Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741014832; c=relaxed/simple; bh=1Xzmv2RcDkj+UiUk11nbRmDeV8ULe9YNCvXFiY/maR8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PIn+aidEtwgKUdEhr8emVvqupZkme4PnQSpzNAqgX8Ghhs9lNhl61DX8a6vOKqKUqFQMSU3DaDHkCE+s7ZgECZGvbgECphTzM3OvRGDe1Uy9KMzJDlIfiFe2XpeU8bNOdpMqXZXoaM0hALgMvVNudWGYUUGYG9cBwc4kGhmoht4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=MylLpo6j; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="MylLpo6j" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=i9mR4xyoj/FydC5/oouF1SUJM0/ZBGR59EGvwEO5nU4=; b=MylLpo6j6Tcxj/f/MM5fZBVEQc d1iLD+TvMdmgRFsmkBwC7X+ZWD3T23iymmAYT2Z7OEIVxqnAfOmjdsLruM837m3Hh9sHp71Qo3/Ci gc3EqZiFYuinAw8lY80hPiNV4Tii337m731/0+YIVAe7xZj4p8hshkLNUrgeItKnqxfOSEvqaI3r2 edPFhykbPt+33MsPWv6u/+69pXuqNf4B+oL6+aB70n8fTUt1mrIUUOm7nxEJlSjVUphIV9OmX6WDj X0rTxXd8QN9oPmS1ce6jrcbfPZmoJ38CatKSqFxaig2x0LKd7dq6E4Qr0/SeJm8I0VjZxJG2ZUZ4v J4GB6LRw==; Received: from hch by bombadil.infradead.org with local (Exim 4.98 #2 (Red Hat Linux)) id 1tp7UL-00000001FEm-0gG0; Mon, 03 Mar 2025 15:13:49 +0000 Date: Mon, 3 Mar 2025 07:13:49 -0800 From: Christoph Hellwig To: Heinz Mauelshagen Cc: Christoph Hellwig , Mikulas Patocka , Jooyung Han , Alasdair Kergon , Mike Snitzer , zkabelac@redhat.com, dm-devel@lists.linux.dev, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] the dm-loop target Message-ID: References: <7d6ae2c9-df8e-50d0-7ad6-b787cb3cfab4@redhat.com> Precedence: bulk X-Mailing-List: linux-block@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: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Mon, Mar 03, 2025 at 03:57:23PM +0100, Heinz Mauelshagen wrote: > dm-loop avoids the file system abstraction, thus gains the resulting > performance advantage versus the loop driver. How? > dm-loop obviously requires full provisioning, thus sparse files are being > detected and error handled. > > Additionally, block relocation on CoW filesystems has to be prevented. > dm-loop uses S_SWAPFILE to do so but that flag's limited to swap semantics > and is overloaded as such. > > Should we avoid the flag and enforce use of non-CoW filesystems for backing > or checks on non-CoW files (inode->i_flags)? No, ->bmap is fundamentally flawed. No new code should be using it, and we need to move the places still using it (most notably swap and the md bitmap code) off it. It can't deal with any kind of changes to the file system topology and is a risk to data corruption because if used in the I/O path it bypasses the file system entirely.. If it wasn't we'd use it in the loop driver.