[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <20080910194646.GO3086@webber.adilger.int>
Date: Wed, 10 Sep 2008 13:46:46 -0600
From: Andreas Dilger <adilger@....com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Mark Fasheh <mfasheh@...e.com>, Eric Sandeen <esandeen@...hat.com>,
linux-ext4@...r.kernel.org
Subject: Re: [PATCH 0/3] Fiemap, an extent mapping ioctl
On Sep 10, 2008 11:46 -0700, Andrew Morton wrote:
> On Wed, 10 Sep 2008 05:49:34 -0700 Mark Fasheh <mfasheh@...e.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists