linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
To: corbet@lwn.net, viro@zeniv.linux.org.uk, brauner@kernel.org,
	jack@suse.cz, linux-doc@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org,
	clm@meta.com, dsterba@suse.com, josef@toxicpanda.com
Cc: jbacik@toxicpanda.com, kernel-team@meta.com,
	Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Subject: [PATCH 0/3] fiemap extension to add physical extent length
Date: Fri,  8 Mar 2024 13:03:17 -0500	[thread overview]
Message-ID: <cover.1709918025.git.sweettea-kernel@dorminy.me> (raw)

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.

Hence, this patchset adds physical extent length information to fiemap,
and extends btrfs to return it.  This uses some of the reserved padding
in the fiemap extent structure, so programs unaware of the new field
will be unaffected by its presence.

This is based on next-20240307. I've tested the btrfs part of this with
the standard btrfs testing matrix locally, and verified that the physical extent
information returned there is correct, but I'm still waiting on more
tests. Please let me know what you think of the general idea!

Sweet Tea Dorminy (3):
  fs: add physical_length field to fiemap extents
  fs: update fiemap_fill_next_extent() signature
  btrfs: fiemap: return extent physical size

 Documentation/filesystems/fiemap.rst | 29 +++++++++----
 fs/bcachefs/fs.c                     |  6 ++-
 fs/btrfs/extent_io.c                 | 63 +++++++++++++++++-----------
 fs/ext4/extents.c                    |  1 +
 fs/f2fs/data.c                       |  8 ++--
 fs/f2fs/inline.c                     |  3 +-
 fs/ioctl.c                           |  8 ++--
 fs/iomap/fiemap.c                    |  2 +-
 fs/nilfs2/inode.c                    |  8 ++--
 fs/ntfs3/frecord.c                   |  6 ++-
 fs/ocfs2/extent_map.c                |  4 +-
 fs/smb/client/smb2ops.c              |  1 +
 include/linux/fiemap.h               |  2 +-
 include/uapi/linux/fiemap.h          | 24 +++++++----
 14 files changed, 108 insertions(+), 57 deletions(-)


base-commit: 1843e16d2df9d98427ef8045589571749d627cf7
-- 
2.44.0


             reply	other threads:[~2024-03-08 18:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 18:03 Sweet Tea Dorminy [this message]
2024-03-08 18:03 ` [PATCH 1/3] fs: add physical_length field to fiemap extents Sweet Tea Dorminy
2024-03-12  0:22   ` [PATCH 1/3] " Andreas Dilger
2024-03-12  3:35     ` Eric Biggers
2024-03-13 15:05     ` Sweet Tea Dorminy
2024-03-08 18:03 ` [PATCH 2/3] fs: update fiemap_fill_next_extent() signature Sweet Tea Dorminy
2024-03-08 18:03 ` [PATCH 3/3] btrfs: fiemap: return extent physical size Sweet Tea Dorminy
2024-03-15  3:03 ` [PATCH 0/3] fiemap extension to add physical extent length Darrick J. Wong
2024-03-21 18:58   ` David Sterba
2024-04-09 19:57     ` Andreas Dilger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1709918025.git.sweettea-kernel@dorminy.me \
    --to=sweettea-kernel@dorminy.me \
    --cc=brauner@kernel.org \
    --cc=clm@meta.com \
    --cc=corbet@lwn.net \
    --cc=dsterba@suse.com \
    --cc=jack@suse.cz \
    --cc=jbacik@toxicpanda.com \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@meta.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).