linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Tinguely <tinguely@sgi.com>
To: Dave Chinner <david@fromorbit.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: Thu, 08 Nov 2012 10:50:49 -0600	[thread overview]
Message-ID: <509BE2E9.1070702@sgi.com> (raw)
In-Reply-To: <1350537079-16246-2-git-send-email-david@fromorbit.com>

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.

Reviewed-by: Mark Tinguely <tinguely@sgi.com>

  reply	other threads:[~2012-11-08 16:50 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 [this message]
2012-11-08 20:56     ` Dave Chinner
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=509BE2E9.1070702@sgi.com \
    --to=tinguely@sgi.com \
    --cc=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --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).