Re: [PATCH] Btrfs: avoid stack bloat in btrfs_ioctl_fs_info()

2011-06-08 Thread Arne Jansen
On 08.06.2011 05:58, Li Zefan wrote: The size of struct btrfs_ioctl_fs_info_args is as big as 1KB, so don't declare the variable on stack. Signed-off-by: Li Zefan l...@cn.fujitsu.com --- fs/btrfs/ioctl.c | 23 ++- 1 files changed, 14 insertions(+), 9 deletions(-)

Re: [PATCH] Btrfs: avoid stack bloat in btrfs_ioctl_fs_info()

2011-06-08 Thread Li Zefan
-if (copy_to_user(arg, fi_args, sizeof(fi_args))) -return -EFAULT; +if (copy_to_user(arg, fi_args, sizeof(fi_args))) sizeof(*fi_args) will integrate that, thanks :) Oops, what a silly mistake! -- To unsubscribe from this list: send the line unsubscribe linux-btrfs

Re: [PATCH 1/4] Btrfs: map the node block when looking for readahead targets

2011-06-08 Thread Arne Jansen
On 11.05.2011 23:35, Josef Bacik wrote: If we have particularly full nodes, we could call btrfs_node_blockptr up to 32 times, which is 32 pairs of kmap/kunmap, which _sucks_. So go ahead and map the extent buffer while we look for readahead targets. Thanks, Signed-off-by: Josef Bacik

[PATCH v2] Btrfs: avoid stack bloat in btrfs_ioctl_fs_info()

2011-06-08 Thread Li Zefan
The size of struct btrfs_ioctl_fs_info_args is as big as 1KB, so don't declare the variable on stack. Signed-off-by: Li Zefan l...@cn.fujitsu.com --- v2: fixed to pass the right size to copy_to_user(). --- fs/btrfs/ioctl.c | 23 ++- 1 files changed, 14 insertions(+), 9

[PATCH v2] btrfs: scrub: errors in tree enumeration

2011-06-08 Thread Arne Jansen
due to the semantics of btrfs_search_slot the path can point to an invalid slot when ret 0. This condition went unnoticed, which in turn could have led to an incomplete scrubbing. Signed-off-by: Arne Jansen sensi...@gmx.net --- Change in v2: fix return value of scrub_enumerate_chunks ---

[GIT PULL] scrub fixes for -rc3

2011-06-08 Thread Arne Jansen
Hi Chris, please pull from git://git.kernel.org/pub/scm/linux/kernel/git/arne/btrfs-unstable-arne.git for-chris It contains the 2 commits Arne Jansen (1): btrfs: scrub: errors in tree enumeration Li Zefan (1): Btrfs: avoid stack bloat in btrfs_ioctl_fs_info() It also reverts

[PATCH] Btrfs: check root_key's offset instead

2011-06-08 Thread liubo
When we use reloc root to cow or copy a tree block, we do not set the block's owner, instead we set its header's flag with BTRFS_HEADER_FLAG_RELOC. So here we should check for root_key's offset. Signed-off-by: Liu Bo liubo2...@cn.fujitsu.com --- fs/btrfs/extent-tree.c |2 +- 1 files

Re: [PATCH] Btrfs: check root_key's offset instead

2011-06-08 Thread Yan, Zheng
On Wed, Jun 8, 2011 at 5:46 PM, liubo liubo2...@cn.fujitsu.com wrote: When we use reloc root to cow or copy a tree block, we do not set the block's owner, instead we set its header's flag with BTRFS_HEADER_FLAG_RELOC. So here we should check for root_key's offset. Signed-off-by: Liu Bo

Re: [GIT PULL] scrub fixes for -rc3

2011-06-08 Thread Josef Bacik
On 06/08/2011 04:58 AM, Arne Jansen wrote: Hi Chris, please pull from git://git.kernel.org/pub/scm/linux/kernel/git/arne/btrfs-unstable-arne.git for-chris It contains the 2 commits Arne Jansen (1): btrfs: scrub: errors in tree enumeration Li Zefan (1): Btrfs: avoid

Re: [PATCH v2] btrfs: scrub: errors in tree enumeration

2011-06-08 Thread Josef Bacik
On 06/08/2011 04:38 AM, Arne Jansen wrote: due to the semantics of btrfs_search_slot the path can point to an invalid slot when ret 0. This condition went unnoticed, which in turn could have led to an incomplete scrubbing. Signed-off-by: Arne Jansen sensi...@gmx.net --- Change in v2:

Re: [PATCH v2] Btrfs: avoid stack bloat in btrfs_ioctl_fs_info()

2011-06-08 Thread Josef Bacik
On 06/08/2011 04:27 AM, Li Zefan wrote: The size of struct btrfs_ioctl_fs_info_args is as big as 1KB, so don't declare the variable on stack. Signed-off-by: Li Zefan l...@cn.fujitsu.com --- Reviewed-by: Josef Bacik jo...@redhat.com Thanks, Josef -- To unsubscribe from this list: send

Re: [PATCH 1/4] Btrfs: map the node block when looking for readahead targets

2011-06-08 Thread Josef Bacik
On 06/08/2011 04:21 AM, Arne Jansen wrote: On 11.05.2011 23:35, Josef Bacik wrote: If we have particularly full nodes, we could call btrfs_node_blockptr up to 32 times, which is 32 pairs of kmap/kunmap, which _sucks_. So go ahead and map the extent buffer while we look for readahead

Re: [PATCH] Btrfs: use join_transaction in btrfs_evict_inode()

2011-06-08 Thread Josef Bacik
On 06/07/2011 11:56 PM, Li Zefan wrote: The WARN_ON() in start_transaction() was triggered while balancing. The cause is btrfs_relocate_chunk() started a transaction and then called iput() on the inode that stores free space cache, and iput() called btrfs_start_transaction() again.

Re: [PATCH 1/4] Btrfs: map the node block when looking for readahead targets

2011-06-08 Thread Arne Jansen
On 08.06.2011 15:51, Josef Bacik wrote: On 06/08/2011 04:21 AM, Arne Jansen wrote: On 11.05.2011 23:35, Josef Bacik wrote: If we have particularly full nodes, we could call btrfs_node_blockptr up to 32 times, which is 32 pairs of kmap/kunmap, which _sucks_. So go ahead and map the extent

Re: [GIT PULL] scrub fixes for -rc3

2011-06-08 Thread Chris Mason
Excerpts from Josef Bacik's message of 2011-06-08 09:25:57 -0400: On 06/08/2011 04:58 AM, Arne Jansen wrote: Hi Chris, please pull from git://git.kernel.org/pub/scm/linux/kernel/git/arne/btrfs-unstable-arne.git for-chris It contains the 2 commits Arne Jansen (1):

Re: kernel BUG at fs/btrfs/inode.c:4676!

2011-06-08 Thread Marek Otahal
Hi, sorry for repost, i'm not sure if my first mail was delivered. On Monday 06 of June 2011 12:19:56 Marek Otahal wrote: Hello, the issue happens every time when i have to hard power-off my notebook (suspend problems). With kernel 2.6.39 the partition is unmountable, solution is to boot

[PATCH] Btrfs: don't map extent buffer if path-skip_locking is set

2011-06-08 Thread Josef Bacik
Arne's scrub stuff exposed a problem with mapping the extent buffer in reada_for_search. He searches the commit root with multiple threads and with skip_locking set, so we can race and overwrite node-map_token since node isn't locked. So fix this so that we only map the extent buffer if we don't