On Thu, Feb 04, 2016 at 12:11:28AM +0000, fdman...@kernel.org wrote:
> From: Filipe Manana <fdman...@suse.com>
> 
> Test that an incremental send operation which issues clone operations
> works for files that have a full path containing more than one parent
> directory component.
> 
> This used to fail before the following patch for the linux kernel:
> 
>   "[PATCH] Btrfs: send, fix extent buffer tree lock assertion failure"
> 
> Signed-off-by: Filipe Manana <fdman...@suse.com>

Looks ok, I've pulled it in. Something to think about:

> +# Create a bunch of small and empty files, this is just to make sure our
> +# subvolume's btree gets more than 1 leaf, a condition necessary to trigger a
> +# past bug (1000 files is enough even for a leaf/node size of 64K, the 
> largest
> +# possible size).
> +for ((i = 1; i <= 1000; i++)); do
> +     echo -n > $SCRATCH_MNT/a/b/c/z_$i
> +done

We already do have a generic function for doing this called
_populate_fs(), it's just not optimised for speed with large numbers
of files being created.

i.e. The above is simple a single directory tree with a single level
with 1000 files of size 0:

        _populate_fs() -d 1 -n 1 -f 1000 -s 0 -r $SCRATCH_MNT/a/b/

Can you look into optimising _populate_fs() to use multiple threads
(say up to 4 by default) and "echo -n" to create files, and then
convert all our open coded "create lots of files" loops in tests to
use it?

Cheers,

Dave.
-- 
Dave Chinner
da...@fromorbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to