[PATCH] btrfs: return inode to fs when btrfs_new_inode fails

2009-02-24 Thread Shen Feng
btrfs_new_inode doesn't call iput to return inode to fs when it fails. Signed-off-by: Shen Feng s...@cn.fujitsu.com --- fs/btrfs/inode.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 3cee77a..2cae014 100644 --- a/fs/btrfs

[PATCH] Btrfs-progs: update btrfs-debug-tree

2009-02-18 Thread Shen Feng
output objectid in btrfs_disk_key with human readable strings. Other updates are included for more readable output. Signed-off-by: Shen Feng s...@cn.fujitsu.com --- debug-tree.c | 11 +++--- print-tree.c | 114 +- print-tree.h |1

Re: What's wrong with snapshot?

2009-01-08 Thread Shen Feng
thanks. I got it. Shen on 01/08/2009 07:49 PM, Yan Zheng wrote: 2009/1/8 Shen Feng s...@cn.fujitsu.com: Hello, I tried to ceate a snapshot of a subvol. But it seems now work. Please see the test below. I think the file created by dd should also in the snap directory

[PATCH] Btrfs-progs: add error processing for btrfs_register_one_device

2009-01-06 Thread Shen Feng
Now btrfsctl -a will do nothing and no error is output if btrfs.ko is not inserted. Since no caller do error processing for btrfs_register_one_device, make its return void and do error processing inside. Signed-off-by: Shen Feng s...@cn.fujitsu.com --- utils.c | 15 +++ utils.h

[PATCH] Btrfs-progs: debug-tree output tree/key type instead of id

2009-01-06 Thread Shen Feng
Hi, I'm not sure if this patch is useful. I developed it only for my personal using. Make the tree name and key type output more readable. Signed-off-by: Shen Feng s...@cn.fujitsu.com --- debug-tree.c | 72 +++- print-tree.c | 79

[PATCH] Btrfs: check inode allocaton earlier in btrfs_fill_super

2009-01-06 Thread Shen Feng
Just after it's allocation. Signed-off-by: Shen Feng s...@cn.fujitsu.com --- fs/btrfs/super.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index b4c101d..4c31c4f 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c

Re: [PATCH] Btrfs-progs: btrfs file system size should be bigger then 256m

2009-01-04 Thread Shen Feng
could, include both the size that is too small and the size that is required in the message. Thanks. I updated the patch. Signed-off-by: Shen Feng s...@cn.fujitsu.com --- mkfs.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/mkfs.c b/mkfs.c index be93aaa

A bug with multiple devices?

2008-12-29 Thread Shen Feng
Hi, I create a raid-1 btrfs with the following command. [r...@localhost ~]# fdisk -l /dev/sdb Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xb44829ea Device Boot Start

[PATCH] Btrfs: check return of kmalloc in btrfs_control_ioctl

2008-12-28 Thread Shen Feng
The memory allocated by kmalloc should be checked before using it. Signed-off-by: Shen Feng s...@cn.fujitsu.com --- fs/btrfs/super.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 84c3b66..d0e8dce 100644 --- a/fs/btrfs/super.c

[PATCH] Btrfs: do not call kfree if kmalloc failed in btrfs_sysfs_add_super

2008-12-28 Thread Shen Feng
kfree should not be called if kmalloc is not success. Signed-off-by: Shen Feng s...@cn.fujitsu.com --- fs/btrfs/sysfs.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 300076e..04087c0 100644 --- a/fs/btrfs/sysfs.c +++ b/fs

[PATCH] Btrfs: fix a memory leak in btrfs_get_sb

2008-12-28 Thread Shen Feng
subvol_name should be freed if error occurs. Signed-off-by: Shen Feng s...@cn.fujitsu.com --- fs/btrfs/super.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index d0e8dce..a53f690 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs