Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp26763lqe; Fri, 5 Apr 2024 11:24:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX1mnuRw86R6NYVSCoGaZiqoxwLxW+Rt+iiyVyYOw1bqMl1ejKPol8n8iKLWL0UkGf7RL+g7gQCkfT1n4SPtTq3k8Jf+A/yLu8r35NB/g== X-Google-Smtp-Source: AGHT+IEAJbiIMFmBHjlANmuopXgg8i0nJ2RH5xtvVyB6MF6H+omyKfA5TuuN3ZiCbiL/BUMEG3hN X-Received: by 2002:a05:6358:3912:b0:183:8772:7686 with SMTP id y18-20020a056358391200b0018387727686mr2853273rwd.10.1712341474885; Fri, 05 Apr 2024 11:24:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712341474; cv=pass; d=google.com; s=arc-20160816; b=B1HVov8VkRCJtWeRcTIVXm65rg1tlrDVCGafqEjmY+i4LvysLj2W2/py8iyRcWpNxT FrLKa4HU6+gqj6WPGOZYiehprmg3NwxrLi4gSPl+8cAlvVcq7F6qWwf13XVphwEpzNjw RU8DRam4dgXcwbCG1g9rZrjyoiQHZVqWGcY4JzeYkxEM6A/dMg1RfqeqoTvrxf6gLwBA Wnn3/PRnNp+tty+7eK4WLiECGgHiw07o3yUjy7SwzZnHk5LbnHh5/bc1foL+/opIqZvm gUU168+BpCMLMwMhuuFLgT/ot2P6OWG1ND+2xzM7Hd9IszuN+TGFCsodfbbKU0fFBl5p 33Ow== 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=9Yt5fFOUcQfwmred9ry2pM1oK9JKeRbA+BTjVzFtQRM=; fh=YdJjhiik4qZxuIbTrxbtOGBSAM2dim5O7Ma1dZB1uVw=; b=t+hxwh6BO5EsB4XKrYMHdkmdayharGFl9ZXSKgXWcEOrQl0oOkBu1IZVqG+q27h5w4 txPvhDIss2kgvKnIPe/rJoZsHWfaUsF2hl87KhSWEruPQACFrHQAQtPrPasyomVgZEaW iGAJoykkq1/B4yp9lQ7HVrfD33lllEZE/YJ9MTPaEuVbGXtxeAqTUA3MHKSH9z5/cDtJ ptxUmGDBcOiBYQkPiZzCNAEtuu/78UvpK00jPKKCsivRbnGRjCeHiYcZ4DC5PDuZj4Zc GtezAM4BdTDTQFlXTMAKsz/q8CYCONJ6XDkUOX8SCP2dsqCcfLHkvK/1VzgMMi7vWV14 kSxg==; 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="pDfz/pHp"; 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-133459-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133459-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 3-20020a631443000000b005ced19e2d21si1717444pgu.676.2024.04.05.11.24.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 11:24:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133459-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="pDfz/pHp"; 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-133459-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133459-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 B6AEF28B066 for ; Fri, 5 Apr 2024 18:18:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 14F69172779; Fri, 5 Apr 2024 18:18:18 +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="pDfz/pHp" Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.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 188E2171E64 for ; Fri, 5 Apr 2024 18:18:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712341097; cv=none; b=dOIsXdcmxYaz86B0uKVEhzOP5DEw+ZLbS0xMFynqyYvCUnCizYgpIqS5HTgfVNyONz1gms0SfwM0gyXDVzpRm434CFe1o4f3bKxTlIbEf44rP6hlB6Wwnvvz5qOJo6plMe6n/wuKOz00/DRqHG8tdfgo6AtIHprDMK8GwB+7qKk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712341097; c=relaxed/simple; bh=wdMJhgg03J9ToLHXaFixR/36utzApFawE0KvfzXoqHs=; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date: In-Reply-To:Cc:To:References; b=kC/GhFghSl3UXJj9jyCC6OVQ4zkzwO4x5iVMiGi+vsq3zb4dc0P0dZLnm0K3IECJzxhzlWcZDBNalbD8ECXHW7lji9AhOiQFAphdtAH0wG12o6foR83wgAqdsfdlaLEEZyLz3plVa3ZLcqkSjSjjjbuPNZgRRiOZJoPZqtF8XWw= 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=pDfz/pHp; arc=none smtp.client-ip=209.85.215.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-pg1-f173.google.com with SMTP id 41be03b00d2f7-5cddfe0cb64so1652073a12.0 for ; Fri, 05 Apr 2024 11:18:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dilger-ca.20230601.gappssmtp.com; s=20230601; t=1712341094; x=1712945894; 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=9Yt5fFOUcQfwmred9ry2pM1oK9JKeRbA+BTjVzFtQRM=; b=pDfz/pHpB9sII143/jXXuhAPupP2d7QqElx2yN6GP5mJZLDzlEq2j3+FkgpvDG8R70 bByMj5Xf7C/7OBEFOHZJHxMZaAaeKda+7qN4Wqz17N0FoTKvF7NR+2bZhPvLtMV/EOhy sGkxkLM1kj/Dnl5jKKvuGakKCPr3uUo4pKbYZMoRn9IpjWhB1qqqSSRqoOx07X/YaMjY c3AixXB7DPaoEBUwJUZGapwQnmdKMrBJqoTGe6YglQ6eNqP3C6Cp+2GOJU1Vaq3wOAFN ted3ttFSX/T1A1av5p3hdiK9+mzxI4Qd54n3bf7Ybmz3cmSvBuArKYuLL7sZuYgsBIHi HNJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712341094; x=1712945894; 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=9Yt5fFOUcQfwmred9ry2pM1oK9JKeRbA+BTjVzFtQRM=; b=fT+cN7/BXmbMzwt9J9d0mhZufiF8EYudF2rnTdbpUhigrTyaEgeopa1Vct+8BvZSQ9 KzAKpBXlORLkSY3gAUjYXHE6ZHw/+kkBdCuCdf2I9LyMoKWCV2JdrJkoGGf2fA8c0ooc 9wF2Cc4kLyuSc3nA26rJnPf9a3VbMSY4ho40zzNXelVRXHRVZkifLxBkckOrbdP/1HhG 7lQdqbsuSUbqiLsZaJlMn5QjoIw3S9f/3K+ko5U0756BCXVB7i+FFdKdjtYpHmUV5PR/ GmyK2aAOi30ym3lkdqj2DIs5ARY7C+5Kff3zIHyj60C1+uCS/XioFCuUuO9B92CsONCG wCBQ== X-Forwarded-Encrypted: i=1; AJvYcCVIGHrbDqHIetsgILcWZ/J3TqaGNNcsAJgcBQHEa9Rno4Uk+cg7JacKdGD0li8UXfc118ba9QtVzjjs8X4aQNyrKHzgeIfhqXjjWmZ1 X-Gm-Message-State: AOJu0YxU7G8+wtlGzV4K6hQFWREq91wIUi63o0rEPJYeqCF06kPY1AA6 pGZA6UwZM3UzPWW4hDQzU8IwXiJhMCFVdlWyF20vtp+QeX8ioPbow5GRikwvc6M= X-Received: by 2002:a17:90a:1648:b0:2a1:f455:c3d7 with SMTP id x8-20020a17090a164800b002a1f455c3d7mr2069740pje.16.1712341094316; Fri, 05 Apr 2024 11:18:14 -0700 (PDT) Received: from cabot.adilger.int (S01068c763f81ca4b.cg.shawcable.net. [70.77.200.158]) by smtp.gmail.com with ESMTPSA id bb20-20020a17090b009400b002a46d73ebdcsm1525837pjb.46.2024.04.05.11.18.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2024 11:18:13 -0700 (PDT) From: Andreas Dilger Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_700566DC-00D7-4239-B730-9CEAF4C860C8"; 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 00/13] fiemap extension for more physical information Date: Fri, 5 Apr 2024 12:20:21 -0600 In-Reply-To: Cc: Sweet Tea Dorminy , 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, djwong@kernel.org To: Kent Overstreet References: X-Mailer: Apple Mail (2.3273) --Apple-Mail=_700566DC-00D7-4239-B730-9CEAF4C860C8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Apr 3, 2024, at 12:17 PM, Kent Overstreet = wrote: >=20 > On Wed, Apr 03, 2024 at 03:22:41AM -0400, Sweet Tea Dorminy wrote: >> For many years, various btrfs users have written programs to discover >> the actual disk space used by files, using root-only interfaces. >> However, this information is a great fit for fiemap: it is inherently >> tied to extent information, all filesystems can use it, and the >> capabilities required for FIEMAP make sense for this additional >> information also. >>=20 >> Hence, this patchset adds various additional information to fiemap, >> and extends filesystems (but not iomap) to return it. This uses some = of >> the reserved padding in the fiemap extent structure, so programs = unaware >> of the changes will be unaffected. >>=20 >> This is based on next-20240403. I've tested the btrfs part of this = with >> the standard btrfs testing matrix locally and manually, and done = minimal >> testing of the non-btrfs parts. >>=20 >> I'm unsure whether btrfs should be returning the entire physical = extent >> referenced by a particular logical range, or just the part of the >> physical extent referenced by that range. The v2 thread has a = discussion >> of this. >=20 > I believe there was some talk of using the padding for a device ID, so > that fiemap could properly support multi device filesystems. Are we = sure > this is the best use of those bytes? The current (pre-patch) fiemap_extent struct is: struct fiemap_extent { __u64 fe_logical; /* logical offset in bytes for the start of * the extent from the beginning of the file = */ __u64 fe_physical; /* physical offset in bytes for the start * of the extent from the beginning of the = disk */ __u64 fe_length; /* length in bytes for this extent */ __u64 fe_reserved64[2]; __u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */ __u32 fe_reserved[3]; }; and this series is only changing fe_reserved64[0] to fe_phys_length. There was discussion in the past of using "fe_reserved[0]" for the = device ID, which is still OK. Cheers, Andreas --Apple-Mail=_700566DC-00D7-4239-B730-9CEAF4C860C8 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+AFAmYQQOUACgkQcqXauRfM H+CHWg/+ImmZQ6Nzwva0Efg63ioqP0pS3airRAPWj+bfSnsIXaituGulL3hG2Lt5 IORycBQ5w1uifrkGHdmcpOjoIsPuaQrjAdC700vt5TRhqLojhU6ZnLz/eZMFUSIe oS0f9OPJPx3vDKBfMBeVTZbrzka94z5Wl0pUohNFSshNfYOrAKyGiBc0KLzpslFo eQODjM5SpgwhN7Te0Wcpklr8JMQXI5e+QXkAnor25ImqCHB7PPL4BEt40/HS6hH/ MfDLh7WHcatQFHB4prRJrULNDnOSJz+LD2UAu602/s03c2lIEHiVkTb8AATrFE8O FZvfEdge3gjEXaK1zO1/eNScUgHH8eESBDbWk2ACkU/p7Ip9MS5FgcWXVBxEUoDl 46VkGOuqWFwGgY020Q+Tvo7I6r1+MahDttyCKe34bzu0WB/t19del0moZyHhicgS oNyZN8rIM5QPmuwi1glNkPi8uL23QLb3frSVmrTflx1GxKBhB+fyN/TQP+42Y1zJ eBbSWPgWoWHC7u3ULQYA1Mjbi5DUh8dAjwWIJXsFIJwL4oGb54mX/vE2ef9YAHpI x1p+7ds2vdDYqG2o5UXaI9YPg45kDNVm+/Io5+DXNMKGVH6XIyhr/Uy5dzx6tVHK CdPBC3K4hWSLU6rlwFhwXJ0d5kc2AuRrcmDi8Q+FzSOHlLyt9zM= =UxlY -----END PGP SIGNATURE----- --Apple-Mail=_700566DC-00D7-4239-B730-9CEAF4C860C8--