Re: [PATCH v2] generic: check whether we can truncate heavily reflinked file

2016-09-22 Thread Eryu Guan
On Thu, Sep 22, 2016 at 10:13:08AM +0800, Wang Xiaoguang wrote: > In btrfs, there is a bug about btrfs' truncate codes, it'll leak > some fs space as the truncate operation proceeds. If this truncate > operation is very large, later metadata request in this truncate > operation may fail for enospc

Re: [PATCH] generic: check whether we can truncate heavily reflinked file

2016-09-12 Thread Eryu Guan
On Mon, Sep 12, 2016 at 02:36:59PM +0800, Wang Xiaoguang wrote: > Signed-off-by: Wang Xiaoguang It's better to describe the test a bit in the commit log, e.g. why this test is needed etc., which at least could give us some historical information when we look at this case again some time later. I

Re: [PATCH v2] fstests: common: Enhance _exclude_scratch_mount_option to handle multiple options

2016-09-07 Thread Eryu Guan
On Thu, Sep 08, 2016 at 10:52:21AM +0800, Qu Wenruo wrote: > Enhance _exclude_scratch_mount_option() function to normalize mount > options. > Now it can understand and extract real mount option from string like > "-o opt1,opt2 -oopt3". > > And now we do word grep to handle mount options like noino

Re: [PATCH] fstests: common: Enhance _exclude_scratch_mount_option to handle multiply options and generic fs type

2016-09-06 Thread Eryu Guan
On Tue, Sep 06, 2016 at 01:06:39PM +0800, Qu Wenruo wrote: > > > At 09/06/2016 12:20 PM, Eryu Guan wrote: > > On Mon, Sep 05, 2016 at 03:13:33PM +0800, Qu Wenruo wrote: > > > Enhance _exclude_scratch_mount_option() function to get real mount > > > options from $M

Re: [PATCH] fstests: common: Enhance _exclude_scratch_mount_option to handle multiply options and generic fs type

2016-09-05 Thread Eryu Guan
On Mon, Sep 05, 2016 at 03:13:33PM +0800, Qu Wenruo wrote: > Enhance _exclude_scratch_mount_option() function to get real mount > options from $MOUNT_OPTIONS. This seems unnecessarily complex to me. > > Now it can understand and extract real mount option from string like > "-o opt1,opt2 -oopt3".

Re: [PATCH] generic/159: record error value correctly

2016-08-29 Thread Eryu Guan
On Tue, Aug 30, 2016 at 11:51:14AM +0800, Wang Xiaoguang wrote: > This case failed in btrfs, it's because when trying to open an immutable > file, vfs returns EPERM, not EACCESS, fix this. > > Signed-off-by: Wang Xiaoguang > --- > tests/generic/159.out | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH 2/2] btrfs/132: test for crash if btrfs quota disable is killed while waiting on rescan

2016-08-17 Thread Eryu Guan
On Tue, Aug 16, 2016 at 02:30:22PM -0400, Jeff Mahoney wrote: > There was a bug in btrfs where the wait for completion of the qgroup > rescan worker could be interrupted, resulting in a crash in the rescan > worker when the quota root goes away. > > It is possible to interrupt the wait during file

Re: [PATCH 1/2] btrfs/131: test for umount of read-only fs when quota rescan is paused

2016-08-17 Thread Eryu Guan
On Tue, Aug 16, 2016 at 02:30:21PM -0400, Jeff Mahoney wrote: > Ensure that we can unmount a read-only file system when quota rescan > is paused from a previous read-write mount. > > If the kernel has a separate bug where we are returning early while > waiting for the rescan worker, we can use tha

Re: [PATCH v2] xfs: test attr_list_by_handle cursor iteration

2016-08-11 Thread Eryu Guan
On Thu, Aug 11, 2016 at 10:48:55AM -0700, Christoph Hellwig wrote: > On Thu, Aug 04, 2016 at 12:24:48PM +0800, Eryu Guan wrote: > > I have to replace false/true with 0/1 to build it on RHEL6. I can fix it > > at commit time if there's no other major updates. > > Simply

Re: [PATCH 17/17] xfs: test realtime rmapbt code

2016-08-08 Thread Eryu Guan
On Thu, Jul 21, 2016 at 04:48:07PM -0700, Darrick J. Wong wrote: > Test the realtime rmap btree code by exercising various IO patterns > on realtime files. > > Signed-off-by: Darrick J. Wong > --- > tests/xfs/878 | 88 +++ > tests/xfs/878.out |9

Re: [PATCH 15/17] xfs: scrub fs (if still mounted) at the end of the test

2016-08-08 Thread Eryu Guan
On Thu, Jul 21, 2016 at 04:47:51PM -0700, Darrick J. Wong wrote: > Teach _check_xfs_filesystem to scrub mounted filesystems before > unmounting and fscking them. This is mostly to test the online > scrub tool... > > Signed-off-by: Darrick J. Wong > --- > README|3 +++ > common/confi

Re: [PATCH 14/17] xfs: more rmapbt tests

2016-08-08 Thread Eryu Guan
On Thu, Jul 21, 2016 at 04:47:45PM -0700, Darrick J. Wong wrote: > More tests for the reverse mapping functionality. > > Signed-off-by: Darrick J. Wong > --- > tests/xfs/876 | 76 +++ > tests/xfs/876.out |4 ++ > tests/xfs/877 | 85 > +

Re: [PATCH 13/17] xfs: test swapext with reflink

2016-08-08 Thread Eryu Guan
On Thu, Jul 21, 2016 at 04:47:38PM -0700, Darrick J. Wong wrote: > Add a few tests to stress the new swapext code for reflink and rmap. > > Signed-off-by: Darrick J. Wong > --- > tests/xfs/873 | 107 > + > tests/xfs/873.out |6 +++ >

Re: [PATCH 12/17] reflink: test cross-mountpoint reflink and dedupe

2016-08-08 Thread Eryu Guan
On Thu, Jul 21, 2016 at 04:47:32PM -0700, Darrick J. Wong wrote: > Test sharing blocks via reflink and dedupe between two different > mountpoints of the same filesystem. This shouldn't work, since > we don't allow cross-mountpoint functions. > > Signed-off-by: Darrick J. Wong > --- > + > +# rea

Re: [PATCH] generic: test accurate shared extent reporting

2016-08-05 Thread Eryu Guan
On Fri, Aug 05, 2016 at 01:02:12AM -0700, Darrick J. Wong wrote: > On Fri, Aug 05, 2016 at 03:46:07PM +0800, Eryu Guan wrote: > > On Fri, Aug 05, 2016 at 12:21:47AM -0700, Darrick J. Wong wrote: > > > +_count_holes $testdir/file2 > > > +echo "file1 shared extents

Re: [PATCH] generic: test accurate shared extent reporting

2016-08-05 Thread Eryu Guan
On Fri, Aug 05, 2016 at 12:21:47AM -0700, Darrick J. Wong wrote: > Ensure that we can create a file with a single extent, reflink two > blocks out of the middle of that extent, and the resulting fiemap > reports two shared extents, instead of lazily reporting the entire > huge extent as shared. >

Re: [PATCH v2] xfs: test attr_list_by_handle cursor iteration

2016-08-03 Thread Eryu Guan
On Wed, Aug 03, 2016 at 03:51:50PM -0700, Darrick J. Wong wrote: > Apparently the XFS attr_list_by_handle ioctl has never actually copied > the cursor contents back to user space, which means that iteration has > never worked. Add a test case for this and see > "xfs: in _attrlist_by_handle, copy t

Re: [PATCH 07/17] xfs/128: cycle_mount the scratch device, not the test device

2016-08-03 Thread Eryu Guan
On Thu, Jul 21, 2016 at 04:47:01PM -0700, Darrick J. Wong wrote: > This test uses the scratch device, so cycle that, not the test dev. > This is also a xfs_fsr test, so put it in the fsr group. > > Signed-off-by: Darrick J. Wong > --- > tests/xfs/128 |7 --- > tests/xfs/group |2 +-

Re: [PATCH 09/17] common/dmerror: fix mount option issues

2016-08-03 Thread Eryu Guan
On Thu, Jul 21, 2016 at 04:47:13PM -0700, Darrick J. Wong wrote: > Calling _mount doesn't work when we want to add mount options > such as realtime devices. Since it's just a normal scratch device > mount except for the source device, just call _scratch_mount with > SCRATCH_DEV set to the dmerror

Re: [PATCH 06/17] xfs: run xfs_repair at the end of each test

2016-08-03 Thread Eryu Guan
On Thu, Jul 21, 2016 at 04:46:54PM -0700, Darrick J. Wong wrote: > Run xfs_repair twice at the end of each test -- once to rebuild > the btree indices, and again with -n to check the rebuild work. Seems like it's two more xfs_repair, three in total :) > > Signed-off-by: Darrick J. Wong > --- >

Re: [PATCH] xfs: test attr_list_by_handle cursor iteration

2016-08-02 Thread Eryu Guan
On Tue, Aug 02, 2016 at 04:52:51PM -0700, Darrick J. Wong wrote: > Apparently the XFS attr_list_by_handle ioctl has never actually copied > the cursor contents back to user space, which means that iteration has > never worked. Add a test case for this and see the patch > "xfs: in _attrlist_by_hand

Re: [PATCH] generic/371: run write(2) and fallocate(2) in parallel

2016-07-21 Thread Eryu Guan
On Thu, Jul 21, 2016 at 03:30:25PM +0800, Wang Xiaoguang wrote: > Currently in btrfs, there is something wrong with fallocate(2)'s data > space reservation, it'll temporarily occupy more data space thant it > really needs, which in turn will impact other operations' data request. > > In this test

Re: [PATCH] btrfs: Update quick and auto tag for btrfs group

2016-07-21 Thread Eryu Guan
On Thu, Jul 21, 2016 at 10:06:07AM +0800, Qu Wenruo wrote: > Update the following quick/auto tag based on their execution time > 007 > 011 > 050 > 100 > 101 > > Two systems are used to determine their execution time. > One is backed by an SATA spinning rust, whose maximum R/W speed is > about 100M

Re: [PATCH] fstests: btrfs: Test send on heavily deduped file

2016-07-20 Thread Eryu Guan
On Tue, Jul 19, 2016 at 01:42:03PM +0800, Qu Wenruo wrote: > > > > This test uses $LOAD_FACTOR, so it should be in 'stress' group. And it > > hangs the latest kernel, stop other tests from running, I think we can > > add it to 'dangerous' group as well. > > > > Thanks for this info. > I'm comple

Re: [PATCH] fstests: btrfs: Test send on heavily deduped file

2016-07-18 Thread Eryu Guan
On Tue, Jul 19, 2016 at 10:44:02AM +0800, Qu Wenruo wrote: > For fully deduped file, whose file extents are all pointing to the same > extent, btrfs backref walk can be very time consuming, long enough to > trigger softlock. > > Unfortunately, btrfs send is one of the caller of such backref walk >

Re: [PATCH 1/3] btrfs: add test for an incremental send after moving directories around

2016-07-11 Thread Eryu Guan
On Sat, Jul 02, 2016 at 01:32:08PM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > Test that an incremental send operation works after doing radical changes > in the directory hierarchy that involve switching the inode that directory > entries point to. > > This test exercises scenar

Re: [PATCH v6 00/20] xfstests: minor fixes for the reflink/dedupe tests

2016-07-04 Thread Eryu Guan
Hi Darrick, On Thu, Jun 16, 2016 at 06:46:02PM -0700, Darrick J. Wong wrote: > Hi all, > > This is the sixth revision of a patchset that adds to xfstests > support for testing reverse-mappings of physical blocks to file and > metadata (rmap); support for testing multiple file logical blocks to >

Re: [PATCH 19/20] xfs: run xfs_repair at the end of each test

2016-07-04 Thread Eryu Guan
On Thu, Jun 16, 2016 at 06:48:01PM -0700, Darrick J. Wong wrote: > Run xfs_repair twice at the end of each test -- once to rebuild > the btree indices, and again with -n to check the rebuild work. > > Signed-off-by: Darrick J. Wong > --- > common/rc |3 +++ > 1 file changed, 3 insertions(+)

Re: [PATCH 16/20] reflink: test cross-mountpoint reflink and dedupe

2016-07-03 Thread Eryu Guan
On Thu, Jun 16, 2016 at 06:47:42PM -0700, Darrick J. Wong wrote: > Test sharing blocks via reflink and dedupe between two different > mountpoints of the same filesystem. This shouldn't work, since > we don't allow cross-mountpoint functions. > > Signed-off-by: Darrick J. Wong > --- > common/ref

Re: [PATCH v2 5/6] fstests: btrfs: test RAID1 device reappear and balanced

2016-06-30 Thread Eryu Guan
On Thu, Jun 30, 2016 at 07:04:06PM +0800, Anand Jain wrote: > > > Thanks for review comments. > more below.. > > On 06/27/2016 05:29 PM, Eryu Guan wrote: > > On Wed, Jun 22, 2016 at 07:01:54PM +0800, Anand Jain wrote: > > > > > > > > > On 0

Re: [PATCH v2 4/4] btrfs/126,127,128: test feature ioctl and sysfs interfaces

2016-06-29 Thread Eryu Guan
On Mon, Jun 27, 2016 at 04:14:14PM -0400, je...@suse.com wrote: > From: Jeff Mahoney > > This tests the exporting of feature information from the kernel via > sysfs and ioctl. The first test works whether the sysfs permissions > are correct, if the information exported via sysfs matches > what th

Re: [PATCH v2 3/4] btrfs/125: test sysfs exports of allocation and device membership info

2016-06-29 Thread Eryu Guan
On Mon, Jun 27, 2016 at 04:14:13PM -0400, je...@suse.com wrote: > From: Jeff Mahoney > > This tests the sysfs publishing for btrfs allocation and device > membership info under a number of different layouts, similar to the > btrfs replace test. We test the allocation files only for existence and

Re: [PATCH v2 2/4] btrfs/124: test global metadata reservation reporting

2016-06-29 Thread Eryu Guan
On Mon, Jun 27, 2016 at 04:14:12PM -0400, je...@suse.com wrote: > From: Jeff Mahoney > > Btrfs can now report the size of the global metadata reservation > via ioctl and sysfs. > > This test confirms that we get sane results on an empty file system. > > Signed-off-by: Jeff Mahoney > --- > .gi

Re: [PATCH v2 1/4] btrfs/048: extend _filter_btrfs_prop_error to handle additional errors

2016-06-29 Thread Eryu Guan
On Mon, Jun 27, 2016 at 04:14:11PM -0400, je...@suse.com wrote: > From: Jeff Mahoney > > btrfsprogs v4.5.3 changed the formatting of some error messages. This > patch extends the filter for btrfs prop to handle those. > > Signed-off-by: Jeff Mahoney Reviewed-by: Eryu Guan

Re: [PATCH v2 0/4] btrfs feature testing + props fix

2016-06-28 Thread Eryu Guan
On Mon, Jun 27, 2016 at 04:14:10PM -0400, je...@suse.com wrote: > From: Jeff Mahoney > > Hi all - > > Thanks, Eryu, for the review. The btrfs feature testing changes were a > patchet I wrote three years ago, and it looks like significant cleanup > has happened in the xfstests since then. I'm s

Re: [PATCH] fstests: btrfs: Regression test for leaking data reserved space

2016-06-27 Thread Eryu Guan
> > Signed-off-by: Qu Wenruo Looks good to me. Tested on x86_64 and ppc64 hosts, x86_64 host failed the test as expected, ppc64 host didn't though. Reviewed-by: Eryu Guan -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a messa

Re: [PATCH v2 5/6] fstests: btrfs: test RAID1 device reappear and balanced

2016-06-27 Thread Eryu Guan
On Wed, Jun 22, 2016 at 07:01:54PM +0800, Anand Jain wrote: > > > On 06/21/2016 09:31 PM, Eryu Guan wrote: > > On Wed, Jun 15, 2016 at 04:48:47PM +0800, Anand Jain wrote: > > > From: Anand Jain > > > > > > The test does the following: > > >

Re: [PATCH 4/4] fstests: btrfs/126,127,128: test feature ioctl and sysfs interfaces

2016-06-27 Thread Eryu Guan
On Fri, Jun 24, 2016 at 11:08:34AM -0400, je...@suse.com wrote: > From: Jeff Mahoney > > This tests the exporting of feature information from the kernel via > sysfs and ioctl. The first test works whether the sysfs permissions > are correct, if the information exported via sysfs matches > what th

Re: [PATCH 3/4] fstests: btrfs/125: test sysfs exports of allocation and device membership info

2016-06-27 Thread Eryu Guan
On Fri, Jun 24, 2016 at 11:08:33AM -0400, je...@suse.com wrote: > From: Jeff Mahoney > > This tests the sysfs publishing for btrfs allocation and device > membership info under a number of different layouts, similar to the > btrfs replace test. We test the allocation files only for existence and

Re: [PATCH 2/4] fstests: btrfs/124: test global metadata reservation reporting

2016-06-27 Thread Eryu Guan
On Mon, Jun 27, 2016 at 03:16:47PM +0800, Eryu Guan wrote: > On Fri, Jun 24, 2016 at 11:08:32AM -0400, je...@suse.com wrote: > > From: Jeff Mahoney > > [snip] > > + > > +# get standard environment, filters and checks > > +. ./common/rc > > +. ./common/filt

Re: [PATCH 2/4] fstests: btrfs/124: test global metadata reservation reporting

2016-06-27 Thread Eryu Guan
On Fri, Jun 24, 2016 at 11:08:32AM -0400, je...@suse.com wrote: > From: Jeff Mahoney > > Btrfs can now report the size of the global metadata reservation > via ioctl and sysfs. > > This test confirms that we get sane results on an empty file system. > > ENOTTY and missing /sys/fs/btrfs//allocat

Re: [PATCH 1/4] fstests: btrfs/048: extend _filter_btrfs_prop_error to handle additional errors

2016-06-26 Thread Eryu Guan
On Fri, Jun 24, 2016 at 11:08:31AM -0400, je...@suse.com wrote: > From: Jeff Mahoney > > btrfsprogs v4.5.3 changed the formatting of some error messages. This > patch extends the filter for btrfs prop to handle those. > > Signed-off-by: Jeff Mahoney > --- > common/filter.btrfs | 10 +++---

Re: [PATCH v2] fstests: btrfs: fix 006 adds _runnt_btrfs_util_prog()

2016-06-23 Thread Eryu Guan
On Thu, Jun 23, 2016 at 07:34:49PM +0800, Anand Jain wrote: > > > On 06/23/2016 07:18 PM, Eryu Guan wrote: > > On Thu, Jun 23, 2016 at 07:03:59PM +0800, Anand Jain wrote: > > > > > > > > > On 06/23/2016 06:53 PM, Eryu Guan wrote: > > [sn

Re: [PATCH v2] fstests: btrfs: fix 006 adds _runnt_btrfs_util_prog()

2016-06-23 Thread Eryu Guan
On Thu, Jun 23, 2016 at 07:03:59PM +0800, Anand Jain wrote: > > > On 06/23/2016 06:53 PM, Eryu Guan wrote: [snip] > > > diff --git a/common/rc b/common/rc > > > index a44fb8750220..2a10fbb2d341 100644 > > > --- a/common/rc > > > +++ b/common/rc &g

Re: [PATCH v2] fstests: btrfs: fix 006 adds _runnt_btrfs_util_prog()

2016-06-23 Thread Eryu Guan
On Thu, Jun 23, 2016 at 06:37:32PM +0800, Anand Jain wrote: > btrfs fi sync /mnt, now does not output anything for success, > so the 006.out should be updated. > > This change in btrfs-progs was introduced in the commit > b005ca024990569d2de459485682158633937928 >btrfs-progs: fi sync: make it

Re: [PATCH] fstests: btrfs: fix 006 adds _runnt_btrfs_util_prog()

2016-06-23 Thread Eryu Guan
On Thu, Jun 23, 2016 at 06:01:36PM +0800, Anand Jain wrote: > btrfs fi sync /mnt, now does not output anything for success, > so the 006.out should be updated. btrfs-progs v4.4 still outputs "FSSync ''", it'd be good to state starting from which version or commit the behavior changes. > > Furthe

Re: [PATCH] btrfs: check truncate can update file size correctly when truncate fails

2016-06-23 Thread Eryu Guan
On Thu, Jun 23, 2016 at 03:36:40PM +0800, Wang Xiaoguang wrote: > In btrfs, when truncate operation fails for enospc reason, file may still > have some disk blocks, but it will fail to update filesize accordingly. > > Signed-off-by: Wang Xiaoguang > --- > tests/btrfs/124 | 86 >

Re: [PATCH v2 5/6] fstests: btrfs: test RAID1 device reappear and balanced

2016-06-21 Thread Eryu Guan
On Wed, Jun 15, 2016 at 04:48:47PM +0800, Anand Jain wrote: > From: Anand Jain > > The test does the following: > Initialize a RAID1 with some data > > Re-mount RAID1 degraded with _dev1_ and write up to > half of the FS capacity If test devices are big enough, this test consumes much lon

Re: [PATCH v2 1/6] fstests: btrfs: add functions to set and reset required number of SCRATCH_DEV_POOL

2016-06-21 Thread Eryu Guan
On Wed, Jun 15, 2016 at 04:46:03PM +0800, Anand Jain wrote: > From: Anand Jain > > This patch provides functions > _scratch_dev_pool_get() > _scratch_dev_pool_put() > > Which will help to set/reset SCRATCH_DEV_POOL with the required > number of devices. SCRATCH_DEV_POOL_SAVED will hold all the

BUG: unable to mount btrfs on ppc64 starting from v4.7-rc3 kernel

2016-06-14 Thread Eryu Guan
Hi, I'm unable to mount btrfs on ppc64 hosts and other hosts with 64k pagesize(like aarch64, ppc64le). It seems that it's commit 99e3ecfcb9f4 ("Btrfs: add more validation checks for superblock") introduced this failure, btrfs fails stripesize check. [root@ibm-p8-kvm-09-guest-06 btrfs-progs]# unam

Re: [PATCH v4] fstests: btrfs: add test for qgroup handle extent de-reference

2016-06-14 Thread Eryu Guan
e still need to prevent any > regression which may break current qgroup. > > Signed-off-by: Lu Fengqi Looks good to me. Reviewed-by: Eryu Guan -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More major

Re: [PATCH v3] fstests: btrfs: add test for qgroup handle extent de-reference

2016-06-12 Thread Eryu Guan
On Mon, Jun 13, 2016 at 10:10:50AM +0800, Lu Fengqi wrote: > Test if qgroup can handle extent de-reference during reallocation. > "extent de-reference" means that reducing an extent's reference count > or freeing an extent. > Although current qgroup can handle it, we still need to prevent any > reg

Re: [PATCH 6/6] fstests: btrfs: test RAID5 device reappear and balance

2016-06-11 Thread Eryu Guan
On Tue, May 17, 2016 at 10:32:10PM +0800, Anand Jain wrote: > The test does the following: > Initialize a RAID5 with some data > > Re-mount RAID5 degraded with _dev3_ missing and write data. > Save md5sum checkpoint1 > > Re-mount healthy RAID5 > > Let balance fix degraded blocks. > Save md5sum c

Re: [PATCH 5/6] fstests: btrfs: test RAID1 device reappear and balanced

2016-06-11 Thread Eryu Guan
On Tue, May 17, 2016 at 10:32:09PM +0800, Anand Jain wrote: > The test does the following: > Initialize a RAID1 with some data > > Re-mount RAID1 degraded with _dev1_ and write up to > half of the FS capacity > Save md5sum checkpoint1 > > Re-mount healthy RAID1 > > Let balance re-sil

Re: [PATCH 4/6] fstests: btrfs: add helper function to check if btrfs is module

2016-06-11 Thread Eryu Guan
On Tue, May 17, 2016 at 10:32:08PM +0800, Anand Jain wrote: > We need btrfs to be a module so that it can unloaded and reloaded, > so that we can clean up the btrfs internal in memory device list. It looks like a bug to me if btrfs needs to reload module to clean up the device list. If a user buil

Re: [PATCH 2/6] fstests: btrfs: add functions to get and put a device for replace target

2016-06-11 Thread Eryu Guan
On Tue, May 17, 2016 at 10:32:06PM +0800, Anand Jain wrote: > For the replace tests we need a device as a spare device, > here functions _spare_dev_get() and _spare_dev_put() > will get it from the SCRATCH_DEV_POOL_SAVED, which is set > when _scratch_dev_pool_get() is called, and is based on how >

Re: [PATCH 1/6] fstests: btrfs: add functions to set and reset required number of SCRATCH_DEV_POOL

2016-06-11 Thread Eryu Guan
On Tue, May 17, 2016 at 10:32:05PM +0800, Anand Jain wrote: > This patch provides functions > _scratch_dev_pool_get() > _scratch_dev_pool_put() > > Which will help to set/reset SCRATCH_DEV_POOL with the required > number of devices. SCRATCH_DEV_POOL_SAVED will hold all the devices. > > Usage: >

Re: [PATCH v2] fstests: btrfs: add test for qgroup handle extent de-reference

2016-06-11 Thread Eryu Guan
On Wed, Jun 01, 2016 at 02:40:11PM +0800, Lu Fengqi wrote: > Test if qgroup can handle extent de-reference during reallocation. > "extent de-reference" means that reducing an extent's reference count > or freeing an extent. > Although current qgroup can handle it, we still need to prevent any > reg

Re: [PATCH v2] fstests: generic: Test reserved extent map search routine on deduped file

2016-05-23 Thread Eryu Guan
On Thu, May 12, 2016 at 03:37:39PM +0800, Qu Wenruo wrote: > For fully deduped file, which means all its file exntents are pointing to > the same bytenr, btrfs can cause soft lockup when calling fiemap ioctl > on that file, like the following output: [snip] > + > +# then call fiemap on that file to

Re: [PATCH] fstests: generic test for fsync after adding a link and moving other inode

2016-04-07 Thread Eryu Guan
s after fsync log replay > > Tested against ext3/4, xfs, reiserfs and f2fs. > > Signed-off-by: Filipe Manana Looks good to me. Test passed with ext3/4 and xfs, failed with btrfs as expected. Reviewed-by: Eryu Guan -- To unsubscribe from this list: send the line "unsubs

Re: [PATCH 2/2] fstests: generic test for fsync after renaming file

2016-03-30 Thread Eryu Guan
ode" > > Signed-off-by: Filipe Manana Looks good to me, tested on ext4/3 xfs and btrfs, with 4.6-rc1 kernel, btrfs failed as expected, ext4/3 and xfs all passed. Reviewed-by: Eryu Guan -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a

Re: [PATCH 1/2] fstests: generic test for fsync after renaming directory

2016-03-30 Thread Eryu Guan
aused by fsync after rename and new inode" > > Signed-off-by: Filipe Manana Looks good to me, tested on ext4/3 xfs and btrfs, with 4.6-rc1 kernel, btrfs failed as expected, ext4/3 and xfs all passed. Reviewed-by: Eryu Guan -- To unsubscribe from this list: send the line "un

Re: [PATCH v2] fstests: add btrfs test for fsync after snapshot deletion

2016-03-25 Thread Eryu Guan
on > > Signed-off-by: Filipe Manana Looks good to me, test failed on v4.5 kernel and passed with above patch (and dependencies) applied . Reviewed-by: Eryu Guan -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to ma

Re: [PATCH] fstests: add btrfs test for fsync after snapshot deletion

2016-03-25 Thread Eryu Guan
On Fri, Mar 25, 2016 at 12:58:52PM +0100, Holger Hoffstätte wrote: > On 03/25/16 04:53, Eryu Guan wrote: > > Test fails on v4.5 kernel as expected, but I failed to compile btrfs > > after applying this patch, seems btrfs_must_commit_transaction was not > > defined anywhere (

Re: [PATCH] fstests: add btrfs test for fsync after snapshot deletion

2016-03-24 Thread Eryu Guan
On Thu, Mar 24, 2016 at 05:07:21PM +, fdman...@kernel.org wrote: > From: Filipe Manana > > Test that if we delete a snapshot, delete its parent directory, create > another directory with the same name as that parent and then fsync either > the new directory or a file inside the new directory,

Re: [PATCH Resend] fstests: btrfs, test log replay with qgroups enabled and orphan roots

2016-03-24 Thread Eryu Guan
rfs, introduced in the linux kernel > 4.4 release, and is fixed by the linux kernel commit 909c3a22da3b > ("Btrfs: fix loading of orphan roots leading to BUG_ON") that landed in > kernel 4.5. > > Signed-off-by: Filipe Manana Looks good to me, test passed on v4.5

Re: [PATCH] fstest: btrfs: update 048.out inline with ui changes

2016-03-24 Thread Eryu Guan
On Thu, Mar 24, 2016 at 06:11:12PM +0800, Anand Jain wrote: > To be inline with progs changes > 28831d54895443e5fc795392f23ce3a8b122cb71 > btrfs-progs: cmd property: switch to common error message wrapper > update 048.out > > Signed-off-by: Anand Jain > --- > tests/btrfs/048.out | 2 +- > 1

Re: [PATCH] fstest: btrfs: remove _need_to_be_root fix btrfs/118

2016-03-24 Thread Eryu Guan
On Thu, Mar 24, 2016 at 06:13:59PM +0800, Anand Jain wrote: > commit 56ff01f471c9b72de0a447b37cdb1051adcede6a > xfstests: remove _need_to_be_root > > Removed _need_to_be_root(), and so btrfs/118 needs an update It has been fixed by 3a92426 btrfs/118: remove call to _need_to_be_root Perhaps y

Re: [PATCH v3] fstest: btrfs: test single 4k extent after subpagesize buffered writes

2016-03-24 Thread Eryu Guan
On Wed, Mar 23, 2016 at 09:55:52PM -0700, Liu Bo wrote: > This is to test if COW enabled btrfs can end up with single 4k extents > when doing subpagesize buffered writes. > > Signed-off-by: Liu Bo Looks good to me. Reviewed-by: Eryu Guan -- To unsubscribe from this list: s

Re: [PATCH v2] fstest: btrfs: test single 4k extent after subpagesize buffered writes

2016-03-23 Thread Eryu Guan
On Tue, Mar 22, 2016 at 03:12:25PM -0700, Liu Bo wrote: > On Tue, Mar 22, 2016 at 12:00:13PM +0800, Eryu Guan wrote: > > On Thu, Mar 17, 2016 at 03:56:38PM -0700, Liu Bo wrote: > > > This is to test if COW enabled btrfs can end up with single 4k extents > > > when doing

Re: [PATCH] fstests: _fail the tests if _scratch_mount failed to avoid fully filling root fs

2016-03-23 Thread Eryu Guan
On Wed, Mar 23, 2016 at 11:23:29AM +0800, Eryu Guan wrote: > On Wed, Mar 23, 2016 at 11:08:56AM +1100, Dave Chinner wrote: > > On Mon, Mar 21, 2016 at 03:23:41PM +0800, Eryu Guan wrote: > > > btrfs failed to mount small fs on ppc64 host with error ENOSPC, even > >

Re: [PATCH] fstests: _fail the tests if _scratch_mount failed to avoid fully filling root fs

2016-03-22 Thread Eryu Guan
On Wed, Mar 23, 2016 at 11:08:56AM +1100, Dave Chinner wrote: > On Mon, Mar 21, 2016 at 03:23:41PM +0800, Eryu Guan wrote: > > btrfs failed to mount small fs on ppc64 host with error ENOSPC, even > > creating such small fs succeeded, then generic/027 consumed all free > > sp

Re: [PATCH v2] fstests: test fsync on overlayfs merged directory

2016-03-22 Thread Eryu Guan
On Tue, Mar 22, 2016 at 11:07:06AM +, Filipe Manana wrote: > On Tue, Mar 22, 2016 at 3:00 AM, Eryu Guan wrote: ... > >> + > >> +# real QA test starts here > >> +_supported_fs generic > > > > The supported fs should be "overlay"? overlay/00

Re: [PATCH v2] fstest: btrfs: test single 4k extent after subpagesize buffered writes

2016-03-21 Thread Eryu Guan
On Thu, Mar 17, 2016 at 03:56:38PM -0700, Liu Bo wrote: > This is to test if COW enabled btrfs can end up with single 4k extents > when doing subpagesize buffered writes. What happens if btrfs is mounted with "nodatacow" option? Does it need to _notrun if cow is disabled? > > The patch to fix th

Re: [PATCH] fstests: check for general protection fault traces in _check_dmesg

2016-03-21 Thread Eryu Guan
> 41 ff 84 24 > [15277.936011] RIP [] btrfs_sync_file+0x11b/0x3e9 [btrfs] > [15277.936011] RSP > [15277.974598] ---[ end trace 721e14960eb939c1 ]--- > > So teach it to look out for such traces. > > Signed-off-by: Filipe Manana Looks good to me. Reviewed-by: Eryu Gua

Re: [PATCH v2] fstests: test fsync on overlayfs merged directory

2016-03-21 Thread Eryu Guan
> + > +_cleanup() > +{ > + cd / > + rm -f $tmp.* > +} > + > +# get standard environment, filters and checks > +. ./common/rc > +. ./common/filter > + > +# remove previous $seqres.full before test > +rm -f $seqres.full > + > +# real QA test

Re: [PATCH V2] _btrfs_stress_subvolume: Fix race condition by making 'subvolume stress' task to exit gracefully

2016-03-21 Thread Eryu Guan
t; Instead of killing the 'subvolume stress' task this commit makes > _btrfs_stress_subvolume() to break out of the loop when a file exists > on the filesystem. The commit also makes relevant changes to other > users of _btrfs_stress_subvolume() i.e. btrfs/060, btrfs/065, > btrfs/0

[PATCH] fstests: _fail the tests if _scratch_mount failed to avoid fully filling root fs

2016-03-21 Thread Eryu Guan
_MNT, _fail the test if _scratch_mount failed. Signed-off-by: Eryu Guan --- tests/generic/027 | 2 +- tests/generic/269 | 2 +- tests/generic/270 | 2 +- tests/generic/274 | 2 +- tests/generic/275 | 2 +- tests/generic/300 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/te

Re: [PATCH v2] fstest: btrfs: test single 4k extent after subpagesize buffered writes

2016-03-19 Thread Eryu Guan
On Wed, Mar 16, 2016 at 09:13:57PM -0700, Liu Bo wrote: > On Tue, Mar 15, 2016 at 02:39:41PM +1100, Dave Chinner wrote: > > On Mon, Mar 07, 2016 at 04:27:59PM -0800, Liu Bo wrote: > > > This is to test if COW enabled btrfs can end up with single 4k extents > > > when doing subpagesize buffered writ

Re: [RFC PATCH] btrfs/066: Fix race condition by making 'subvolume stress' task to exit gracefully

2016-03-18 Thread Eryu Guan
On Thu, Mar 17, 2016 at 11:44:29AM +0530, Chandan Rajendra wrote: > The following scenario can occur when running btrfs/066, > > Task ATask B Task C > > run_test() > - Execute _btrfs_stress_subvolume() > in a background shell. >

Re: [PATCH 1/2] fstests: fix btrfs test failures after commit 27d077ec0bda

2015-12-22 Thread Eryu Guan
ram or pass it the mount point. > > Using $SCRATCH_MNT as a mountpoint for a device other than $SCRATCH_DEV is > misleading, but that's a different problem that existed long before and > this change attempts only to fix the regression from 27d077ec0bda. > > Signed-off-by: Filipe M

Re: [PATCH] fstests: fix btrfs/091 failure due to not found _require_cp_reflink

2015-11-18 Thread Eryu Guan
; to see the entire diff) > > So just make btrfs/091 source common/reflink in order to know the > definition of _require_cp_reflink. > > Signed-off-by: Filipe Manana Reviewed-by: Eryu Guan -- To unsubscribe from this list: send the line "unsubscribe linux-bt

Re: [PATCH] xfstests: btrfs/012: add a regression test for deleting ext2_saved

2015-10-22 Thread Eryu Guan
dds a regression test for this. > > Signed-off-by: Liu Bo I'm not sure if this belongs to a new test, but given that this test has very similar steps to existing tests, so I think that's fine. Reviewed-by: Eryu Guan > --- > tests/btrfs/012 | 12 > 1 file chan

Re: [PATCH 02/10] btrfs-progs: save error number correctly in check_chunks_and_extents

2015-10-20 Thread Eryu Guan
On Mon, Oct 19, 2015 at 03:41:04PM +0200, David Sterba wrote: > On Mon, Oct 19, 2015 at 07:37:52PM +0800, Eryu Guan wrote: > > Coverity reports assigning value from "err" to "ret", but that stored > > value is overwritten by check_extent_refs() before it can

[PATCH 10/10] btrfs-progs: return -ENOMEM properly in btrfs_read_block_groups()

2015-10-19 Thread Eryu Guan
Breaking from the while loop makes ret overwritten to zero, goto error label directly and return -ENOMEM. Signed-off-by: Eryu Guan --- extent-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extent-tree.c b/extent-tree.c index 0c8152a..97cf961 100644 --- a/extent

[PATCH 09/10] btrfs-progs: fix memory leak in cmd_qgroup_show()

2015-10-19 Thread Eryu Guan
filter_set and comparer_set should be freed on return. Signed-off-by: Eryu Guan --- cmds-qgroup.c | 2 ++ qgroup.c | 1 + 2 files changed, 3 insertions(+) diff --git a/cmds-qgroup.c b/cmds-qgroup.c index 48c1733..82bd2e2 100644 --- a/cmds-qgroup.c +++ b/cmds-qgroup.c @@ -354,6 +354,8

[PATCH 08/10] btrfs-progs: remove identical branch in record_extent()

2015-10-19 Thread Eryu Guan
The same code is executed when the condition "ret" is true or false, because the code in the if-then branch and after the if statement is identical. Signed-off-by: Eryu Guan --- cmds-check.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmds-check.c b/cmds-check.c index 118a27

[PATCH 07/10] btrfs-progs: fix memory leak on error path

2015-10-19 Thread Eryu Guan
dev_scans and t_scans should be freed on malloc error. Signed-off-by: Eryu Guan --- chunk-recover.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/chunk-recover.c b/chunk-recover.c index 1fb04f7..c727f0f 100644 --- a/chunk-recover.c +++ b/chunk-recover.c @@ -847,11

[PATCH 06/10] btrfs-progs: vailidate pointer before dereferencing it in btrfs_cow_block()

2015-10-19 Thread Eryu Guan
Check trans before dereferencing it. Signed-off-by: Eryu Guan --- ctree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctree.c b/ctree.c index 1434007..f9d972a 100644 --- a/ctree.c +++ b/ctree.c @@ -356,7 +356,7 @@ int btrfs_cow_block(struct btrfs_trans_handle *trans

[PATCH 05/10] btrfs-progs: mute coverity warnings about deadcode

2015-10-19 Thread Eryu Guan
Coverity reports execution cannot reach this statements. So put WARN_ON in if-else conditions. Signed-off-by: Eryu Guan --- backref.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backref.c b/backref.c index 9a2efca..8f41f82 100644 --- a/backref.c +++ b/backref.c

[PATCH 04/10] btrfs-progs: return -EIO properly in restore_metadump()

2015-10-19 Thread Eryu Guan
Error number -EIO is assigned to ret but later ret is overwritten by wait_for_worker(). Signed-off-by: Eryu Guan --- btrfs-image.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/btrfs-image.c b/btrfs-image.c index 82eed05..7d3a2f8 100644 --- a/btrfs-image.c +++ b/btrfs

[PATCH 03/10] btrfs-progs: remove deadcode around metadump_v2 in check_chunk_refs

2015-10-19 Thread Eryu Guan
metadump_v2 is initialized to 0 and never updated again. So remove the deadcode. Signed-off-by: Eryu Guan --- I'm not sure about this one, seems metadump_v2 should be initialized depending on whether superblock has BTRFS_SUPER_FLAG_METADUMP_V2 flag set. cmds-check.c | 7 +-- 1

[PATCH 02/10] btrfs-progs: save error number correctly in check_chunks_and_extents

2015-10-19 Thread Eryu Guan
Coverity reports assigning value from "err" to "ret", but that stored value is overwritten by check_extent_refs() before it can be used. Signed-off-by: Eryu Guan --- cmds-check.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cmds-check.c

[PATCH 02/10] btrfs-progs: save and return error number correctly in check_chunks_and_extents

2015-10-19 Thread Eryu Guan
"err" is assigned to "ret" then "ret" gets overwritten by check_extent_refs() before "ret" can be used. Signed-off-by: Eryu Guan --- cmds-check.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cmds-check.c b/cmds-che

[PATCH 01/10] btrfs-progs: fix leak of "path" in btrfs_find_item() error paths

2015-10-19 Thread Eryu Guan
path needs to be freed before return. Signed-off-by: Eryu Guan --- ctree.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/ctree.c b/ctree.c index e6e5689..1434007 100644 --- a/ctree.c +++ b/ctree.c @@ -1058,26 +1058,28 @@ int btrfs_find_item(struct

Re: [PATCH v2] fstests: generic: Check if a bull fallocate will change extent number

2015-09-29 Thread Eryu Guan
On Tue, Sep 29, 2015 at 06:16:11PM +0800, Qu Wenruo wrote: > > >>+ > >>+if [ "x$orig_extent_nr" != "x$new_extent_nr" ]; then > >>+ echo "number of extents mis-match after bull fallocate" > > > >print out the $orig_extent_nr and $new_extent_nr in this failure case? I > >think it's useful to see t

Re: [PATCH v2] fstests: generic: Check if a bull fallocate will change extent number

2015-09-29 Thread Eryu Guan
On Tue, Sep 29, 2015 at 05:34:24PM +0800, Qu Wenruo wrote: > Normally, a bull fallocate call on a fully written and synced file > should not add an extent. > > But not all filesystem follows the correct behavior. > > Btrfs has a bug to always truncate the last page if the fallocate start > offset

Re: [PATCH] fstests: test for btrfs incremental send after replacing a file

2015-09-29 Thread Eryu Guan
On Tue, Sep 29, 2015 at 09:33:34AM +0100, Filipe Manana wrote: > On Tue, Sep 29, 2015 at 4:54 AM, Eryu Guan wrote: > > On Sat, Sep 26, 2015 at 12:40:13PM +0100, fdman...@kernel.org wrote: > >> From: Filipe Manana > >> > >> Test that an incremental send works a

Re: [PATCH] fstests: test for btrfs incremental send after replacing a file

2015-09-28 Thread Eryu Guan
On Sat, Sep 26, 2015 at 12:40:13PM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > Test that an incremental send works after a file from the parent snapshot > gets replaced in the send snapshot by another one at the same exact > location, with the same name and with the same inode num

Re: [PATCH] fstests: btrfs regression test for fsync after extent cloning

2015-09-07 Thread Eryu Guan
fter the extent cloning operation. > > This test is motivated by an issue found in btrfs that is fixed by the > linux kernel patch titled: > > "Btrfs: fix file read corruption after extent cloning and fsync" > > Signed-off-by: Filipe Manana Looks good to me.

<    1   2   3   4   5   >