Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp45749lqe; Fri, 5 Apr 2024 12:04:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU1p+3oaU7q+hKig/mEH/mJSYDsJSROHAmWUeVqn5BJ1RecYjaQjI17v5k2Gh8kRPWejxYmJN1WW2NyuZifczXn740H0vMb5H3tSP+N9Q== X-Google-Smtp-Source: AGHT+IETmG2gXcxPucdEp5AlHaHRp/FRs99FiFUZjArVC/cSC5BM9472eSzgzPLCUuyqEPzByoei X-Received: by 2002:a05:620a:109a:b0:78a:3fc4:6ade with SMTP id g26-20020a05620a109a00b0078a3fc46ademr2578129qkk.44.1712343858353; Fri, 05 Apr 2024 12:04:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712343858; cv=pass; d=google.com; s=arc-20160816; b=rs9+goIOH1CFOm87IeudfUHFrU8qWEUhaVEklWLnOtRXLQd9mujpoGDICLFGByX1Hg V26c2lGwAH4a8kWj91UbMhphK0A7oybtQi2gg8UirNAk6d20T8NYvJdSlSvIqHLV8q2r AHOPdeo2zBpWtRjvMGMuWVW24Emo7wdyQa+akbOpq/T4vCVY1OOqOs7lzBXGmoC+DPu0 La/lvUCBvL8J5tUhMZQ3Ktst8jSBuH5yzwYKfhMNcVnZzvu0UqE2/akrmgJpjpDb+EBh IZL7Ez3Fn2CeLuO/YDMcpGJJc2v8SZ9X2NekLy2k1eB/FExE0RE+7IQAwm+tL0sd9TGK lqqg== 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=m5F1jQjz8GKIvENiKZ18TsL/8/SjOJRyCEoniP0p7LQ=; fh=CGkC2vLgh8ZVc0TREDU/QJhCC/UZYvEgIbCUE7E5Qw8=; b=pNgGQ2lbHecGzNT1WuxkRJ+wcVxt2T0T/5LVqOhZZtiMY8ftq1ZgD2OwvKI7sGh14J QP3ULVcyhih7XWIDaIiiC+4hUzdmRrZWZnRmeA7a5nwLsfWdjcv9C5sQnQKZlmrE/HDI U+s2D9l/p7yHNNNVWsfBft7Fp4AtaD5mh5fU3u2Ee+f+btFnPnJ/g8I1NLgkwGCDYfQI 4nxddwCnfFRuzriC3lAtodSk5o1Iq5VmUYEy977nBqhDSE/3K3L/Xy5dPpzthYixok/e GAhszQAh+TSgQTNhxs23N9MmQU+d9sa23BL4juFD2cdwYIuRI0Q6iBDh2XRe4aU8bQg2 Bq4w==; 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="nzmz8/7C"; 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-133496-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133496-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id qs14-20020a05620a394e00b0078d4d4bc479si1711763qkn.344.2024.04.05.12.04.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 12:04:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133496-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@dilger-ca.20230601.gappssmtp.com header.s=20230601 header.b="nzmz8/7C"; 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-133496-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133496-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 095801C2095E for ; Fri, 5 Apr 2024 19:04:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C1424172794; Fri, 5 Apr 2024 19:04:03 +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="nzmz8/7C" Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (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 EA74A171E47 for ; Fri, 5 Apr 2024 19:04:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712343842; cv=none; b=c1PFFvFC1TDRdzO5C6o3qF+1EOkUYUTDa41L8uOi0odkO4gsAPH3kb53TDe95e/FX8ZBig4pOv+1qVeKt1RDIyp+G19gH48LYaynYWhJGkLsoIYksKxCsH/Bl6NSygR+PEZ9biJIorXagvTcsux6f7RcZCIKBb7NXLCqELcrG7g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712343842; c=relaxed/simple; bh=XEKl06sBIFubO4kEIxiME6RWBGOpirneG37fQIFYI+E=; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date: In-Reply-To:Cc:To:References; b=On2o/1AyYQg9nk7wNSOvXpb6AOv1OP2bzWXwZSowXDamYhVbCaAGDxUBWEJe6W6sIphZqY0U/U7KTr6YmRlm49IounZA9cKTsxOAWNw1aXF8GtqDvvUrM1bgLlgrEYFWHftlSxMtZXwEWF+U7IM3ZFMjK4vjdmYY934LpjwTq8E= 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=nzmz8/7C; arc=none smtp.client-ip=209.85.210.175 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-pf1-f175.google.com with SMTP id d2e1a72fcca58-6ed04c91c46so686296b3a.0 for ; Fri, 05 Apr 2024 12:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dilger-ca.20230601.gappssmtp.com; s=20230601; t=1712343840; x=1712948640; 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=m5F1jQjz8GKIvENiKZ18TsL/8/SjOJRyCEoniP0p7LQ=; b=nzmz8/7Cy8PiExcigb6y3g79BjbFNUxVQzk4dk70l25W2LEwMVpSv334Ir4BqC8s47 jo0ts6S4jT0yzU8SkEtqDVKgXDSjMBjk6aSyI7f01LTJdPHErnRdHIRM06QlJuwENu4p GM/fgFUskms0QGgxn74OQllslkkQ2ImJcmyII94zw58Msd0rYuAFYG2GFXBVuUOYscz/ C3npn+wfT1irPkzG40mXR3Wue8aVKa836zdgJ8WAgokph0lLVEBnXCW0t10mjircurZU 0HpTuhPHfaA0elcCal1+imtbXfvMPkURenpLd23qbRzq2bzEbt9yxXa1FHjR3jjvxRX8 oVxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712343840; x=1712948640; 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=m5F1jQjz8GKIvENiKZ18TsL/8/SjOJRyCEoniP0p7LQ=; b=GN0ge6PwAx7TbXU8emeeiOdnQK2YiSiOYJUvgscWnd5QHS4f69IaxRKQUabG33tWtc biPW/9NAACgfAWpMz+Ffb4RkNqjjjR0etrS4tijAJJHSPhvTyA9ayzmG75VpMVlcl34f xvPCRFglMqdKiKBNzGGPfhC8Lg4f9XpsnLRHYQQEKcOfSoVudIeNgsIZIy/p4e93gl4a frFoIl9iYaurFyB4R1AgtPrLMtjuZNhVKUI7lGGu8RcTKRlCSixt5f8Ifc/al8qT8uMm Hsp34/SVyoQGBF9WXt+PxwGKTso149Jh4kbepqX16HuD1roF6BOMbI3Zm4wljGYFzjlW nUXA== X-Forwarded-Encrypted: i=1; AJvYcCX9eWdalt0rOm0Z/7Qoi4kKHvQ60dzlJV5/KCAbJKys+qz4ZlpWj3VKweV+NiTzUq8UPHTrgfj71p5hV5I3hDyyOtasg1a+4b57gNnT X-Gm-Message-State: AOJu0Yw8UY4dyhG+lR1UewfynMlF3wKB6wbdGfYw/gpLe1OZv6cElu0/ 2aQKSRND1UEjwMeMsx/6VysNZMvAX6v1zNAn8R3Trthz7LN8OeyBrzJ2i8zo9Dg= X-Received: by 2002:a05:6a00:1489:b0:6ea:ceff:2492 with SMTP id v9-20020a056a00148900b006eaceff2492mr2676124pfu.32.1712343840269; Fri, 05 Apr 2024 12:04:00 -0700 (PDT) Received: from cabot.adilger.int (S01068c763f81ca4b.cg.shawcable.net. [70.77.200.158]) by smtp.gmail.com with ESMTPSA id q29-20020a63751d000000b005f3a8643176sm1791656pgc.44.2024.04.05.12.03.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2024 12:03:59 -0700 (PDT) From: Andreas Dilger Message-Id: <2587135E-3AF4-430A-89CF-5E49D229F2D3@dilger.ca> Content-Type: multipart/signed; boundary="Apple-Mail=_9F3BC9E2-9868-456E-9EFC-C29718A65C6D"; 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 03/13] fiemap: add new COMPRESSED extent state Date: Fri, 5 Apr 2024 13:06:08 -0600 In-Reply-To: <2befe2c13065bdf3ca74cb8b701727940310fd2a.1712126039.git.sweettea-kernel@dorminy.me> Cc: Jonathan Corbet , Kent Overstreet , 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 References: <2befe2c13065bdf3ca74cb8b701727940310fd2a.1712126039.git.sweettea-kernel@dorminy.me> X-Mailer: Apple Mail (2.3273) --Apple-Mail=_9F3BC9E2-9868-456E-9EFC-C29718A65C6D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Apr 3, 2024, at 1:22 AM, Sweet Tea Dorminy = wrote: >=20 > This goes closely with the new physical length field in struct > fiemap_extent, as when physical length is not equal to logical length > the reason is frequently compression. >=20 > Signed-off-by: Sweet Tea Dorminy Looks good. Reviewed-by: Andreas Dilger > --- > Documentation/filesystems/fiemap.rst | 4 ++++ > fs/ioctl.c | 3 ++- > include/uapi/linux/fiemap.h | 2 ++ > 3 files changed, 8 insertions(+), 1 deletion(-) >=20 > diff --git a/Documentation/filesystems/fiemap.rst = b/Documentation/filesystems/fiemap.rst > index c060bb83f5d8..16bd7faba5e0 100644 > --- a/Documentation/filesystems/fiemap.rst > +++ b/Documentation/filesystems/fiemap.rst > @@ -162,6 +162,10 @@ FIEMAP_EXTENT_DATA_ENCRYPTED > This will also set FIEMAP_EXTENT_ENCODED > The data in this extent has been encrypted by the file system. >=20 > +FIEMAP_EXTENT_DATA_COMPRESSED > + This will also set FIEMAP_EXTENT_ENCODED > + The data in this extent is compressed by the file system. > + > FIEMAP_EXTENT_NOT_ALIGNED > Extent offsets and length are not guaranteed to be block aligned. >=20 > diff --git a/fs/ioctl.c b/fs/ioctl.c > index 1830baca532b..b47e2da7ec17 100644 > --- a/fs/ioctl.c > +++ b/fs/ioctl.c > @@ -126,7 +126,8 @@ int fiemap_fill_next_extent(struct = fiemap_extent_info *fieinfo, u64 logical, > return 1; >=20 > #define SET_UNKNOWN_FLAGS (FIEMAP_EXTENT_DELALLOC) > -#define SET_NO_UNMOUNTED_IO_FLAGS (FIEMAP_EXTENT_DATA_ENCRYPTED) > +#define SET_NO_UNMOUNTED_IO_FLAGS (FIEMAP_EXTENT_DATA_ENCRYPTED|\ > + FIEMAP_EXTENT_DATA_COMPRESSED) > #define SET_NOT_ALIGNED_FLAGS = (FIEMAP_EXTENT_DATA_TAIL|FIEMAP_EXTENT_DATA_INLINE) >=20 > if (flags & SET_UNKNOWN_FLAGS) > diff --git a/include/uapi/linux/fiemap.h b/include/uapi/linux/fiemap.h > index 3079159b8e94..ea97e33ddbb3 100644 > --- a/include/uapi/linux/fiemap.h > +++ b/include/uapi/linux/fiemap.h > @@ -67,6 +67,8 @@ struct fiemap { > * Sets = EXTENT_UNKNOWN. */ > #define FIEMAP_EXTENT_ENCODED 0x00000008 /* Data can not be = read > * while fs is = unmounted */ > +#define FIEMAP_EXTENT_DATA_COMPRESSED 0x00000040 /* Data is = compressed by fs. > + * Sets = EXTENT_ENCODED. */ > #define FIEMAP_EXTENT_DATA_ENCRYPTED 0x00000080 /* Data is encrypted = by fs. > * Sets = EXTENT_NO_BYPASS. */ > #define FIEMAP_EXTENT_NOT_ALIGNED 0x00000100 /* Extent offsets may = not be > -- > 2.43.0 >=20 >=20 Cheers, Andreas --Apple-Mail=_9F3BC9E2-9868-456E-9EFC-C29718A65C6D 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+AFAmYQS6AACgkQcqXauRfM H+DZhQ/+N+FTBJl3kN1NsBtQXtsomVevJcR4usUlY6CqAaJaOHn6SST8tvc45maS 6TzHDvlG9y5RPqk8hjc4xqjlO95zMD/wIGtJjrqMGwhSKUiHj2GQxK6/oF6Ca4US n2f2kjIcqQNCsPa2nZ3+KqgEthxUiaBlMBFrOd5/mecaDlsJImrQ+YRMHoADSUnz j4AgO/BVE7YTzRb7HKvxWRIuPjHIy9s4Dv/mxv0litYtM3YmWVPMCI+D1lSeXZMt ESm1NlJOIXqaLtYu1nKgaT2DlMWwPMOtdyFl4s3m8MPEyCD0Bugvff6F9X3N6DHa ZkIUlrdCpZPqZjj8XtckHOa8n2XyigbkhOQLCyT4bwNPgHE3r+3Gop+BmT3Fag5S MHOwhgm0NhIkk7cD4s7vTWYNXyaKCnW9nMqmZJWthjGr+X8hL9WMgBHJsjaCpCJd MbtQsp7Tm553K5go36SFo0Xj5Fchad7bnmg8wQ1CZspqp2VkpsW/15n4UxoxIRV2 gyBRDpwLm3sd/jIeZPhms2JQLKnpgd2a2eCiV5nLektk3gG4kt4anIdcdR/9PJJB KquxpKDdN6wu1rzGzfWKDzyLpGuc/YAL+oqsNNMSFgk1hBP9V4EkdKz5IuN08bt5 DPU0w4HHu4d/uj3xT4VCUpVKVFmMrrGweYMBL4B4AvuLiOzjpqc= =9xNL -----END PGP SIGNATURE----- --Apple-Mail=_9F3BC9E2-9868-456E-9EFC-C29718A65C6D--