Re: [PATCH 12/13] btrfs-progs: obtain used_bytes in BTRFS_IOC_FS_INFO ioctl

2013-06-25 Thread Anand Jain
kindly ignore this patch, the feature now is implemented without adding any _new_ ioctl or _new_ parameters. Thanks, Anand On 06/21/2013 03:58 PM, Anand Jain wrote: btrfs-progs has to read fs info from the kernel to read the latest info instead of reading it from the disks, which generally

[PATCH 12/12 v4] btrfs-progs: introduce btrfs filesystem show --kernel

2013-06-25 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. This patch adds --kernel option to the 'filesystem show' subcli, which will read from the kernel instead

[RESEND] [PATCH] btrfs-progs: avoid memory leak in btrfs_close_devices

2013-06-25 Thread Wang Sheng-Hui
Three kind of structures need to be freed on close: * All struct btrfs_device managed by fs_devices * The name field for each struct btrfs_device * fs_devices structure itself The same ones for seed_devices. Signed-off-by: Wang Sheng-Hui shh...@gmail.com --- volumes.c | 16

Re: hang on 3.9, 3.10-rc5

2013-06-25 Thread Liu Bo
On Fri, Jun 21, 2013 at 08:42:55AM +0200, Clemens Eisserer wrote: Hi Jon, Is this what you are looking for? After this, the CPU gets stuck and I have to reboot. This issue has already been reported: https://bugzilla.kernel.org/show_bug.cgi?id=59451 Hi, Could you please try this patch?

[PATCH] Btrfs: fix crash regarding to ulist_add_merge

2013-06-25 Thread Liu Bo
Several users reported this crash of NULL pointer or general protection, the story is that we add a rbtree for speedup ulist iteration, and we use krealloc() to address ulist growth, and krealloc() use memcpy to copy old data to new memory area, so it's OK for an array as it doesn't use pointers

[PATCH btrfs-progs] kerncompat.h: remove offsetof redefinition

2013-06-25 Thread root
From: Cristian Rodríguez crrodrig...@opensuse.org Must use the version provided by the compiler in stddef.h header --- kerncompat.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kerncompat.h b/kerncompat.h index 9c116b4..6b4b4ba 100644 --- a/kerncompat.h +++

[PATCH btrfs-progs] kerncompat.h: remove offsetof redefinition

2013-06-25 Thread Cristian Rodríguez
Must use the version provided by the compiler in stddef.h header --- kerncompat.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kerncompat.h b/kerncompat.h index 9c116b4..6b4b4ba 100644 --- a/kerncompat.h +++ b/kerncompat.h @@ -26,6 +26,7 @@ #include endian.h

[PATCH] btrfs-progs: Cleanup for using BTRFS_SETGET_STACK instead of raw convert

2013-06-25 Thread Qu Wenruo
Some codes still use the cpu_to_lexx instead of the BTRFS_SETGET_STACK_FUNCS declared in ctree.h. Also added some BTRFS_SETGET_STACK_FUNCS for btrfs_header and btrfs_super. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- btrfs-convert.c| 2 +- btrfs-find-root.c | 6 +++---