public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@sun.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Mark Fasheh <mfasheh@suse.com>,
	Eric Sandeen <esandeen@redhat.com>,
	linux-ext4@vger.kernel.org
Subject: Re: [PATCH 0/3] Fiemap, an extent mapping ioctl
Date: Wed, 10 Sep 2008 13:46:46 -0600	[thread overview]
Message-ID: <20080910194646.GO3086@webber.adilger.int> (raw)
In-Reply-To: <20080910114612.314978a8.akpm@linux-foundation.org>

On Sep 10, 2008  11:46 -0700, Andrew Morton wrote:
> On Wed, 10 Sep 2008 05:49:34 -0700 Mark Fasheh <mfasheh@suse.com> wrote:
> > 	The following patches are the latest attempt at implementing a
> > fiemap ioctl, which can be used by userspace software to get extent
> > information for an inode in an efficient manner.
> 
> As these are applicable to all filesystems, Cc:ing only linux-ext4 is
> not sufficient.  All filesystem developers (at least) need an
> opportunity to review and understand these changes.

That was an oversight, partly caused because I launched the thread for
this on linux-ext4 after an ext4 concall.  All previous patches have
gone to linux-fsdevel and been through numerous discussions.

> > The fiemap ioctl is an efficient method for userspace to get file
> > extent mappings. Instead of block-by-block mapping (such as bmap), fiemap
> > returns a list of extents.
> 
> The above is, afacit, the only offered rationale for the addition of
> these new feature.  I don't recall seeing anyone complain about bmap()
> inefficiency.  In fact I rarely hear of anyone using bmap() at all.
> 
> This rationale needs expanding, please.  A lot.

There are several reasons for this new API:
- it avoids tools like "filefrag" (which currently use FIBMAP) having to
  do an ioctl for every block in a file, have the kernel map that block
  from an on-disk extent (in most newer filesystems), then re-assemble the
  extents in userspace.
- it works with filesystems that are not block based (e.g. NTFS, btrfs, etc)
  that may align file data on boundaries other than $blocksize boundaries
- it provides a much more rich API for finding out about on-disk allocation,
  such as whether allocated blocks are unwritten (e.g. fallocate), if they
  are packed along with other data, if the data is in the inode, etc.
- it can share existing XFS-specific functionality (which FIEMAP was designed
  to provide a superset of functionality for) with other filesystems.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.


  reply	other threads:[~2008-09-10 19:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-25 20:22 FIEMAP patches Andreas Dilger
2008-08-26  6:22 ` Mark Fasheh
2008-08-26  6:57   ` Andreas Dilger
2008-09-10 12:40 ` Mark Fasheh
2008-09-10 12:49   ` [PATCH 0/3] Fiemap, an extent mapping ioctl Mark Fasheh
2008-09-10 13:47     ` Christoph Hellwig
2008-09-10 14:07       ` Theodore Tso
2008-09-10 14:11         ` Christoph Hellwig
2008-09-10 20:33           ` Andreas Dilger
2008-09-10 16:10       ` Mark Fasheh
2008-09-10 16:20         ` Christoph Hellwig
2008-09-10 18:46     ` Andrew Morton
2008-09-10 19:46       ` Andreas Dilger [this message]
2008-09-10 12:49   ` [PATCH 1/3] vfs: vfs-level fiemap interface Mark Fasheh
2008-09-10 12:50   ` [PATCH 2/3] generic block based fiemap implementation Mark Fasheh
2008-09-10 12:50   ` [PATCH 3/3] ocfs2: fiemap support Mark Fasheh

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=20080910194646.GO3086@webber.adilger.int \
    --to=adilger@sun.com \
    --cc=akpm@linux-foundation.org \
    --cc=esandeen@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=mfasheh@suse.com \
    /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