[PATCH 5/6 v2] btrfs-progs: btrfs_scan_one_dir not to skip links when /dev/mapper is provided

2013-05-29 Thread Anand Jain
we would need btrfs_scan_one_dir to san devs under /dev/mapper, but /dev/mapper has links to the actual devs and current implementation of btrfs_scan_one_dir skips links so it does not pick any links under /dev/mapper. skipping links is fine when scanning whole of /dev. But when we just want to sca

[PATCH 4/6 v2] btrfs-progs: congregate dev scan

2013-05-29 Thread Anand Jain
the dev scan to find btrfs is performed at two locations all most the same way one at filesystem show and another at device scan. They both follow the same steps. This patch does not alter anything except that it brings these two same logic into the function scan_for_btrfs so that we can play tweak

[PATCH 6/6 v2] btrfs-progs: scan /dev/mapper in filesystem show and device scan

2013-05-29 Thread Anand Jain
Currently, btrsf fi show and btrfs dev scan uses /proc/partitions (by default) (which gives priority to dm- over sd paths) and with --all-devices it will scan /dev only (when it skips links under /dev/mapper). However using /dev/mapper paths are in common practice with mount, fstab, and lvm, so it

[PATCH 3/6 v2] btrfs-progs: update device scan usage

2013-05-29 Thread Anand Jain
the btrfs device scan usage does not publish --all-devices option so add it Signed-off-by: Anand Jain --- cmds-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds-device.c b/cmds-device.c index 41e79d3..d25159b 100644 --- a/cmds-device.c +++ b/cmds-device.c @@ -178,

[PATCH 2/6 v2] btrfs-progs: label option in btrfs filesystem show is not coded

2013-05-29 Thread Anand Jain
appears to be a cut and paste error Signed-off-by: Anand Jain --- cmds-filesystem.c | 2 +- man/btrfs.8.in| 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmds-filesystem.c b/cmds-filesystem.c index f41a72a..c6a7100 100644 --- a/cmds-filesystem.c +++ b/cmds-filesy

[PATCH 1/6 v2] btrfs-progs: btrfs_scan_for_fsid doesn't need all the arguments

2013-05-29 Thread Anand Jain
btrfs_scan_for_fsid uses only one argument run_ioctl out of 3 so remove the rest two of them Signed-off-by: Anand Jain --- btrfs-find-root.c | 2 +- disk-io.c | 2 +- utils.c | 5 ++--- utils.h | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/bt

[PATCH 0/6 v2] btrfs-progs: a structure for the disks scan for btrfs

2013-05-29 Thread Anand Jain
The idea was to introduce /dev/mapper to find for btrfs disk, However I found first we need to congregate the disk scan procedure at a function so it would help to consistently tune it across the btrfs-progs. As of now both fi show and dev scan use the disks scan they do it on their own. So here

Btrfs metadata corruption; unmountable FS

2013-05-29 Thread Alex Marquez
I'm not entirely sure what went completely wrong. Three possibilities are most likely, and they're listed below. For reference, here are supplemental materials split out into their own pastebins: * btrfs-debug-tree -R log http://pastebin.com/7ePy9sin * dmesg log http://pastebin.com/s1sdJRyd (btr

[PATCH] Btrfs: simplify unlink reservations

2013-05-29 Thread Josef Bacik
Dave pointed out a problem where if you filled up a file system as much as possible you couldn't remove any files. The whole unlink reservation thing is convoluted because it tries to guess if it's going to add space to unlink something or not, and has all these odd uncommented cases where it simp

Re: [PATCH 0/3] Btrfs: qgroup rescan fixes for next rc

2013-05-29 Thread Wang Shilong
Hello Jan, Patch 1 and 2 look good to me, thanks very much! Thanks, Wang > Hi Wang, > > Please have a look at these patches, you should have been CCed but I just > realized git send-email doesn't care about Cc lines in the patch file. Sigh. > > Thanks, > -Jan > -- > To unsubscribe from this lis

Re: [PATCH 1/3] Btrfs: fix memory patcher through fs_info->qgroup_ulist

2013-05-29 Thread Wang Shilong
Hello Jan > Commit 5b7c665e introduced fs_info->qgroup_ulist, that is allocated during > btrfs_read_qgroup_config and meant to be used later by the qgroup accounting > code. However, it is always freed before btrfs_read_qgroup_config returns, > becuase the commit mentioned above adds a check for (

[PATCH] Btrfs-progs: fix free space cache checks

2013-05-29 Thread Josef Bacik
This fixes two bugs with the free space cache checker. First is we apparently always use root->sectorsize for our unit in the kernel so we have to do that in progs otherwise bitmaps turn out to not look right if we have leafsize != sectorsize. The second is a small issue if we had skinny metadata

Re: [PATCH] Btrfs: set the free space control unit properly

2013-05-29 Thread Josef Bacik
On Tue, May 28, 2013 at 09:43:07PM -0600, Miao Xie wrote: > Ontue, 28 May 2013 14:50:25 -0400, Josef Bacik wrote: > > Stefan pointed out that xfstests generic/013 was failing because the free > > space > > cache checker was complaining with leafsize of 16k. Turns out this is > > because > >

[PATCH] Btrfs-progs: Validate super block checksum

2013-05-29 Thread Filipe David Borba Manana
After finding a super block in a device also validate its checksum. This validation is done in the kernel but it was missing in btrfs-progs. The function btrfs_check_super_csum() is imported from the file fs/btrfs/disk-io.c in the kernel source tree. Signed-off-by: Filipe David Borba Manana ---

Re: nocow 'C' flag ignored after balance

2013-05-29 Thread Miao Xie
On wed, 29 May 2013 10:55:11 +0900, Liu Bo wrote: > On Tue, May 28, 2013 at 09:22:11AM -0500, Kyle Gates wrote: >>> From: Liu Bo >>> >>> Subject: [PATCH] Btrfs: fix broken nocow after a normal balance >>> >> [...] >> >> Sorry for the long wait in replying. >> This patch was unsuccessful in fixing