linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Omar Sandoval <osandov@fb.com>
Cc: linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-api@vger.kernel.org
Subject: Re: [PATCH RESEND] Btrfs: add autodefrag inode flag
Date: Wed, 1 Jul 2015 07:45:19 +1000	[thread overview]
Message-ID: <20150630214519.GN22807@dastard> (raw)
In-Reply-To: <85de09b87ad7b2847ea001f5bb03c044e8b419aa.1435681574.git.osandov@fb.com>

On Tue, Jun 30, 2015 at 09:32:20AM -0700, Omar Sandoval wrote:
> In some cases, we may not want to enable automatic defragmentation for
> the whole filesystem with the "autodefrag" mount option but we still
> want to defragment specific files or directories. Add an inode flag
> which allows us to do specify that.
> 
> Signed-off-by: Omar Sandoval <osandov@fb.com>
> ---
> Resending this because I didn't send it to fsdevel or linux-api last
> time and I'm adding a new user-facing inode flag.

XFS has a "no defrag" inode flag to tell the defragmenter not to
defrag the file. (XFS_XFLAG_NODEFRAG, see xfsctl(3)). With the ext4
project quota work, this flag and interface is being pulled up to
the VFS, so perhaps it would be a good idea to turn this around the
other way?  i.e. autodefrag is the default behaviour, and the inode
contains an inheritable  "no defrag" flag to prevent defrag so that
we have the same flag, API and behaviour across filesystems?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2015-06-30 21:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-30 16:32 [PATCH RESEND] Btrfs: add autodefrag inode flag Omar Sandoval
2015-06-30 21:45 ` Dave Chinner [this message]
2015-07-01 11:07   ` Austin S Hemmelgarn

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=20150630214519.GN22807@dastard \
    --to=david@fromorbit.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=osandov@fb.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).