[Top] [All Lists]

Re: [PATCH] xfstests: make defrag test 222 generic

To: <dsterba@xxxxxxx>, Eric Sandeen <sandeen@xxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>, ext4 development <linux-ext4@xxxxxxxxxxxxxxx>, linux-btrfs <linux-btrfs@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH] xfstests: make defrag test 222 generic
From: Rich Johnston <rjohnston@xxxxxxx>
Date: Fri, 15 Mar 2013 11:03:31 -0500
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20130315145540.GG7229@xxxxxxxxxxxxx>
References: <513F5B0A.4030405@xxxxxxxxxx> <20130315145540.GG7229@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1
On 03/15/2013 09:55 AM, David Sterba wrote:
On Tue, Mar 12, 2013 at 11:42:50AM -0500, Eric Sandeen wrote:
Define a new _defrag_dir() helper which just runs noisy/debug
dir defrag for ext4 and/or btrfs as well, and use that in 222
instead of hardcoded xfs_fsr.

Dir defrag on btrfs does not recurse in the given directory to defrag
all files, but defragments the tree of the containing subvolume and the
whole extent tree (thus needs CAP_SYS_ADMIN).

This is known (and not very intuitive) behaviour, it would be better to
add a special parameter to defrag the root and/or the extent root and
pass it down to the ioctl via flags.

Until this is implemented I suggest to use a workaround via 'find':

  find $dir -print -execdir $DEFRAG_PROG '{}' +

Otherwise the test looks ok.


Eric, I will make this change at commit time if you agree?

David, can I put your name as the reviewer when I do?


<Prev in Thread] Current Thread [Next in Thread>