All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@MIT.EDU>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	tytso@mit.edu, adilger@sun.com, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] Add extent conversion support to chattr
Date: Tue, 9 Sep 2008 09:43:47 -0400	[thread overview]
Message-ID: <20080909134347.GB21071@mit.edu> (raw)
In-Reply-To: <20080909114647.GA14052@infradead.org>

On Tue, Sep 09, 2008 at 07:46:47AM -0400, Christoph Hellwig wrote:
> On Tue, Sep 09, 2008 at 02:42:22PM +0530, Aneesh Kumar K.V wrote:
> > This patch adds new option, -E to chattr. The -E option
> > is used to convert the ext3 format (non extent) file
> > to ext4 (extent) format. This can be used to migrate
> > the ext3 file system to ext4 file system.
> 
> I think this is an awkware interfac.  Chattr is supposed to set simple
> binary flags and not a front end to complicated filesystem conversions.

The alternate is to create an entire new program (e4migrate) just to
trigger a single ioctl.  The reality is this is probably going to more
used by ext4 developers than anybody else, since it's rare that you
would want to convert a single file from using indrect blocks to using
extents.  In general, most users/system administrators will want to
convert the entire filesystem; eventually this will probably be done
via some combination with the userspace program to trigger online
defrag, but this was just a stopgap measure to allow us to more easily
exercise the kernel code more than anything else.

So given that this is only to enable extents on a single file, "chattr
+e file" is very much in line with the rest of the chattr interface
for setting other flags.

One of the things which we may want to do to use statfs() and checking
f_type to make sure the file in question is located on an ext2/3/4
filesystem before trying the ioctl, since it is true that a number of
other filesystems have "borrowed" the chattr program and use it for
their own purposes.  It's unlikely that the ext4 migration ioctl will
be wired to anything on other filesystems, but it would be a good
safety measure to add just in case.

Regards,

						- Ted

  parent reply	other threads:[~2008-09-09 13:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-09  9:12 [PATCH] Add extent conversion support to chattr Aneesh Kumar K.V
2008-09-09 11:46 ` Christoph Hellwig
2008-09-09 12:36   ` Aneesh Kumar K.V
2008-09-09 13:43   ` Theodore Tso [this message]
2008-09-09 14:09     ` Aneesh Kumar K.V
2008-09-09 14:39       ` Theodore Tso
2008-09-09 16:28         ` Aneesh Kumar K.V
2008-09-09 16:47           ` Theodore Tso
2008-09-09 16:50     ` Christoph Hellwig
2008-09-09 16:54       ` Theodore Tso
  -- strict thread matches above, loose matches on Subject: below --
2008-09-12  9:04 Aneesh Kumar K.V
2008-09-12  9:17 ` Andreas Dilger
2008-09-12  9:27   ` Aneesh Kumar K.V
2008-09-12 15:26     ` Andreas Dilger
2008-09-12  9:31   ` Aneesh Kumar K.V

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=20080909134347.GB21071@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger@sun.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=hch@infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.