linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: linux-bcachefs@vger.kernel.org,
	"Christian Brauner" <brauner@kernel.org>,
	kernel-team@meta.com, "Jan Kara" <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org, "Jonathan Corbet" <corbet@lwn.net>,
	linux-btrfs@vger.kernel.org, "Brian Foster" <bfoster@redhat.com>,
	linux-doc@vger.kernel.org, "Josef Bacik" <josef@toxicpanda.com>,
	linux-kernel@vger.kernel.org, "Chris Mason" <clm@fb.com>,
	"David Sterba" <dsterba@suse.com>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Sweet Tea Dorminy" <sweettea-kernel@dorminy.me>,
	"Jaegeuk Kim" <jaegeuk@kernel.org>,
	linux-f2fs-devel@lists.sourceforge.net,
	"Mickaël Salaün" <mic@digikod.net>
Subject: Re: [f2fs-dev] [PATCH v3 00/13] fiemap extension for more physical information
Date: Wed, 3 Apr 2024 11:20:22 -0700	[thread overview]
Message-ID: <20240403182022.GB6375@frogsfrogsfrogs> (raw)
In-Reply-To: <vf4k3yagvb6vf3vfu7st7uj7asv4zbf5c3b2tef2g2xic5fkvj@olqxfakmkoew>

On Wed, Apr 03, 2024 at 02:17:26PM -0400, Kent Overstreet wrote:
> 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.
> > 
> > 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.
> > 
> > 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.
> > 
> > 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.
> 
> 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?

We still have 5x u32 of empty space in struct fiemap after this series,
so I don't think adding the physical length is going to prohibit future
expansion.

--D

> > 
> > Changelog:
> > 
> > v3: 
> >  - Adapted all the direct users of fiemap, except iomap, to emit
> >    the new fiemap information, as far as I understand the other
> >    filesystems.
> > 
> > v2:
> >  - Adopted PHYS_LEN flag and COMPRESSED flag from the previous version,
> >    as per Andreas Dilger' comment.
> >    https://patchwork.ozlabs.org/project/linux-ext4/patch/4f8d5dc5b51a43efaf16c39398c23a6276e40a30.1386778303.git.dsterba@suse.cz/
> >  - https://lore.kernel.org/linux-fsdevel/cover.1711588701.git.sweettea-kernel@dorminy.me/T/#t
> > 
> > v1: https://lore.kernel.org/linux-fsdevel/20240315030334.GQ6184@frogsfrogsfrogs/T/#t
> > 
> > Sweet Tea Dorminy (13):
> >   fs: fiemap: add physical_length field to extents
> >   fs: fiemap: update fiemap_fill_next_extent() signature
> >   fs: fiemap: add new COMPRESSED extent state
> >   btrfs: fiemap: emit new COMPRESSED state.
> >   btrfs: fiemap: return extent physical size
> >   nilfs2: fiemap: return correct extent physical length
> >   ext4: fiemap: return correct extent physical length
> >   f2fs: fiemap: add physical length to trace_f2fs_fiemap
> >   f2fs: fiemap: return correct extent physical length
> >   ocfs2: fiemap: return correct extent physical length
> >   bcachefs: fiemap: return correct extent physical length
> >   f2fs: fiemap: emit new COMPRESSED state
> >   bcachefs: fiemap: emit new COMPRESSED state
> > 
> >  Documentation/filesystems/fiemap.rst | 35 ++++++++++----
> >  fs/bcachefs/fs.c                     | 17 +++++--
> >  fs/btrfs/extent_io.c                 | 72 ++++++++++++++++++----------
> >  fs/ext4/extents.c                    |  3 +-
> >  fs/f2fs/data.c                       | 36 +++++++++-----
> >  fs/f2fs/inline.c                     |  7 +--
> >  fs/ioctl.c                           | 11 +++--
> >  fs/iomap/fiemap.c                    |  2 +-
> >  fs/nilfs2/inode.c                    | 18 ++++---
> >  fs/ntfs3/frecord.c                   |  7 +--
> >  fs/ocfs2/extent_map.c                | 10 ++--
> >  fs/smb/client/smb2ops.c              |  1 +
> >  include/linux/fiemap.h               |  2 +-
> >  include/trace/events/f2fs.h          | 10 ++--
> >  include/uapi/linux/fiemap.h          | 34 ++++++++++---
> >  15 files changed, 178 insertions(+), 87 deletions(-)
> > 
> > 
> > base-commit: 75e31f66adc4c8d049e8aac1f079c1639294cd65
> > -- 
> > 2.43.0
> > 
> 


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03  7:22 [f2fs-dev] [PATCH v3 00/13] fiemap extension for more physical information Sweet Tea Dorminy via Linux-f2fs-devel
2024-04-03  7:22 ` [f2fs-dev] [PATCH v3 01/13] fs: fiemap: add physical_length field to extents Sweet Tea Dorminy via Linux-f2fs-devel
2024-04-03 16:57   ` Brian Foster
2024-04-09 16:22   ` Darrick J. Wong
2024-04-03  7:22 ` [f2fs-dev] [PATCH v3 02/13] fs: fiemap: update fiemap_fill_next_extent() signature Sweet Tea Dorminy via Linux-f2fs-devel
2024-04-03 16:58   ` Brian Foster
     [not found]   ` <BDD29EBF-3A5F-4241-B9F2-789605D99817@dilger.ca>
2024-04-05 19:06     ` [f2fs-dev] [PATCH v3 02/13] " Kent Overstreet
2024-04-03  7:22 ` [f2fs-dev] [PATCH v3 03/13] fs: fiemap: add new COMPRESSED extent state Sweet Tea Dorminy via Linux-f2fs-devel
2024-04-03  7:22 ` [f2fs-dev] [PATCH v3 04/13] btrfs: fiemap: emit new COMPRESSED state Sweet Tea Dorminy via Linux-f2fs-devel
2024-04-03  7:22 ` [f2fs-dev] [PATCH v3 05/13] btrfs: fiemap: return extent physical size Sweet Tea Dorminy via Linux-f2fs-devel
2024-04-03  7:22 ` [f2fs-dev] [PATCH v3 06/13] nilfs2: fiemap: return correct extent physical length Sweet Tea Dorminy via Linux-f2fs-devel
2024-04-03  7:22 ` [f2fs-dev] [PATCH v3 07/13] ext4: " Sweet Tea Dorminy via Linux-f2fs-devel
2024-04-03 11:22   ` Jan Kara
2024-04-03  7:22 ` [f2fs-dev] [PATCH v3 08/13] f2fs: fiemap: add physical length to trace_f2fs_fiemap Sweet Tea Dorminy via Linux-f2fs-devel
2024-04-03  7:22 ` [f2fs-dev] [PATCH v3 09/13] f2fs: fiemap: return correct extent physical length Sweet Tea Dorminy via Linux-f2fs-devel
2024-04-03  7:22 ` [f2fs-dev] [PATCH v3 10/13] ocfs2: " Sweet Tea Dorminy via Linux-f2fs-devel
2024-04-03 11:25   ` Jan Kara
2024-04-03  7:22 ` [f2fs-dev] [PATCH v3 11/13] bcachefs: " Sweet Tea Dorminy via Linux-f2fs-devel
2024-04-03 17:00   ` Brian Foster
2024-04-03 18:15     ` Kent Overstreet
2024-04-03  7:22 ` [f2fs-dev] [PATCH v3 12/13] f2fs: fiemap: emit new COMPRESSED state Sweet Tea Dorminy via Linux-f2fs-devel
2024-04-03  7:22 ` [f2fs-dev] [PATCH v3 13/13] bcachefs: " Sweet Tea Dorminy via Linux-f2fs-devel
     [not found]   ` <7CF0A3D0-50E7-448F-A992-90B9168D557F@dilger.ca>
2024-04-06  5:20     ` Kent Overstreet
2024-04-03  8:29 ` [f2fs-dev] [PATCH v3 00/13] fiemap extension for more physical information Gao Xiang
2024-04-03 15:11   ` Sweet Tea Dorminy via Linux-f2fs-devel
2024-04-04  0:43     ` Gao Xiang
2024-04-03 18:17 ` Kent Overstreet
2024-04-03 18:20   ` Darrick J. Wong [this message]

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=20240403182022.GB6375@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=bfoster@redhat.com \
    --cc=brauner@kernel.org \
    --cc=clm@fb.com \
    --cc=corbet@lwn.net \
    --cc=dsterba@suse.com \
    --cc=jack@suse.cz \
    --cc=jaegeuk@kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=kent.overstreet@linux.dev \
    --cc=kernel-team@meta.com \
    --cc=linux-bcachefs@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mic@digikod.net \
    --cc=sweettea-kernel@dorminy.me \
    --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).