linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Mark Tinguely <tinguely@sgi.com>
Cc: linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [PATCH 1/2] fiemap: add freespace mapping to FS_IOC_FIEMAP
Date: Fri, 9 Nov 2012 07:56:48 +1100	[thread overview]
Message-ID: <20121108205648.GO6434@dastard> (raw)
In-Reply-To: <509BE2E9.1070702@sgi.com>

On Thu, Nov 08, 2012 at 10:50:49AM -0600, Mark Tinguely wrote:
> On 10/18/12 00:11, Dave Chinner wrote:
> >From: Dave Chinner<dchinner@redhat.com>
> >
> >fiemap is used to map extents of used space on files. it's just an
> >array of extents, though, so there's no reason it can only index
> >*used*  space.
> >
> >Ther eis need for getting freespace layout information into
> >userspace. For example, defragmentation programs would find it
> >useful to be able to map the free space in the filesystem to
> >work out where it is best to move data to defragment it.
> >Alternatively, knowing where free space is enables us to identify
> >extents that need to be moved to defragment free space.
> >
> >Hence, extend fiemap with the FIEMAP_FLAG_FREESPACE to indicate that
> >the caller wants to map free space in the range fm_start bytes from
> >the start of the filesystem for fm_length bytes.
> >
> >Because XFS can report extents in size order without needing to
> >sort, and this information is useful to xfs_fsr, also add
> >FIEMAP_FLAG_FREESPACE_SIZE to tell the filesystem to return a
> >freespace map ordered by extent size rather than offset. If there
> >are multiple extents of the same size, then they are ordered by
> >offset.
> >
> >Signed-off-by: Dave Chinner<dchinner@redhat.com>
> >---
> 
> ...
> 
> >  --------------
> >diff --git a/include/linux/fiemap.h b/include/linux/fiemap.h
> >index d830747..f4fbb9f 100644
> >--- a/include/linux/fiemap.h
> >+++ b/include/linux/fiemap.h
> 
>   include/uabi/linux/fiemap.h
>           ^^^^
> other than that, it looks good.

include/uapi/ actaully, but that change was made after I posted the
patches so there's no surprise that It didn't apply.

As it is, this needs to be redone into an FS_IOC_FIEMAPFS ioctl in
response to other reviews. I've already done that work (a week ago),
I just haven't fully tested it yet so I haven't reported it...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2012-11-08 20:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18  5:11 [RFC, PATCH 0/2] fiemap: filesystem free space mapping Dave Chinner
2012-10-18  5:11 ` [PATCH 1/2] fiemap: add freespace mapping to FS_IOC_FIEMAP Dave Chinner
2012-11-08 16:50   ` Mark Tinguely
2012-11-08 20:56     ` Dave Chinner [this message]
2012-11-08 21:01       ` Mark Tinguely
2012-10-18  5:11 ` [PATCH 2/2] xfs: implement FIEMAP_FLAG_FREESPACE_* Dave Chinner
2012-10-18  5:27 ` [RFC, PATCH 3/2] xfsprogs: space management tool Dave Chinner
2012-10-18  8:10 ` [RFC, PATCH 0/2] fiemap: filesystem free space mapping Andreas Dilger
2012-10-18 21:07   ` Dave Chinner
2012-10-23 12:30 ` Christoph Hellwig
2012-10-23 21:53   ` Dave Chinner
2012-10-24 11:47     ` Chris Mason
2012-10-24 12:32       ` Jie Liu
2012-10-24 15:09       ` Christoph Hellwig
2012-10-24 19:15         ` Dave Chinner

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=20121108205648.GO6434@dastard \
    --to=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tinguely@sgi.com \
    --cc=xfs@oss.sgi.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;
as well as URLs for NNTP newsgroup(s).