lists.openwall.net   lists  /  announce  john-users  owl-users  popa3d-users  /  xvendor  oss-security  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4 
Open Source and information security mailing list archives
 
This website is powered by Openwall GNU/*/Linux security-enhanced OS
[<prev] [next>] [<thread-prev] [thread-next>] [month] [year] [list]
Date:	Tue, 06 Feb 2007 09:06:30 +1100
From:	Nathan Scott <nscott@...nex.com>
To:	Jan Kara <jack@...e.cz>
Subject: Re: [RFC][PATCH 2/3] Move the file data to the new blocks

Hi Jan,

On Mon, 2007-02-05 at 14:12 +0100, Jan Kara wrote:
>   Hi,
> 
>   I'm replying rather late but I've been busy with my PhD thesis lately.
> So sorry for that.
> 
> > Move the blocks on the temporary inode to the original inode
> > by a page.
> > 1. Read the file data from the old blocks to the page
> > 2. Move the block on the temporary inode to the original inode
> > 3. Write the file data on the page into the new blocks
>   I have one thing - it's probably not good to use page cache for
> defragmentation. As you will read/write tons of data and that will push
> out all other data from the cache. I think it may be better to allocate
> some separate pages and use them as buffers.

The XFS defrag tool uses direct IO to avoid this issue.  You may
do an even better job with splice(2) in this situation, since its
simply read-then-write-straight-back-out without looking at the
file data.

cheers.

-- 
Nathan

-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Hosted by DataForce ISP - Powered by Openwall GNU/*/Linux