Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp59249lqe; Fri, 5 Apr 2024 12:32:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXoQORWckMW7a58cD1y0swRn62kyqNjlCstpr7fxI76Nw9SiCWHs3c28HQXXo8p2bvN1beQwWxDr6QoICY1Pk9u94rcsmhu77hHYCpOCg== X-Google-Smtp-Source: AGHT+IFmHeDd2sOgAXHJhZDbkQCg5A11+M8B6in7CQy/6gb0zLJBukrfysuY5VnwQQroN2WEWkxo X-Received: by 2002:a17:903:18e:b0:1e2:bfee:9744 with SMTP id z14-20020a170903018e00b001e2bfee9744mr4148406plg.11.1712345527041; Fri, 05 Apr 2024 12:32:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712345527; cv=pass; d=google.com; s=arc-20160816; b=L/+kMBFAtW3sd2TcTU0XxdrxMG1pooKTd5d1ShPFmB7NXdP6X9wWl3Q/FwGC1+IrGY Izc/sjrP0hdMc/ttHf+znc7muQK8K1kN1PdTUFDds9gaJr7iFySq2cwLUk/KbgicwPE1 Elb0h+Ryy+/QFFOI2b2bXz5CekFjDp7+payMFzUQAKgLtMEjFC0GxJyDlh8xyK7Ixc5O 8TGJGF5oVWQySL0yFU3Bt0xS4fBmAEKNabZeujJT7vHd3UfFK7gHSWgidb4JlhnVdcwq vIa2+DUUx3AuiutzT2BAUkSg4DRZkF+Z8jJxaj80VK2w+dmiMzyvlZaZi7cNEx3ZeadN KK0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:to:cc:in-reply-to:date:subject:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id:from :dkim-signature; bh=ehiwGS0Z8Xqga4/SUXxg4ntgcCdy89JIq8/1UnR2uY4=; fh=r7JU2JVx8LxF5Wr2bQ0bDv47sgLbp6I7DeK4Pxat9EI=; b=wpGRXV7kLVqt8lcur7fwotVtnyuLcQRMBF9tErZ1OQVKGzThnHZKwKyxrNaZhN4CUw CzwCD6/ut7CIbOkthClVoDNc1M0ACo8yerg4BZtA350NbtEfMpAIBUcLOc3jhaXDgBxn 165LqL/VMykCr3laLXC2WmgQNlSsiQAAvAXAuSr9AREtsVfCEtoAVvnEce+Hf389MUH3 7+/mDcq6MsvcXpKoo+XHpBNmSBXUpg8yrH4HivnCkHF9l2+4pa2G1BWjGnKTuDobzTTR Cp0csDyVa9iFWqA6waIJakDp301b3BwXnhLfbhGnSi8/E7/5dWUpHl81JwtqqPYSpuWe K0hg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@dilger-ca.20230601.gappssmtp.com header.s=20230601 header.b=OfnyKkrm; arc=pass (i=1 spf=pass spfdomain=dilger.ca dkim=pass dkdomain=dilger-ca.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-133532-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133532-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 h31-20020a63575f000000b005dc80a2a308si1789079pgm.436.2024.04.05.12.32.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 12:32:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133532-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; dkim=pass header.i=@dilger-ca.20230601.gappssmtp.com header.s=20230601 header.b=OfnyKkrm; arc=pass (i=1 spf=pass spfdomain=dilger.ca dkim=pass dkdomain=dilger-ca.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-133532-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133532-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 AF1872847F0 for ; Fri, 5 Apr 2024 19:32:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F7E5172BD6; Fri, 5 Apr 2024 19:31:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dilger-ca.20230601.gappssmtp.com header.i=@dilger-ca.20230601.gappssmtp.com header.b="OfnyKkrm" Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA8D7172BCA for ; Fri, 5 Apr 2024 19:31:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712345515; cv=none; b=FsEUikDRsSpsee/CXEXw+BwGSg+Jh9Y19+Fzxfw//NQ/qckEyTUh76ZpHFeAzrdNHKafzqAwnx6GYPE9TpiApR4LrZSU5FXr3y1EsOTGVcUWZdBYUpCKgnsp7rxY2/9Ur4uC8osyR3yaM/IhFXtXIFcHonhtBijewnfyojClbhI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712345515; c=relaxed/simple; bh=8kF6zCx5kRw6Jm6yRPVqDMiT1Gzmz8s6r5iiyIiC1FY=; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date: In-Reply-To:Cc:To:References; b=g/smFCtBH9DT9D30JUKzTkgWvPrLOhHSiEwnj/CJNrKp+hf6ZVtLAtfGk1v3qWGcBM8Tu6DRJUHsXKo62P5CYM0vJavusFxG12R7kuNuSG0Fmm2xTs3PH4RoXx9HvWq4T1KGIkQwGovexcHVZ4LowjxyssL9+SzlvVKVMgijkUs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dilger.ca; spf=pass smtp.mailfrom=dilger.ca; dkim=pass (2048-bit key) header.d=dilger-ca.20230601.gappssmtp.com header.i=@dilger-ca.20230601.gappssmtp.com header.b=OfnyKkrm; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dilger.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dilger.ca Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1e0878b76f3so21446255ad.0 for ; Fri, 05 Apr 2024 12:31:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dilger-ca.20230601.gappssmtp.com; s=20230601; t=1712345513; x=1712950313; darn=vger.kernel.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=ehiwGS0Z8Xqga4/SUXxg4ntgcCdy89JIq8/1UnR2uY4=; b=OfnyKkrmMpxS8E63Ua54ZDiz/m9wfoPfPUmhwmSnjH6pHXOqVZxpOGORD+iwkyDFOJ bTsgoubdsRwZkJLAHOyAIMQSXfJar96hH0xFyot64ugfpNBcAHpni6XLjVPuG0azoq8j GtEONsNMHdT6ypUE5jiQT49nNptq0Nq9IHarQN/qn3A3jvHvKnfVEp9tHuOp0dlut5Sj aLhEbBBjW2R3raq7Ydjw4CXTdAbjTSQx/YZ52kZX453SdtBks8UUPWfhoa4m997n+OkI B0Bi/60Vl3X05sPybQdmw08sbK46G6ewrKKcpFP1v8NDIjEQVYAWNV0/8A0WL9NLy8YA Ca9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712345513; x=1712950313; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ehiwGS0Z8Xqga4/SUXxg4ntgcCdy89JIq8/1UnR2uY4=; b=EEZVC7oQv3lPOfnu+arlyCbfIPWPidYiKlJWj4vHHXCk0T4WmBsEdM8HC16LiTer0n 1jPGGPHj5C5owxgv/g6/usEhTcPIt5yw/jP+II3L9SbPoIOpN4M8n8Hok2MYlp4WWQfz 9yg2Zs3u+9LuOAIEFwrlJEDOW5+etY9djNsewph/CchVU4CE3DNGXiIQU9u6dCHU7Om4 i689e1SWlaAWGVEXWBZAW013lL+AChIHhx59RX+2Weut1ZkVcaKjZhubrRLjhIdovxD/ PGNexWoXO1LLEn8Cn4QVPB+pvANTGWFd/fkpzlZk5jBWIUtSff2uEzrgCD4iFeb9bBjQ fiIQ== X-Forwarded-Encrypted: i=1; AJvYcCWY3T+CHoLT2D10X4Hw8aeYZt/Z8bbX7nMRRgHjb+WlAU8fGobcvznmugMA50LGPiaak0ZhVhd6IjLb3pbhrWqMO6XPoXktgdAs2dFp X-Gm-Message-State: AOJu0YxlcBkYAzDT6FK9mqC6G7KZ35krEb8q8D7AzoL92v49t90akpTS OVPtLx8bwja2z7G+cgGEjv0jQIzC5ruhOfhVVodj6qmqRAF5KiKXLoR8S0uBy4s= X-Received: by 2002:a17:903:41ca:b0:1e2:6482:db0f with SMTP id u10-20020a17090341ca00b001e26482db0fmr3114175ple.29.1712345513217; Fri, 05 Apr 2024 12:31:53 -0700 (PDT) Received: from cabot.adilger.int (S01068c763f81ca4b.cg.shawcable.net. [70.77.200.158]) by smtp.gmail.com with ESMTPSA id h18-20020a170902f2d200b001e29c4b7bd2sm1963190plc.240.2024.04.05.12.31.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2024 12:31:52 -0700 (PDT) From: Andreas Dilger Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_0D1A6818-3729-442E-BD83-023C8BF27ABC"; protocol="application/pgp-signature"; micalg=pgp-sha256 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH v3 13/13] bcachefs: fiemap: emit new COMPRESSED state Date: Fri, 5 Apr 2024 13:34:00 -0600 In-Reply-To: <7CF0A3D0-50E7-448F-A992-90B9168D557F@dilger.ca> Cc: Jonathan Corbet , Brian Foster , Chris Mason , Josef Bacik , David Sterba , Jaegeuk Kim , Chao Yu , Alexander Viro , Christian Brauner , Jan Kara , =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , linux-doc@vger.kernel.org, Linux Kernel Mailing List , linux-bcachefs@vger.kernel.org, linux-btrfs , linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel , kernel-team@meta.com To: Sweet Tea Dorminy , Kent Overstreet References: <943938ff75580b210eebf6c885659dd95f029486.1712126039.git.sweettea-kernel@dorminy.me> <7CF0A3D0-50E7-448F-A992-90B9168D557F@dilger.ca> X-Mailer: Apple Mail (2.3273) --Apple-Mail=_0D1A6818-3729-442E-BD83-023C8BF27ABC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Apr 5, 2024, at 1:17 PM, Andreas Dilger wrote: >=20 > On Apr 3, 2024, at 1:22 AM, Sweet Tea Dorminy = wrote: >>=20 >> Signed-off-by: Sweet Tea Dorminy >> --- >> fs/bcachefs/fs.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >>=20 >> diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c >> index d2793bae842d..54f613f977b4 100644 >> --- a/fs/bcachefs/fs.c >> +++ b/fs/bcachefs/fs.c >> @@ -921,7 +921,7 @@ static int bch2_fill_extent(struct bch_fs *c, >> flags2 |=3D FIEMAP_EXTENT_UNWRITTEN; >>=20 >> if (p.crc.compression_type) { >> - flags2 |=3D FIEMAP_EXTENT_ENCODED; >> + flags2 |=3D = FIEMAP_EXTENT_DATA_COMPRESSED; >=20 > (defect) This should *also* set FIEMAP_EXTENT_ENCODED in this case, > along with FIEMAP_EXTENT_DATA_COMPRESSED. Both for compatibility with > older code that doesn't understand FIEMAP_EXTENT_DATA_COMPRESSED, and > because the data still cannot be read directly from the volume when it > is not mounted. >=20 > Probably Kent should chime in here with what needs to be done to set > the phys_len properly for bcachefs, or leave this patch out of your > series and let him submit it directly. With proposed wrapper in the > first patch of the series there isn't a hard requirement to change > all of the filesystems in one shot. Ah, I missed the 11/13 patch that is handling up most of the bcachefs phys_len changes. I think this should be folded into that patch so it is clear to the callers that the data is compressed when they see fe_physical_length is not the same as fe_logical_length. Cheers, Andreas --Apple-Mail=_0D1A6818-3729-442E-BD83-023C8BF27ABC Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIzBAEBCAAdFiEEDb73u6ZejP5ZMprvcqXauRfMH+AFAmYQUikACgkQcqXauRfM H+B07w/+MmXpmeeehpinb/y0l8UhYl0eqiljcSOE4SDFyKHRdwMRb9tUzdvr3ZOI YSglCdxdJ7umd1U5D38IjlSEfNPIJ4EQ7aYo/R8DaNballbpfROENbO7B2RxVQV/ KiJ7kJjSIgDL+T8Evdt0VopojAHlPxJlWcMh4HR4KCeaaKstdKuC1IVncs/zFtD6 Fui3/nG6LLK2dFTtvbY1cdN7MWRDPntZ7Kt5ovjZq2AWQHBc3bSF5LF/9KHD8yAS yBx8McpPFcH7jFcb/YG6oby4vsvNr+g7x+l6lBFPsxzwJeQ03L8ZcDNP4eUcDGTQ MxwgYvbktgldnwy6V2UIG8SWQhlUFkvu6Tes5mKtRi+k3kaBiTxCFiYRtGHUD5J7 VvJI5Ttx1fWKZAD9w+viFAgyg+q7bLL7zNeb9yKiGN60GDZzJw8kCzNYPQGC2D/T +q+vTtpn8hzJ89OYhDNfJRYWtpq2E3UCQZERcDHmGyjn+GVkpsXc+tCfqjYQUctD 500EVWcI//t2TuZi7Khbp1enFw0Hg0tqbLPZcOcZxkQAm8NGTPIWr8+6PwMVI4qM SFYbecP+LjPBbcDggyOE63dZQfjo/Hl0LJByapB8gLLyrqhFYkC/Lwo6LyH+D6NE k6cJ4CjhLs67thiPQfWHvNId0/YTsQ7l02b7EGERyAkLuV637gA= =gQCH -----END PGP SIGNATURE----- --Apple-Mail=_0D1A6818-3729-442E-BD83-023C8BF27ABC--