Re: btrfs zero divide

2013-08-13 Thread Geert Uytterhoeven
On Fri, Aug 9, 2013 at 2:30 PM, Andreas Schwab wrote: > Andreas Schwab writes: >> Josef Bacik writes: >>> So stripe_len shouldn't be 0, if it is you have bigger problems :). [ lost context: this is about the first do_div() in __btrfs_map_block() ] >> The bigger problem is that stripe_nr is u64

Re: Kernel BUG on Snapshot Deletion (3.11.0-rc5)

2013-08-13 Thread Josef Bacik
On Mon, Aug 12, 2013 at 11:06:27PM -0500, Mitch Harder wrote: > I'm hitting a btrfs Kernel BUG running a snapshot stress script with > linux-3.11.0-rc5. > I can haz script? Thanks, Josef -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord

Re: [PATCH] Btrfs: don't allow a subvol to be deleted if it is the default subovl

2013-08-13 Thread Josef Bacik
On Tue, Aug 13, 2013 at 04:54:32AM +, Duncan wrote: > Josef Bacik posted on Mon, 12 Aug 2013 15:39:35 -0400 as excerpted: > > > Fix this by adding a check to see if our default subvol points to the > > subvol we are trying to delete, and if it does not allowing it to > > happen. > > Umm... no

Re: [PATCH v3 1/2] xfstests: add fssum tool

2013-08-13 Thread Josef Bacik
On Sun, Aug 11, 2013 at 09:54:41PM -0500, Eric Sandeen wrote: > On Aug 11, 2013, at 8:15 PM, Dave Chinner wrote: > > > On Thu, Aug 08, 2013 at 12:40:55PM -0500, Eric Sandeen wrote: > >> On 8/8/13 3:17 AM, Jan Schmidt wrote: > >>> SUBDIRS = > >>> > >>> LLDLIBS = $(LIBATTR) $(LIBHANDLE) $(LIBACL)

Re: btrfs-ino-cache is running on each reboot

2013-08-13 Thread Josef Bacik
On Tue, Aug 13, 2013 at 10:28:59AM +0900, dima wrote: > Hello all, > > About a week or so ago I noticed that [btrfs-ino-cache] process was > appearing in the 'top' on each reboot and disk is spinning like crazy for > about five minutes or so. Quite so often this caused X failing to start > because

Re: [PATCH] _test_generic_punch: Extend $testfile's size to work with 64k block.

2013-08-13 Thread chandan
Hello Dave, > So, to do this properly, I'd suggest that the code needs to scale > the offset/size of the IO being done by the filesystem block size, > not use a fixed size. Using a filter on the bmap output to handle > the different block ranges will ensure everything works correctly > from a gold

Re: Kernel BUG on Snapshot Deletion (3.11.0-rc5)

2013-08-13 Thread Mitch Harder
Let me work on making that script more portable, and hopefully quicker to reproduce. On Tue, Aug 13, 2013 at 9:15 AM, Josef Bacik wrote: > On Mon, Aug 12, 2013 at 11:06:27PM -0500, Mitch Harder wrote: >> I'm hitting a btrfs Kernel BUG running a snapshot stress script with >> linux-3.11.0-rc5. >>

Re: [PATCH v3 1/2] xfstests: add fssum tool

2013-08-13 Thread Eric Sandeen
On 8/13/13 10:28 AM, Josef Bacik wrote: > On Sun, Aug 11, 2013 at 09:54:41PM -0500, Eric Sandeen wrote: >> On Aug 11, 2013, at 8:15 PM, Dave Chinner wrote: >> >>> On Thu, Aug 08, 2013 at 12:40:55PM -0500, Eric Sandeen wrote: On 8/8/13 3:17 AM, Jan Schmidt wrote: > SUBDIRS = > > LL

Re: btrfs zero divide

2013-08-13 Thread Geert Uytterhoeven
On Fri, 9 Aug 2013, Zach Brown wrote: > On Fri, Aug 09, 2013 at 02:26:36PM +0200, Andreas Schwab wrote: > > Josef Bacik writes: > > > > > So stripe_len shouldn't be 0, if it is you have bigger problems :). > > > > The bigger problem is that stripe_nr is u64, this is completely bogus. > > The fir

[PATCH v4 2/2] xfstests btrfs/316: test send / receive

2013-08-13 Thread Jan Schmidt
Basic send / receive functionality test for btrfs. Requires current version of fsstress built (-x support). Relies on fssum tool but can skip the test if it failed to build. Signed-off-by: Jan Schmidt Reviewed-by: Josef Bacik --- tests/btrfs/316 | 116 ++

[PATCH v4 0/2] xfstest btrfs/316: test send / receive

2013-08-13 Thread Jan Schmidt
These two patches add the announced tests for btrfs send / receive. As requested, the fssum tool is now included. -- v1->v2: - included fssum - test number is now 316 (was 314) v2->v3: - added missing -lcrypto to build fssum - removed obsolete change in README now that fssum is included - fix

[PATCH v4 1/2] xfstests: add fssum tool

2013-08-13 Thread Jan Schmidt
fssum is a tool to build a recursive checksum for a file system. The home repository of fssum is git://git.kernel.org/pub/scm/linux/kernel/git/arne/far-progs.git Signed-off-by: Jan Schmidt --- .gitignore |1 + aclocal.m4 |1 + configure.ac |1 + inclu

[PATCH] Btrfs: fix the error handling wrt orphan items

2013-08-13 Thread Josef Bacik
There are several places where we BUG_ON() if we fail to remove the orphan items and such, which is not ok, so remove those and either abort or just carry on. This also fixes a problem where if we couldn't start a transaction we wouldn't actually remove the orphan item reserve for the inode. Thank

Re: [PATCH v4 0/2] xfstest btrfs/316: test send / receive

2013-08-13 Thread Eric Sandeen
On 8/13/13 12:24 PM, Jan Schmidt wrote: > These two patches add the announced tests for btrfs send / receive. As > requested, the fssum tool is now included. Thanks for the updates. Both: Reviewed-by: Eric Sandeen > -- > v1->v2: > - included fssum > - test number is now 316 (was 314) > v2->v

Re: [PATCH 4/6] btrfs-progs: mkfs.c overwrites fd without appropriate close

2013-08-13 Thread Josef Bacik
On Fri, Jul 26, 2013 at 01:35:28AM +0800, Anand Jain wrote: > Signed-off-by: Anand Jain > --- > mkfs.c |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/mkfs.c b/mkfs.c > index 60f906c..66f558a 100644 > --- a/mkfs.c > +++ b/mkfs.c > @@ -1570,6 +1570,8 @@ int main(in

Re: [PATCH 4/6] btrfs-progs: mkfs.c overwrites fd without appropriate close

2013-08-13 Thread Josef Bacik
On Tue, Aug 13, 2013 at 03:14:08PM -0400, Josef Bacik wrote: > On Fri, Jul 26, 2013 at 01:35:28AM +0800, Anand Jain wrote: > > Signed-off-by: Anand Jain > > --- > > mkfs.c |3 ++- > > 1 files changed, 2 insertions(+), 1 deletions(-) > > > > diff --git a/mkfs.c b/mkfs.c > > index 60f906c..66f

[PATCH] xfstests: btrfs/003: regression test for subvol delete V2

2013-08-13 Thread Josef Bacik
We were allowing users to delete their default subvolume, which is problematic. This test is a regression test to make sure we don't let that happen in the future. Thanks, Signed-off-by: Josef Bacik --- V1->V2: address the comments made by Eric Sandeen. tests/btrfs/003 | 66 +

Re: [PROGS PATCH] Import btrfs-extent-same

2013-08-13 Thread Mark Fasheh
Hey Dave, On Tue, Aug 06, 2013 at 05:31:12PM +0200, David Sterba wrote: > On Thu, Jun 27, 2013 at 12:38:19AM +0200, Gabriel de Perthuis wrote: > > Originally from > > https://github.com/markfasheh/duperemove/blob/master/btrfs-extent-same.c > > Can you (or Mark) please turn it into a subcommand of

Re: [PATCH] xfstests: btrfs/003: regression test for subvol delete V2

2013-08-13 Thread Eric Sandeen
On 8/13/13 2:34 PM, Josef Bacik wrote: > We were allowing users to delete their default subvolume, which is > problematic. > This test is a regression test to make sure we don't let that happen in the > future. Thanks, > > Signed-off-by: Josef Bacik > --- > V1->V2: address the comments made by

Re: [PATCH v4 0/2] xfstest btrfs/316: test send / receive

2013-08-13 Thread Rich Johnston
On 08/13/2013 01:33 PM, Eric Sandeen wrote: On 8/13/13 12:24 PM, Jan Schmidt wrote: These two patches add the announced tests for btrfs send / receive. As requested, the fssum tool is now included. Thanks for the updates. Both: Reviewed-by: Eric Sandeen Thanks Jan, this has been committed

[PATCH v2 1/3] Btrfs: fix oops when writing dirty qgroups to disk

2013-08-13 Thread Wang Shilong
When disabling quota, we should clear out list 'dirty_qgroups',otherwise, we will get oops if enabling quota again. Fix this by abstracting similar code from del_qgroup_rb(). Signed-off-by: Wang Shilong Reviewed-by: Miao Xie Reviewed-by: Arne Jansen --- v1->v2: remove unnecessary initialization

[PATCH v2 2/3] Btrfs: move btrfs_free_qgroup_config() out of spin_lock and fix comments

2013-08-13 Thread Wang Shilong
btrfs_free_qgroup_config() is not only called by open/close_ctree(),but also btrfs_disable_quota().And for btrfs_disable_quota(),we have set 'quota_root' to be null before calling btrfs_free_qgroup_config(),so it is safe to cleanup in-memory structures without lock held. Signed-off-by: Wang Shilon

[PATCH v2 3/3] Btrfs: remove reduplicate check when disabling quota

2013-08-13 Thread Wang Shilong
We have checked 'quota_root' with qgroup_ioctl_lock held before,So here the check is reduplicate, remove it. Signed-off-by: Wang Shilong Reviewed-by: Miao Xie Reviewed-by: Arne Jansen --- v1->v2: nothing(except adding Arne's reviewed-by) --- fs/btrfs/qgroup.c | 5 - 1 file changed, 5 delet

Re: btrfs-ino-cache is running on each reboot

2013-08-13 Thread dima
On 08/14/2013 12:37 AM, Josef Bacik wrote: On Tue, Aug 13, 2013 at 10:28:59AM +0900, dima wrote: Hello all, About a week or so ago I noticed that [btrfs-ino-cache] process was appearing in the 'top' on each reboot and disk is spinning like crazy for about five minutes or so. Quite so often this

Re: [PATCH 4/6] btrfs-progs: mkfs.c overwrites fd without appropriate close

2013-08-13 Thread Anand Jain
On 08/14/2013 03:14 AM, Josef Bacik wrote: On Fri, Jul 26, 2013 at 01:35:28AM +0800, Anand Jain wrote: Signed-off-by: Anand Jain --- mkfs.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/mkfs.c b/mkfs.c index 60f906c..66f558a 100644 --- a/mkfs.c +++ b/mkfs.c @@

[PATCH 0/2] BTRFS_IOC_INO_LOOKUP ioctl fixes

2013-08-13 Thread Filipe David Borba Manana
This set of patches fixes 2 issues with the BTRFS_IOC_INO_LOOKUP ioctl: 1) missing error code return when path is too long; 2) ocassional ENOENT error even when the desired inode ref items exist. Filipe David Borba Manana (2): Btrfs: add missing error code to BTRFS_IOC_INO_LOOKUP handler Btrf

[PATCH 1/2] Btrfs: add missing error code to BTRFS_IOC_INO_LOOKUP handler

2013-08-13 Thread Filipe David Borba Manana
If the path doesn't fit in the input buffer, return ENAMETOOLONG instead of returning with a success code (0) and a partially filled and right justified buffer. Also removed useless buffer pointer check outside the while loop. Signed-off-by: Filipe David Borba Manana --- fs/btrfs/ioctl.c |6

[PATCH 2/2] Btrfs: don't miss inode ref items in BTRFS_IOC_INO_LOOKUP

2013-08-13 Thread Filipe David Borba Manana
If the inode ref key was not found and the current leaf slot was 0 (first item in the leaf) the code would always return -ENOENT. This was not correct because the desired inode ref item might be the last item in the previous leaf. Signed-off-by: Filipe David Borba Manana --- fs/btrfs/ioctl.c |

Re: [PATCH 4/6] btrfs-progs: mkfs.c overwrites fd without appropriate close

2013-08-13 Thread Anand Jain
On 08/14/2013 10:04 AM, Anand Jain wrote: On 08/14/2013 03:14 AM, Josef Bacik wrote: On Fri, Jul 26, 2013 at 01:35:28AM +0800, Anand Jain wrote: Signed-off-by: Anand Jain --- mkfs.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/mkfs.c b/mkfs.c index 60f906c.

[PATCH v3 1/8] Btrfs-progs: add missing man page information for btrfsck

2013-08-13 Thread Wang Shilong
Signed-off-by: Wang Shilong Signed-off-by: Qu Wenruo --- v2->v3: availiable parts is not true anymore,remove it. v1->v2: remove wrong copyrights. --- man/btrfsck.8.in | 35 --- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/man/btrfsck.8.in b/man/

[PATCH] btrfs-progs: Fix: mkfs.c overwrites fd without appropriate close patch

2013-08-13 Thread Anand Jain
btrfs_add_to_fsid() saves the fd in the device list. close_ctree() will retrive the device list to handle the close(). So the device fd shouldn't closed here. Signed-off-by: Anand Jain --- mkfs.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/mkfs.c b/mkfs.c index

[PATCH v3 4/8] Btrfs-progs: add man page information for btrfs-find-root

2013-08-13 Thread Wang Shilong
Signed-off-by: Wang Shilong Signed-off-by: Qu Wenruo --- v2->v3: remove 'AVAILIABLE' parts v1->v2: GPLv3->GPLv2 --- man/Makefile | 2 +- man/btrfs-find-root.8.in | 30 ++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 man/btrfs-find-

[PATCH v3 5/8] Btrfs-progs: add man page information for btrfs-convert

2013-08-13 Thread Wang Shilong
Signed-off-by: Wang Shilong Signed-off-by: Qu Wenruo --- v2->v3: remove 'AVAILIABLE' parts. v1->v2: GPLv3->GPLv2 --- man/Makefile | 3 ++- man/btrfs-convert.8.in | 33 + 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 man/btrfs-conv

[PATCH v3 7/8] Btrfs-progs: add missing man page information for btrfs-zero-log

2013-08-13 Thread Wang Shilong
Signed-off-by: Wang Shilong Signed-off-by: Qu Wenruo --- v2->v3: remove 'AVAILIABLE' parts. v1->v2: GPLv3->GPLv2 --- man/Makefile| 2 +- man/btrfs-zero-log.8.in | 23 +++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 man/btrfs-zero-log.8.in

[PATCH v3 8/8] Btrfs-progs: add missing man page for btrfs-map-logical

2013-08-13 Thread Wang Shilong
Signed-off-by: Wang Shilong Signed-off-by: Qu Wenruo --- v2->v3: remove 'AVAILIABLE' parts. v1->v2: GPLv3->GPLv2 --- man/Makefile | 2 +- man/btrfs-map-logical.8.in | 33 + 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 man/btr

[PATCH v3 6/8] Btrfs-progs: add missing man page for btrfstune

2013-08-13 Thread Wang Shilong
Signed-off-by: Wang Shilong Signed-off-by: Qu Wenruo --- v2->v3: remove 'AVAILIABLE' parts. v1->v2: GPLv3->GPLv2 --- man/Makefile | 2 +- man/btrfstune.8.in | 31 +++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 man/btrfstune.8.in diff

[PATCH v3 3/8] Btrfs-progs: add missing man page for btrfs-show-super

2013-08-13 Thread Wang Shilong
Signed-off-by: Wang Shilong Signed-off-by: Qu Wenruo --- v2->v3: remove 'AVAILIABLE' parts v1->v2: GPLv3->GPLv2 --- man/Makefile | 2 +- man/btrfs-show-super.8.in | 30 ++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 man/btrfs-sho

[PATCH v3 2/8] Btrfs-progs: add missing man information for btrfs-debug-tree

2013-08-13 Thread Wang Shilong
Signed-off-by: Wang Shilong Signed-off-by: Qu Wenruo --- v2->v3: remove 'AVAILIABLE' parts. v1->v2: GPLv3->GPLv2 --- btrfs-debug-tree.c| 2 +- man/Makefile | 3 ++- man/btrfs-debug-tree.8.in | 35 +++ 3 files changed, 38 insertions(+), 2 del