How btrfs resize should work ?

2013-08-16 Thread Lukáš Czerner
Hi, I am working on system storage manager (ssm) trying to implement btrfs resize correctly, however I have some troubles with it. # mkfs.btrfs /dev/sda /dev/sdb # mount /dev/sda /mnt/test # btrfs filesystem show failed to open /dev/sr0: No medium found Label: none uuid:

[RFC PATCH] Btrfs: export btrfs space shared info to userspace

2013-08-16 Thread Liu Bo
Similar to ocfs2, btrfs also supports that extents can be shared by different inodes, and there are some userspace tools requesting for this kind of 'space shared infomation'.[1] ocfs2 uses flag FIEMAP_EXTENT_SHARED, so does btrfs. [1]:

Re: [PATCH] Btrfs: stop using GFP_ATOMIC when allocating rewind ebs

2013-08-16 Thread Stefan Behrens
On Wed, 7 Aug 2013 17:11:49 -0400, Josef Bacik wrote: There is no reason we can't just set the path to blocking and then do normal GFP_NOFS allocations for these extent buffers. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com You've forgotten at least one place. static inline struct

[PATCH 1/3] btrfs-progs: move out print in cmd_df to another function

2013-08-16 Thread Anand Jain
This is a prepatory work for the following btrfs fi show command fixes. So that we have a function get_df to get the fs sizes v2: combined the other patches as below and rebase btrfs-progs: get string for the group profile and type Signed-off-by: Anand Jain anand.j...@oracle.com ---

[PATCH 2/3] btrfs-progs: read from the kernel when disk is mounted

2013-08-16 Thread Anand Jain
As of now btrfs filesystem show reads directly from disks. So sometimes output can be stale, mainly when user want to verify their last operation like, labeling or device delete or add... etc. Signed-off-by: Anand Jain anand.j...@oracle.com --- cmds-filesystem.c | 166

[PATCH 3/3] btrfs-progs: use lblkid to scan and filesystem show improvements

2013-08-16 Thread Anand Jain
create helper functions to use lblkid to scan for the btrfs disks When we are using the lblkid for scanning for btrfs disks, we don't have to worry about the manually scanning the /dev or /dev/mapper which means we don't need the --all-devices (and proposed --mapper) options. Signed-off-by:

[PATCH 0/3] fi show, dev scan and lblkid

2013-08-16 Thread Anand Jain
This patch set is about use of lblkid for the btrfs disk scan and using this lblkid scan for the fi show and dev scan cli This includes the comments from David (to use lblkid) and Zach to show (btrfs fi show) info from kernel when disk is mounted and from the disks directly when disk

[PATCH] btrfs-progs: mkfs should check for small vol well before

2013-08-16 Thread Anand Jain
This fix the regression introduced by 830427d that it no more creates the FS if disk is small and if no mixed option is provided. This patch will bring it to the original design which will force mixed profile when disk is small and go ahead to create the FS. Which also means that before we open

Re: [PATCH] Btrfs: stop using GFP_ATOMIC when allocating rewind ebs

2013-08-16 Thread Josef Bacik
On Fri, Aug 16, 2013 at 01:37:45PM +0200, Stefan Behrens wrote: On Wed, 7 Aug 2013 17:11:49 -0400, Josef Bacik wrote: There is no reason we can't just set the path to blocking and then do normal GFP_NOFS allocations for these extent buffers. Thanks, Signed-off-by: Josef Bacik

Re: xfstests: make the scratch device for generic/256 slightly larger

2013-08-16 Thread Rich Johnston
Hey Josef, Sorry this took so long to commit, I did not see it had been reviewed. Thanks again for the patch --Rich commit 617491caf44d5e93006d774da95f532e9d7de4c4 Author: Josef Bacik jba...@fusionio.com Date: Tue Jul 2 19:17:18 2013 + -- To unsubscribe from this list: send the line

[PATCH] Btrfs: reset force_compress on btrfs_file_defrag failure

2013-08-16 Thread Filipe David Borba Manana
After we set force_compress with a new value (which was not being done while holding the inode mutex), if an error happens and we jump to the label out_ra, the force_compress property of the inode is not set to BTRFS_COMPRESS_NONE (unlike in the case where no errors happen). Signed-off-by: Filipe

[PATCH] xfstests: silence btrfs balance in btrfs/003

2013-08-16 Thread Stefan Behrens
This test failed for me with output from 'btrfs balance': QA output created by 003 +Done, had to relocate 4 out of 4 chunks +Done, had to relocate 5 out of 5 chunks Silence is golden Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- tests/btrfs/003 | 4 ++-- 1 file

Re: [PATCH] xfstests: silence btrfs balance in btrfs/003

2013-08-16 Thread Eric Sandeen
On 8/16/13 9:51 AM, Stefan Behrens wrote: This test failed for me with output from 'btrfs balance': QA output created by 003 +Done, had to relocate 4 out of 4 chunks +Done, had to relocate 5 out of 5 chunks Silence is golden Signed-off-by: Stefan Behrens

[PATCH V2] xfstests: redirect output in btrfs/003

2013-08-16 Thread Stefan Behrens
This test failed for me with output from 'btrfs balance': QA output created by 003 +Done, had to relocate 4 out of 4 chunks +Done, had to relocate 5 out of 5 chunks Silence is golden Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- V1 - V2: Redirect errors to

Re: [PATCH V2] xfstests: redirect output in btrfs/003

2013-08-16 Thread Eric Sandeen
On 8/16/13 10:18 AM, Stefan Behrens wrote: This test failed for me with output from 'btrfs balance': QA output created by 003 +Done, had to relocate 4 out of 4 chunks +Done, had to relocate 5 out of 5 chunks Silence is golden Signed-off-by: Stefan Behrens

Re: [PATCH V2] xfstests: redirect output in btrfs/003

2013-08-16 Thread Rich Johnston
Thanks Stefan for the patch, it has been committed without the special header. ;) --Rich commit 0150222d1ceed701a637e0d271ddd36e4f489f7a Author: Stefan Behrens sbehr...@giantdisaster.de Date: Fri Aug 16 15:18:43 2013 + xfstests: redirect output in btrfs/003 -- To unsubscribe from

Re: How btrfs resize should work ?

2013-08-16 Thread Zach Brown
So it appears that it only resized part of the file system which lies on /dev/sda to 3G. This behavior is confusing as hell, is this really desirable behaviour ? Yeah, 'btrfs filesystem resize' is misnamed. It only resizes a specified device which defaults to devid 1 if you don't specify one.

4 vol raid5 segfault on device delete

2013-08-16 Thread Craig Johnson
I have a 4 device volume with raid5 - trying to remove one of the devices (plenty of free space) and I get an almost immediate segfault. Scrub shows no errors, repair show space cache invalid but nothing else (I remounted with clear cache to be safe). Lots of corrupt on bdev (for 3 out of 4

[PATCH] xfstests: update filters and output of btrfs/006

2013-08-16 Thread Stefan Behrens
The btrfs-progs tools changed the output: - 100GiB instead of 100GB - The number of spaces was changed Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- common/filter | 2 +- common/filter.btrfs | 3 ++- tests/btrfs/006 | 6 +++--- tests/btrfs/006.out | 36

Re: [PATCH] xfstests: update filters and output of btrfs/006

2013-08-16 Thread Eric Sandeen
On 8/16/13 12:02 PM, Stefan Behrens wrote: The btrfs-progs tools changed the output: - 100GiB instead of 100GB - The number of spaces was changed ugh. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- common/filter | 2 +- common/filter.btrfs | 3 ++- tests/btrfs/006

[PATCH] xfstests: btrfs/009 never shrinked or removed $seqres.full

2013-08-16 Thread Stefan Behrens
Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- tests/btrfs/009 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/btrfs/009 b/tests/btrfs/009 index d46744c..08aa508 100755 --- a/tests/btrfs/009 +++ b/tests/btrfs/009 @@ -47,6 +47,8 @@ _supported_fs btrfs _supported_os Linux

Re: [PATCH] xfstests: btrfs/009 never shrinked or removed $seqres.full

2013-08-16 Thread Eric Sandeen
On 8/16/13 12:44 PM, Stefan Behrens wrote: Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de Reviewed-by: Eric Sandeen sand...@redhat.com --- tests/btrfs/009 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/btrfs/009 b/tests/btrfs/009 index d46744c..08aa508 100755 ---

[PATCH] Btrfs: use __u64 in exported user headers

2013-08-16 Thread Mike Frysinger
Signed-off-by: Mike Frysinger vap...@gentoo.org --- include/uapi/linux/btrfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h index 5ef0df5..7150b26 100644 --- a/include/uapi/linux/btrfs.h +++

Re: How btrfs resize should work ?

2013-08-16 Thread Chris Murphy
On Aug 16, 2013, at 10:30 AM, Zach Brown z...@redhat.com wrote: So it appears that it only resized part of the file system which lies on /dev/sda to 3G. This behavior is confusing as hell, is this really desirable behaviour ? Yeah, 'btrfs filesystem resize' is misnamed. It only resizes a

Re: How btrfs resize should work ?

2013-08-16 Thread Chris Murphy
On Aug 16, 2013, at 12:02 PM, Chris Murphy li...@colorremedies.com wrote: When a Btrfs multiple device volume is shrunk resized, it directly affects the partition size… Oops, this obviously happens with single or multiple device. I also think the command needs to return some information

[PATCH] Btrfs: fix send issues related to inode number reuse

2013-08-16 Thread Josef Bacik
If you are sending a snapshot and specifying a parent snapshot we will walk the trees and figure out where they differ and send the differences only. The way we check for differences are if the leaves aren't the same and if the keys are not the same within the leaves. So if neither leaf is the

[PATCH] Btrfs: fix send issues related to inode number reuse

2013-08-16 Thread Josef Bacik
If you are sending a snapshot and specifying a parent snapshot we will walk the trees and figure out where they differ and send the differences only. The way we check for differences are if the leaves aren't the same and if the keys are not the same within the leaves. So if neither leaf is the

Question: btrfs-progs releases?

2013-08-16 Thread Tom Gundersen
Hi guys, I package btrfs-progs for Arch Linux, and I'm wondering about its current status. I have seen repeated talk of making regular releases, but so far we haven't had a proper release since v19 four years ago. Are we to take from this that btrfs-progs is not suitable for distribution yet,

Re: 4 vol raid5 segfault on device delete

2013-08-16 Thread Duncan
Craig Johnson posted on Fri, 16 Aug 2013 11:50:59 -0500 as excerpted: I have a 4 device volume with raid5 - trying to remove one of the devices (plenty of free space) and I get an almost immediate segfault. Scrub shows no errors, repair show space cache invalid but nothing else (I remounted

Re: Question: btrfs-progs releases?

2013-08-16 Thread Duncan
Tom Gundersen posted on Sat, 17 Aug 2013 11:19:19 +0800 as excerpted: I package btrfs-progs for Arch Linux, and I'm wondering about its current status. I have seen repeated talk of making regular releases, but so far we haven't had a proper release since v19 four years ago. Are we to