[PATCH 04/10] btrfs: Add error check for add_to_page_cache_lru

2010-05-20 Thread Miao Xie
From: Liu Bo liubo2...@cn.fujitsu.com If add_to_page_cache_lru() returns -EEXIST, it indicates the page that belongs to this page_index has been added and this readahead action can go on to next page. If add_to_page_cache_lru() returns -ENOMEM, it should break for no memory left. Signed-off-by:

[PATCH 03/10] btrfs: Remove variable wake for cleanup

2010-05-20 Thread Miao Xie
From: Liu Bo liubo2...@cn.fujitsu.com - Put worker-working inside if to make code clearly. - If wake is 1, wake_up_process will be called, meanwhile, wake is set to 1 if !worker-working, so remove wake and directly call wake_up_process if !worker-working. Signed-off-by: Liu Bo

[PATCH 05/10] btrfs: fix oops when adding a device

2010-05-20 Thread Miao Xie
After we remove a device from a raid0 filesystem with two devices, if we add a device into this filesystem, oops occurs. Steps to reproduce: # mkfs.btrfs -m raid0 /dev/sda1 /dev/sda2 # mount /dev/sda1 /mnt # btrfs-vol -r /dev/sda2 /mnt # btrfs-vol -a /dev/sda2 /mnt (oops happens.) The

[PATCH 10/10] btrfs: fix the wrong handle of btrfs_set_acl()

2010-05-20 Thread Miao Xie
If the acl can be exactly represented in the traditional file mode permission bits, we needn't insert any xattr item into fs/file root. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/acl.c | 56 - fs/btrfs/xattr.c | 22

[PATCH 07/10] btrfs: fix wrong ctime when adding link

2010-05-20 Thread Miao Xie
the ctime of file has not been updated when I create a link for it. Steps to reproduce: # touch file1 # stat -c %Z file1 1273592239 # link flink1 file1 # stat -c %Z file1 1273592239 -- have not been updated This patch fix this problem. Signed-off-by: Miao Xie

[PATCH 08/10] btrfs: fix memory leak of btrfs_new_inode()

2010-05-20 Thread Miao Xie
btrfs_new_inode() forgets to free path when it enters the error path. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/inode.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 5271887..1cef510 100644 ---

Re: [PATCH 06/10] btrfs: fix remap_file_pages error

2010-05-20 Thread Christoph Hellwig
On Thu, May 20, 2010 at 03:21:50PM +0800, Miao Xie wrote: + if (!mapping-a_ops-readpage) + return -ENOEXEC; I don't think there's any instance of address_space operations without a readpage method in btrfs. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs

Re: [PATCH 07/10] btrfs: fix wrong ctime when adding link

2010-05-20 Thread Christoph Hellwig
On Thu, May 20, 2010 at 03:22:30PM +0800, Miao Xie wrote: the ctime of file has not been updated when I create a link for it. Steps to reproduce: # touch file1 # stat -c %Z file1 1273592239 # link flink1 file1 # stat -c %Z file1 1273592239 -- have not been updated

Re: [PATCH 04/10] btrfs: Add error check for add_to_page_cache_lru

2010-05-20 Thread Mike Fedyk
On Thu, May 20, 2010 at 12:18 AM, Miao Xie mi...@cn.fujitsu.com wrote: From: Liu Bo liubo2...@cn.fujitsu.com If add_to_page_cache_lru() returns -EEXIST, it indicates the page that belongs to this page_index has been added and this readahead action can go on to next page. If

Re: [PATCH 07/10] btrfs: fix wrong ctime when adding link

2010-05-20 Thread Mike Fedyk
On Thu, May 20, 2010 at 12:22 AM, Miao Xie mi...@cn.fujitsu.com wrote: the ctime of file has not been updated when I create a link for it. Steps to reproduce:  # touch file1  # stat -c %Z file1  1273592239  # link flink1 file1  # stat -c %Z file1  1273592239             -- have not been

[PATCH] btrfs-progs: Fix implicit strndup() and other warnings on RHEL 5

2010-05-20 Thread Michael Tharp
Signed-off-by: Michael Tharp g...@partiallystapled.com --- btrfs-list.c |7 --- btrfs.c |1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/btrfs-list.c b/btrfs-list.c index 7741705..112bed2 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -16,6 +16,7 @@ *