From: Chris Mason <chris.mason@oracle.com>
To: Akira Fujita <a-fujita@rs.jp.nec.com>
Cc: Theodore Tso <tytso@mit.edu>,
linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC][PATCH 0/3] ext4: online defrag (ver 1.0)
Date: Fri, 30 Jan 2009 15:15:18 -0500 [thread overview]
Message-ID: <1233346518.9253.44.camel@think.oraclecorp.com> (raw)
In-Reply-To: <49829A1D.5090002@rs.jp.nec.com>
On Fri, 2009-01-30 at 15:11 +0900, Akira Fujita wrote:
> Hi,
>
> I have rewritten ext4 online defrag patches based on the comments from Ted.
> In the new defrag, create donor inode in the user space instead of kernel space,
> and then allocate contiguous blocks to it with fallocate().
> In kernel space, exchange the blocks between target inode and donor inode,
> and then copy the file data of target inode to donor inode every 64MB.
> The EXT4_IOC_DEFRAG ioctl becomes simpler than the old one,
> so it may be useful for other purposes.
>
One thing you'll want to handle is swap files. The swap code uses the
bmap ioctl to make a mapping of extents in the files, and expects that
mapping not to change. So, defragging a swap file will lead to some
serious problems.
Btrfs is currently getting around this by dropping bmap support, so
swapfiles on btrfs won't work at all. A real long term solution is
required ;)
For ext4 you should be able to just detect swapfile and disallow the
defrag on it.
-chris
next parent reply other threads:[~2009-01-30 20:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <49829A1D.5090002@rs.jp.nec.com>
2009-01-30 20:15 ` Chris Mason [this message]
2009-02-03 8:00 ` [RFC][PATCH 0/3] ext4: online defrag (ver 1.0) Akira Fujita
2009-01-30 22:33 ` Greg Freemyer
2009-02-04 8:07 ` Akira Fujita
2009-02-04 12:25 ` Greg Freemyer
2009-02-04 14:09 ` Theodore Tso
2009-02-04 14:51 ` Greg Freemyer
2009-02-04 15:32 ` Theodore Tso
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=1233346518.9253.44.camel@think.oraclecorp.com \
--to=chris.mason@oracle.com \
--cc=a-fujita@rs.jp.nec.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
/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).