[PATCH 09/12] reflink: test error conditions due to bad inputs

2015-10-06 Thread Darrick J. Wong
Check that we can feed bad inputs to reflink and it'll reject them. Signed-off-by: Darrick J. Wong --- tests/generic/839 | 122 + tests/generic/839.out | 30 tests/generic/group |1 3 files

[PATCH 01/12] xfs: fix merge errors in fuzzer tests

2015-10-06 Thread Darrick J. Wong
Signed-off-by: Darrick J. Wong --- tests/xfs/085.out |2 -- tests/xfs/098.out |1 - tests/xfs/099.out |2 +- tests/xfs/100.out |2 +- tests/xfs/101.out |2 +- tests/xfs/102.out |2 +- 6 files changed, 4 insertions(+), 7 deletions(-) diff --git

[RFCv3 00/12] xfstests: test the btrfs/xfs reflink/dedupe ioctls

2015-10-06 Thread Darrick J. Wong
Hi all, This is part of the third revision of an RFC for adding to XFS support for tracking reverse-mappings of physical blocks to file and metadata; and support for mapping multiple file logical blocks to the same physical block, more commonly known as reflinking. This patchset aims to make

[PATCH 06/12] reflink: test the various fallocate modes

2015-10-06 Thread Darrick J. Wong
Check that the variants of fallocate (allocate, punch, zero range, collapse range, insert range) do the right thing when they're run against a range of reflinked blocks. Signed-off-by: Darrick J. Wong --- tests/generic/811 | 126

[PATCH 03/12] generic/80[0-2]: support xfs in addition to btrfs

2015-10-06 Thread Darrick J. Wong
Modify the reflink tests to support xfs. Signed-off-by: Darrick J. Wong --- common/rc | 37 + tests/generic/800 |2 +- tests/generic/801 |2 +- tests/generic/802 |2 +- 4 files changed, 40 insertions(+), 3

[PATCH 02/12] btrfs: move btrfs reflink tests to generic

2015-10-06 Thread Darrick J. Wong
Move the cp --reflink tests from btrfs/ to generic/ since xfs now supports that ioctl. Signed-off-by: Darrick J. Wong --- tests/btrfs/026 | 92 - tests/btrfs/026.out | 16 --- tests/btrfs/027 | 109

[PATCH 12/12] reflink: test that CoW writes fail when we're out of space

2015-10-06 Thread Darrick J. Wong
Ensure that copy-on-writing a reflinked file when there's no free disk space reflects the desired ENOSPC back to userspace during the write call. Tests the buffered IO, direct IO, and mmap write paths. Signed-off-by: Darrick J. Wong --- tests/generic/842 | 110

[PATCH 10/12] xfs: test xfs-specific reflink pieces

2015-10-06 Thread Darrick J. Wong
Check that growfs and xfs_fsr still work properly on reflinked fses. Signed-off-by: Darrick J. Wong --- tests/xfs/800 | 77 +++ tests/xfs/800.out |5 ++ tests/xfs/801 | 133 +

[PATCH 04/12] reflink: basic tests of the reflink and dedupe ioctls

2015-10-06 Thread Darrick J. Wong
Test the operation of the btrfs (and now xfs) reflink and dedupe ioctls at various file offsets and with matching and nonmatching files. Signed-off-by: Darrick J. Wong --- common/rc |9 +++ tests/generic/803 | 89 ++

[PATCH 11/12] reflink: test what happens when we hit resource limits

2015-10-06 Thread Darrick J. Wong
Add a few horrible opt-in stress tests to see what happens if we try to reflink the same block billions of times, and what happens if we run out of space while reflinking a file. Signed-off-by: Darrick J. Wong --- tests/generic/840 | 106

[PATCH 07/12] reflink: concurrent operations tests

2015-10-06 Thread Darrick J. Wong
Make sure that running reflink ops while other IO is ongoing doesn't break the filesystem. Signed-off-by: Darrick J. Wong --- tests/generic/821 | 96 tests/generic/821.out |6 +++ tests/generic/822 | 96

[PATCH 08/12] reflink: test accuracy of free block counts

2015-10-06 Thread Darrick J. Wong
Check that the free block counts seem to be handled correctly in the reflink operation and subsequent attempts to rewrite reflinked copies. Signed-off-by: Darrick J. Wong --- tests/generic/830 | 79 +++ tests/generic/830.out |4 +

[PATCH 05/12] reflink: test CoW behaviors of reflinked files

2015-10-06 Thread Darrick J. Wong
Ensure that CoW happens correctly with buffered, directio, and mmap writes. Signed-off-by: Darrick J. Wong --- tests/generic/808 | 139 + tests/generic/808.out | 13 + tests/generic/809 | 139

[PATCH V2 3/7] Btrfs: create helper btrfs_find_device_by_user_input()

2015-10-06 Thread Anand Jain
The patch renames btrfs_dev_replace_find_srcdev() to btrfs_find_device_by_user_input() and moves it to volumes.c. so that delete device can use it. Signed-off-by: Anand Jain --- v2: changed title from 'Btrfs: rename btrfs_dev_replace_find_srcdev()' and commit

[PATCH 2/7] Btrfs: clean up and optimize __check_raid_min_device()

2015-10-06 Thread Anand Jain
__check_raid_min_device() which was pealed from btrfs_rm_device() maintianed its original code to show the block move. This patch cleans up __check_raid_min_device(). Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 43 +++ 1 file

[PATCH 0/7] Introduce device delete by devid

2015-10-06 Thread Anand Jain
The operation of device replace and device delete follows same steps upto some depths, however they don't share codes. This set of enhancement will help device replace and device delete to share codes. And at the end add support to delete device using devid. Anand Jain (7): Btrfs: create helper

[PATCH V2 6/7] Btrfs: make use of btrfs_scratch_superblocks() in btrfs_rm_device()

2015-10-06 Thread Anand Jain
With the previous patches now the btrfs_scratch_superblocks() is ready to be used in btrfs_rm_device() so use it. Signed-off-by: Anand Jain --- v2: changelog update fs/btrfs/volumes.c | 78 ++ 1 file changed, 14

[PATCH 4/7] Btrfs: make use of btrfs_find_device_by_user_input()

2015-10-06 Thread Anand Jain
btrfs_rm_device() has a section of the code which can be replaced btrfs_find_device_by_user_input() Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 100 - 1 file changed, 37 insertions(+), 63 deletions(-) diff --git

Re: [RFC][PATCH] btrfs: add ioctl to monitor subvolume dropping

2015-10-06 Thread David Sterba
On Thu, Oct 01, 2015 at 02:30:47PM -0700, Mark Fasheh wrote: > At the moment, userspace has no way of knowing when a snapshot is finally > removed. This has become a problem when writing tests for btrfs, > > http://article.gmane.org/gmane.comp.file-systems.fstests/1239/ In the meantime the

Re: [PATCH v2 1/2] btrfs: Add support to do stack item key operation

2015-10-06 Thread Qu Wenruo
Qu Wenruo wrote on 2015/10/06 08:58 +0800: Normal btrfs_item_key_to_cpu() will need extent buffer to do it, and there is not stack version to handle in memory leaf. Add btrfs_stack_item_key_to_cpu() function for such operation, which will provide the basis for later qgroup fix.

[PATCH v3 1/2] btrfs: Add support to do stack item key operation

2015-10-06 Thread Qu Wenruo
Normal btrfs_item_key_to_cpu() will need extent buffer to do it, and there is not stack version to handle in memory leaf. Add btrfs_stack_item_key_to_cpu() function for such operation, which will provide the basis for later qgroup fix. Signed-off-by: Qu Wenruo --- v2:

[PATCH V3 2/2] btrfs-progs: Introduce device delete by devid

2015-10-06 Thread Anand Jain
From: Anand Jain This patch introduces new option for the command btrfs device delete [..] In a user reported issue on a 3-disk-RAID1, one disk failed with its SB unreadable. Now with this patch user will have a choice to delete the device using

[PATCH V4 08/23] Btrfs: Introduce device delete by devid

2015-10-06 Thread Anand Jain
This introduces new ioctl BTRFS_IOC_RM_DEV_V2, which uses enhanced struct btrfs_ioctl_vol_args_v2 to carry devid as an user argument. The patch won't delete the old ioctl interface and remains backward compatible with user land progs. Test case/script: echo "0 $(blockdev --getsz /dev/sdf) linear

[PATCH] btrfs-progs: subvol sync: fix reversed condition

2015-10-06 Thread David Sterba
In my local change to 07cc891d1d9819d5cf0628af555e7727d289cf7b ("btrfs-progs: Simplify all-subvolumn-clean condition for wait_for_subvolume_cleaning") that reversed the meaning of the variable dirty -> clean, I made a mistake and broke 'subvol sync' that will not wait as expected and ends

Re: [PATCH v2 2/2] btrfs-progs: device delete to accept devid

2015-10-06 Thread Anand Jain
Thanks for the review.. On 09/30/2015 11:14 PM, David Sterba wrote: On Wed, Sep 30, 2015 at 06:03:42AM +0800, Anand Jain wrote: +struct btrfs_ioctl_vol_args_v3 { Can we use struct btrfs_ioctl_vol_args_v2 for that purpose? It contains the 'flags' so we can abuse the name field to store the

Re: btrfs kernel hang? (4.1.3)

2015-10-06 Thread Marc MERLIN
On Mon, Oct 05, 2015 at 10:40:34PM -0700, Marc MERLIN wrote: > I started doing multiple mencoder/ffmpeg commands, and as I ran one > more, the system froze up (as in everything froze, even running ssh > sessions not doing any IO) > > sysrq-W output: > http://marc.merlins.org/tmp/sysrq_4.1.3.txt >

Re: [PATCH v3 1/2] btrfs: Fix lost-data-profile caused by auto removing bg

2015-10-06 Thread Chris Mason
Hi, On Sun, Oct 04, 2015 at 12:28:39AM +0800, Zhao Lei wrote: > diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c > index 79a5bd9..c05b975 100644 > --- a/fs/btrfs/extent-tree.c > +++ b/fs/btrfs/extent-tree.c > @@ -10010,8 +10010,18 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info

Re: [RFC][PATCH] btrfs: add ioctl to monitor subvolume dropping

2015-10-06 Thread Mark Fasheh
On Tue, Oct 06, 2015 at 10:25:52AM +0200, David Sterba wrote: > On Thu, Oct 01, 2015 at 02:30:47PM -0700, Mark Fasheh wrote: > > At the moment, userspace has no way of knowing when a snapshot is finally > > removed. This has become a problem when writing tests for btrfs, > > > >

[PATCH V3 2/2] Btrfs: create a framework to create pool attributes

2015-10-06 Thread Anand Jain
From: Anand Jain We need fsid kobject to hold pool attributes however its created only when fs is mounted. So, this patch changes the life cycle of the fsid and devices kobjects /sys/fs/btrfs/ and /sys/fs/btrfs//devices, from created and destroyed by mount and unmount

[PATCH 1/2, RESEND] Btrfs: sysfs: support seed devices in the sysfs layout

2015-10-06 Thread Anand Jain
This adds an enhancement to show the seed fsid and its devices on the btrfs sysfs. The way sprouting handles fs_devices: clone seed fs_devices and add to the fs_uuids mem copy seed fs_devices and assign to fs_devices->seed (move dev_list) evacuate seed fs_devices contents to

[PATCH V2 1/7] Btrfs: create helper function __check_raid_min_devices()

2015-10-06 Thread Anand Jain
move a section of btrfs_rm_device() code to check for min number of the devices into the function __check_raid_min_devices() Signed-off-by: Anand Jain --- v2: commit update and title renamed from Btrfs: move check for min number of devices to a function