Re: [3.16-rc1] BUG: soft lockup - CPU#0 stuck for 23s! [kworker/u25:4:5189]

2014-06-16 Thread Tsutomu Itoh
On 2014/06/17 8:52, Chris Mason wrote: > On 06/16/2014 07:28 PM, Tsutomu Itoh wrote: >> Hi Chris, >> >> On 2014/06/17 2:56, Chris Mason wrote: >>> On 06/16/2014 02:35 AM, Tsutomu Itoh wrote: >>>> I encountered soft lockup when executing 'xfstests btrf

Re: [3.16-rc1] BUG: soft lockup - CPU#0 stuck for 23s! [kworker/u25:4:5189]

2014-06-16 Thread Tsutomu Itoh
Hi Chris, On 2014/06/17 2:56, Chris Mason wrote: > On 06/16/2014 02:35 AM, Tsutomu Itoh wrote: >> I encountered soft lockup when executing 'xfstests btrfs/042' on 3.16-rc1. >> > > Did we recover, or was it stuck forever? The following messages are repea

[3.16-rc1] BUG: soft lockup - CPU#0 stuck for 23s! [kworker/u25:4:5189]

2014-06-15 Thread Tsutomu Itoh
I encountered soft lockup when executing 'xfstests btrfs/042' on 3.16-rc1. [ 1121.983975] BTRFS: device fsid 8cc641f9-563a-4d62-9157-9503156ce62c devid 1 transid 4 /dev/sdc5 [ 1121.987994] BTRFS info (device sdc5): disk space caching is enabled [ 1121.987999] BTRFS: flagging fs

[PATCH] Btrfs: fix possible memory leak in btrfs_create_tree()

2014-04-08 Thread Tsutomu Itoh
In btrfs_create_tree(), if btrfs_insert_root() fails, we should free root->commit_root. Reported-by: Alex Lyakas Signed-off-by: Tsutomu Itoh --- fs/btrfs/disk-io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 6d1ac7d..a35d7fb 100644 --- a

Re: [PATCH] Btrfs: fix memory leak in btrfs_create_tree()

2014-03-31 Thread Tsutomu Itoh
Hi Alex, On 2014/03/28 0:50, Alex Lyakas wrote: Hi Tsutomu Itoh, On Thu, Mar 21, 2013 at 6:32 AM, Tsutomu Itoh wrote: We should free leaf and root before returning from the error handling code. Signed-off-by: Tsutomu Itoh --- fs/btrfs/disk-io.c | 12 +--- 1 file changed, 9

Re: [PATCH] xfstests: fix wrong return check for case 022

2014-01-06 Thread Tsutomu Itoh
On 2014/01/07 11:19, Wang Shilong wrote: > On 01/07/2014 09:11 AM, Tsutomu Itoh wrote: >> On 2014/01/06 17:48, Wang Shilong wrote: >>> Itoh San, >>> >>> On 01/06/2014 04:23 PM, Tsutomu Itoh wrote: >>>> On 2014/01/06 17:08, Wang Shilong wrote

Re: [PATCH] xfstests: fix wrong return check for case 022

2014-01-06 Thread Tsutomu Itoh
On 2014/01/06 17:48, Wang Shilong wrote: > Itoh San, > > On 01/06/2014 04:23 PM, Tsutomu Itoh wrote: >> On 2014/01/06 17:08, Wang Shilong wrote: >>> Here we expect 0 as return value, fix it. >>> >>> Signed-off-by: Wang Shilong >>> Cc: Josef Ba

Re: [PATCH] xfstests: fix wrong return check for case 022

2014-01-06 Thread Tsutomu Itoh
On 2014/01/06 17:08, Wang Shilong wrote: > Here we expect 0 as return value, fix it. > > Signed-off-by: Wang Shilong > Cc: Josef Bacik > --- > tests/btrfs/022 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > mode change 100644 => 100755 tests/btrfs/022 > > diff --git a/tests/btrfs

Re: [PATCH] Btrfs: fix error check of btrfs_lookup_dentry()

2013-12-16 Thread Tsutomu Itoh
Hi, David, On 2013/12/17 0:27, David Sterba wrote: On Fri, Dec 13, 2013 at 09:51:42AM +0900, Tsutomu Itoh wrote: --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4974,10 +4974,17 @@ static void btrfs_dentry_release(struct dentry *dentry) static struct dentry *btrfs_lookup(struct inode *dir

[PATCH] Btrfs: fix error check of btrfs_lookup_dentry()

2013-12-12 Thread Tsutomu Itoh
needed - there seems less harm in returning ENOENT to userspace at that point in the stack than there is to crash the machine. Signed-off-by: Tsutomu Itoh --- fs/btrfs/inode.c | 15 +++ fs/btrfs/ioctl.c | 13 ++--- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a

kernel BUG at fs/btrfs/inode.c:3004!

2013-07-04 Thread Tsutomu Itoh
Hi, I encountered following BUG_ON. (I think that -28(ENOSPC) returned from btrfs_orphan_reserve_metadata maybe.) When this happened, I was running my stress test. But, I cannot reproduce this problem yet though the test was executed again several times. - Tsutomu [ 4823.473913] btrfs: found 4

Re: [PATCH 1/5] Btrfs: don't abort the current transaction if there is no enough space for inode cache

2013-05-13 Thread Tsutomu Itoh
problem has not occurred in my testset after applying your patchset. Your patchset looks good to me. Thanks. Tested-by: Tsutomu Itoh > > But no space error is not a serious problem when we write out the inode cache, > and it is safe that we just skip this step if we meet this p

[PATCH] Btrfs: cleanup unused arguments in send.c

2013-05-08 Thread Tsutomu Itoh
sctx is removed from the argument of the function that doesn't use sctx. Signed-off-by: Tsutomu Itoh --- fs/btrfs/send.c | 189 +++- 1 file changed, 90 insertions(+), 99 deletions(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c

[PATCH] Btrfs: fix error handling in btrfs_ioctl_send()

2013-04-18 Thread Tsutomu Itoh
fget() returns NULL if error. So, we should check NULL or not. Signed-off-by: Tsutomu Itoh --- fs/btrfs/send.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 96a826a..f892e0e 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c

[PATCH] Btrfs: remove unused variable in __process_changed_new_xattr()

2013-04-18 Thread Tsutomu Itoh
Variable 'p' is not used any more. So, remove it. Signed-off-by: Tsutomu Itoh --- fs/btrfs/send.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index ed897dc..96a826a 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -3479,7 +3479,6 @@

[PATCH 4/4] Btrfs: cleanup of function where btrfs_extend_item() is called

2013-04-15 Thread Tsutomu Itoh
Argument 'trans' became unnecessary from setup_inline_extent_backref() that called btrfs_extend_item(). Signed-off-by: Tsutomu Itoh --- fs/btrfs/extent-tree.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c ind

[PATCH 3/4] Btrfs: remove unused argument of btrfs_extend_item()

2013-04-15 Thread Tsutomu Itoh
Argument 'trans' is not used in btrfs_extend_item(). Signed-off-by: Tsutomu Itoh --- fs/btrfs/ctree.c | 3 +-- fs/btrfs/ctree.h | 3 +-- fs/btrfs/dir-item.c| 2 +- fs/btrfs/extent-tree.c | 4 ++-- fs/btrfs/file-item.c | 2 +- fs/btrfs/inode-item.c | 4 ++-- fs/

[PATCH 2/4] Btrfs: cleanup of function where fixup_low_keys() is called

2013-04-15 Thread Tsutomu Itoh
If argument 'trans' is unnecessary in the function where fixup_low_keys() is called, 'trans' is deleted. Signed-off-by: Tsutomu Itoh --- fs/btrfs/ctree.c | 28 fs/btrfs/ctree.h | 10 +++--- fs/btrfs/delayed-inode.c | 11 +

[PATCH 1/4] Btrfs: remove unused argument of fixup_low_keys()

2013-04-15 Thread Tsutomu Itoh
Argument 'trans' is not used in fixup_low_keys(). So, remove it. Signed-off-by: Tsutomu Itoh --- fs/btrfs/ctree.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index ca9d8f1..b5eec7c 100644 --- a/fs/btr

Re: (3.9-rc5) WARNING: at fs/btrfs/super.c:255 __btrfs_abort_transaction

2013-04-03 Thread Tsutomu Itoh
On 2013/04/03 22:05, Chris Mason wrote: Quoting Tsutomu Itoh (2013-04-02 21:19:06) Hi, When inode_cache was specified for the mount option, I encountered the following messages at umount. Step to reproduce: mkfs.btrfs -f /dev/sdc4 mount -o compress=lzo,autodefrag,inode_cache /dev/sdc4

Re: (3.9-rc5) WARNING: at fs/btrfs/super.c:255 __btrfs_abort_transaction

2013-04-03 Thread Tsutomu Itoh
On 2013/04/03 10:19, Tsutomu Itoh wrote: > Hi, > > When inode_cache was specified for the mount option, I encountered the > following messages at umount. > > Step to reproduce: > > mkfs.btrfs -f /dev/sdc4 > mount -o compress=lzo,autodefrag,inode_cache /dev/sdc4 /t

(3.9-rc5) WARNING: at fs/btrfs/super.c:255 __btrfs_abort_transaction

2013-04-02 Thread Tsutomu Itoh
Hi, When inode_cache was specified for the mount option, I encountered the following messages at umount. Step to reproduce: mkfs.btrfs -f /dev/sdc4 mount -o compress=lzo,autodefrag,inode_cache /dev/sdc4 /test1 dd if=/dev/zero of=/test1/file1 bs=1M count=8192 dd if=/test1/file1 of=/dev/null b

[PATCH] Btrfs: fix memory leak in btrfs_create_tree()

2013-03-20 Thread Tsutomu Itoh
We should free leaf and root before returning from the error handling code. Signed-off-by: Tsutomu Itoh --- fs/btrfs/disk-io.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 7d84651..b1b5baa 100644 --- a/fs/btrfs

Re: [PATCH v3] Btrfs-progs: check out if the swap device

2013-03-04 Thread Tsutomu Itoh
On 2013/03/04 1:47, Brendan Hide wrote: On 2013/02/14 09:53 AM, Tsutomu Itoh wrote: +if (ret < 0) { +fprintf(stderr, "error checking %s status: %s\n", file, +strerror(-ret)); +exit(1); +} ... +/* check if the d

[PATCH] Btrfs-progs: fix segmentation fault of "btrfs check"

2013-02-26 Thread Tsutomu Itoh
Segmentation fault occurred in the following command. # btrfs check /dev/sdc7 No valid Btrfs found on /dev/sdc7 Segmentation fault (core dumped) Fix it. Signed-off-by: Tsutomu Itoh --- cmds-check.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmds-check.c b

Re: [PATCH, RFC] btrfs-progs: require mkfs -f force option to overwrite filesystem or partition table

2013-02-26 Thread Tsutomu Itoh
On 2013/02/26 16:05, Dave Chinner wrote: On Tue, Feb 26, 2013 at 01:25:11PM +0900, Tsutomu Itoh wrote: On 2013/02/26 13:06, Eric Sandeen wrote: On 2/25/13 9:55 PM, Tsutomu Itoh wrote: EXPERIMENTAL... It's certainly so. However, I think that we should not add the option that it troubles

Re: [PATCH, RFC] btrfs-progs: require mkfs -f force option to overwrite filesystem or partition table

2013-02-25 Thread Tsutomu Itoh
On 2013/02/26 13:06, Eric Sandeen wrote: On 2/25/13 9:55 PM, Tsutomu Itoh wrote: On 2013/02/26 9:07, Eric Sandeen wrote: On 2/25/13 5:39 PM, Tsutomu Itoh wrote: On 2013/02/21 0:37, Stefan Behrens wrote: On Thu, 14 Feb 2013 12:30:03 -0600, Eric Sandeen wrote: The core of this is shamelessly

Re: [PATCH, RFC] btrfs-progs: require mkfs -f force option to overwrite filesystem or partition table

2013-02-25 Thread Tsutomu Itoh
On 2013/02/26 9:07, Eric Sandeen wrote: On 2/25/13 5:39 PM, Tsutomu Itoh wrote: On 2013/02/21 0:37, Stefan Behrens wrote: On Thu, 14 Feb 2013 12:30:03 -0600, Eric Sandeen wrote: The core of this is shamelessly stolen from xfsprogs. Use blkid to detect an existing filesystem or partition

Re: [PATCH, RFC] btrfs-progs: require mkfs -f force option to overwrite filesystem or partition table

2013-02-25 Thread Tsutomu Itoh
On 2013/02/21 0:37, Stefan Behrens wrote: On Thu, 14 Feb 2013 12:30:03 -0600, Eric Sandeen wrote: The core of this is shamelessly stolen from xfsprogs. Use blkid to detect an existing filesystem or partition table on any of the target devices. If something is found, require the '-f' option to

[PATCH v3] Btrfs-progs: check out if the swap device

2013-02-13 Thread Tsutomu Itoh
Label: none uuid: fc0bdbd0-7eed-460f-b4e9-131273b66df2 Total devices 1 FS bytes used 28.00KB devid1 size 9.31GB used 989.62MB path /dev/sdc8 Btrfs v0.20-rc1-165-g82ac345 # But we should check out the swap device. Fixed it. Signed-off-by: Tsutomu Itoh --- (this patch

Re: [PATCH v2] Btrfs-progs: check out if the swap device

2013-02-13 Thread Tsutomu Itoh
Sorry, please ignore this. I will send again later. -Tsutomu On 2013/02/14 11:53, Tsutomu Itoh wrote: Currently, the following commands succeed. # cat /proc/swaps FilenameTypeSizeUsed Priority /dev/sda3

[PATCH v2] Btrfs-progs: check out if the swap device

2013-02-13 Thread Tsutomu Itoh
Label: none uuid: fc0bdbd0-7eed-460f-b4e9-131273b66df2 Total devices 1 FS bytes used 28.00KB devid1 size 9.31GB used 989.62MB path /dev/sdc8 Btrfs v0.20-rc1-165-g82ac345 # But we should check out the swap device. Fixed it. Signed-off-by: Tsutomu Itoh --- (this patch

Re: [PATCH] Btrfs-progs: check out if the swap device

2013-02-13 Thread Tsutomu Itoh
On 2013/02/14 6:58, Zach Brown wrote: why it failed. But it might not be able to because /proc/swaps is fundamentally unreliable. Then, how should we do?I have no idea... Hmm. I think I'd do something like: - First always open with O_EXCL. If it succeeds then there's no reason to c

Re: [PATCH] Btrfs-progs: check out if the swap device

2013-02-12 Thread Tsutomu Itoh
Hi, All, Thanks for advice. On 2013/02/13 5:57, Zach Brown wrote: So, I chose this one. (read /proc/swaps) Sure, I think your change is good. I just think perhaps mkfs should also try to open O_EXCL after all those other tests, as a last safety check. I think mkfs should first try an O_EX

Re: [PATCH] Btrfs-progs: check out if the swap device

2013-02-11 Thread Tsutomu Itoh
Hi, Eric, Thanks for your comment. On 2013/02/12 13:22, Eric Sandeen wrote: On 2/11/13 7:25 PM, Tsutomu Itoh wrote: Currently, the following commands succeed. # cat /proc/swaps FilenameTypeSizeUsed Priority /dev/sda3

[PATCH] Btrfs-progs: check out if the swap device

2013-02-11 Thread Tsutomu Itoh
Label: none uuid: fc0bdbd0-7eed-460f-b4e9-131273b66df2 Total devices 1 FS bytes used 28.00KB devid1 size 9.31GB used 989.62MB path /dev/sdc8 Btrfs v0.20-rc1-165-g82ac345 # But we should check out the swap device. So fixed it. Signed-off-by: Tsutomu Itoh --- (this

Re: [BUG] kernel BUG at fs/btrfs/async-thread.c:605!

2013-01-31 Thread Tsutomu Itoh
On 2013/02/01 12:49, Miao Xie wrote: > On Fri, 01 Feb 2013 09:31:33 +0900, Tsutomu Itoh wrote: >> Hi, >> >> On 2013/01/31 16:58, Miao Xie wrote: >>> On wed, 30 Jan 2013 23:55:34 -0600, Eric Sandeen wrote: >>>> if you move the fail_block_groups: target

Re: [BUG] kernel BUG at fs/btrfs/async-thread.c:605!

2013-01-31 Thread Tsutomu Itoh
Hi, On 2013/01/31 16:58, Miao Xie wrote: > On wed, 30 Jan 2013 23:55:34 -0600, Eric Sandeen wrote: >> if you move the fail_block_groups: target above the comment, does that fix >> it? >> (although I don't know yet what started IO . . . ) >> >> like this: >> >> From: Eric Sandeen >> >> Make sure

[BUG] kernel BUG at fs/btrfs/async-thread.c:605!

2013-01-30 Thread Tsutomu Itoh
Hi, In kernel 3.8-rc5, the following panics occurred when the mount was done by the degraded option. # btrfs fi sh /dev/sdc8 Label: none uuid: fc63cd80-5ae2-4fbe-8795-2d526c937a56 Total devices 3 FS bytes used 20.98GB devid1 size 9.31GB used 9.31GB path /dev/sdd8 devi

Re: [PATCH] btrfs: add "no file data" flag to btrfs send ioctl

2013-01-07 Thread Tsutomu Itoh
(2013/01/08 8:33), Mark Fasheh wrote: On Mon, Jan 07, 2013 at 11:01:17PM +0100, David Sterba wrote: On Mon, Jan 07, 2013 at 01:51:19PM -0800, Mark Fasheh wrote: +#define BTRFS_SEND_FLAG_NO_FILE_DATA 0x1 + + sctx->flags = arg->flags; + For compatibility reasons, you should mask th

[PATCH] Btrfs: fix memory leak in name_cache_insert()

2012-12-16 Thread Tsutomu Itoh
We should free name_cache_entry before returning from the error handling code. Signed-off-by: Tsutomu Itoh --- fs/btrfs/send.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 5445454..321b7fb 100644 --- a/fs/btrfs/send.c +++ b/fs

[PATCH] Btrfs: add fiemap's flag check

2012-11-28 Thread Tsutomu Itoh
When the flag not supported is specified, it is necessary to return the error to the caller. So, we add the validity check of the fiemap's flag. Signed-off-by: Tsutomu Itoh --- fs/btrfs/inode.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c

[PATCH] Btrfs: set hole punching time properly

2012-11-07 Thread Tsutomu Itoh
Even if the hole punching is executed, the modification time of the file is not updated. So, current time is set to inode. Signed-off-by: Tsutomu Itoh --- fs/btrfs/file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 110d3cb..15fecc1 100644 --- a

Re: [PATCH 00/26] Btrfs: Add device replace code

2012-11-06 Thread Tsutomu Itoh
(2012/11/07 1:38), Stefan Behrens wrote: > This patch series adds support for replacing disks at runtime. > > It replaces the following steps in case a disk was lost: > mount ... -o degraded > btrfs device add new_disk > btrfs device delete missing > > Or in case a disk just needs

Re: [PATCH 19/26] Btrfs: add code to scrub to copy read data to another disk

2012-11-06 Thread Tsutomu Itoh
(2012/11/07 1:38), Stefan Behrens wrote: > The device replace procedure makes use of the scrub code. The scrub > code is the most efficient code to read the allocated data of a disk, > i.e. it reads sequentially in order to avoid disk head movements, it > skips unallocated blocks, it uses read ahea

[PATCH] Btrfs: fix memory leak in btrfs_quota_enable()

2012-10-15 Thread Tsutomu Itoh
We should free quota_root before returning from the error handling code. Signed-off-by: Tsutomu Itoh --- fs/btrfs/qgroup.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 5039686..5776506 100644 --- a/fs/btrfs

Re: [PATCH v2 1/4] Btrfs-progs: add mount-option command

2012-10-12 Thread Tsutomu Itoh
Hi, (2012/10/12 12:24), Hidetoshi Seto wrote: > This patch adds mount-option command that can set/get/clear default > mount options. > > Signed-off-by: Hidetoshi Seto > --- > Makefile |4 +- > btrfs-parse-mntopt.c | 109 + > btrfs-parse-mntopt.h |

Re: [PATCH v2 1/4] Btrfs-progs: add mount-option command

2012-10-11 Thread Tsutomu Itoh
Hi, Seto-san, (2012/10/12 12:24), Hidetoshi Seto wrote: > This patch adds mount-option command that can set/get/clear default > mount options. > > Signed-off-by: Hidetoshi Seto > --- > Makefile |4 +- > btrfs-parse-mntopt.c | 109 + > btrfs-parse-

Re: [PATCH] Btrfs: fix error processing in btrfs_set_acl()

2012-10-05 Thread Tsutomu Itoh
(2012/10/05 19:02), David Sterba wrote: Hi, On Fri, Oct 05, 2012 at 06:35:07PM +0900, Tsutomu Itoh wrote: The error is only returned when kmalloc() fails. Therefore, to return the error to the caller directly here, I changed the code. "fix error processing in btrfs_set_acl()"

[PATCH] Btrfs: fix error processing in btrfs_set_acl()

2012-10-05 Thread Tsutomu Itoh
The error is only returned when kmalloc() fails. Therefore, to return the error to the caller directly here, I changed the code. Signed-off-by: Tsutomu Itoh --- fs/btrfs/acl.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 761e2cd

[PATCH] Btrfs: confirmation of value is added before trace_btrfs_get_extent() is called

2012-10-01 Thread Tsutomu Itoh
We should confirm the value of extent_map before calling trace_btrfs_get_extent() because the value of extent_map has the possibility of NULL. Signed-off-by: Tsutomu Itoh --- fs/btrfs/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs

[PATCH] Btrfs: remove unnecessary IS_ERR in bio_readpage_error()

2012-10-01 Thread Tsutomu Itoh
Because the value of extent_map is only a correct value or NULL, so IS_ERR is unnecessary. Signed-off-by: Tsutomu Itoh --- fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 979fa0d..576ed9f 100644 --- a/fs

[PATCH v2 2/2] Btrfs: remove unnecessary code in btree_get_extent()

2012-09-13 Thread Tsutomu Itoh
Unnecessary lookup_extent_mapping() is removed because an error is returned to the caller. This patch was made based on the advice from Stefan Behrens, thanks. Signed-off-by: Tsutomu Itoh --- fs/btrfs/disk-io.c |8 +--- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/fs

[PATCH v2 1/2] Btrfs: cleanup of error processing in btree_get_extent()

2012-09-13 Thread Tsutomu Itoh
This patch simplifies a little complex error processing in btree_get_extent(). Signed-off-by: Tsutomu Itoh --- fs/btrfs/disk-io.c | 14 +- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 29c69e6..27d0ebe 100644 --- a/fs

Re: [PATCH] Btrfs: cleanup of error processing in btree_get_extent()

2012-09-12 Thread Tsutomu Itoh
Hi, Stefan, (2012/09/12 19:37), Stefan Behrens wrote: On Wed, 12 Sep 2012 17:26:43 +0900, Tsutomu Itoh wrote: This patch simplifies a little complex error processing in btree_get_extent(). Signed-off-by: Tsutomu Itoh --- fs/btrfs/disk-io.c | 14 +- 1 files changed, 5

[PATCH] Btrfs: cleanup of error processing in btree_get_extent()

2012-09-12 Thread Tsutomu Itoh
This patch simplifies a little complex error processing in btree_get_extent(). Signed-off-by: Tsutomu Itoh --- fs/btrfs/disk-io.c | 14 +- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 29c69e6..27d0ebe 100644 --- a/fs

[PATCH] Btrfs-progs: fix arguments check of qgroup limit

2012-09-11 Thread Tsutomu Itoh
Segmentation fault occurred in the following command. # btrfs qgroup limit Segmentation fault So, we should check a minimum number of arguments. Signed-off-by: Tsutomu Itoh --- cmds-qgroup.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/cmds-qgroup.c b/cmds

[PATCH] Btrfs: fix error handling in delete_block_group_cache()

2012-09-06 Thread Tsutomu Itoh
btrfs_iget() never return NULL. So, NULL check is unnecessary. Signed-off-by: Tsutomu Itoh --- fs/btrfs/relocation.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index c5dbd91..738e869 100644 --- a/fs/btrfs

[PATCH] Btrfs: check return value of ulist_alloc() properly

2012-09-05 Thread Tsutomu Itoh
ulist_alloc() has the possibility of returning NULL. So, it is necessary to check the return value. Signed-off-by: Tsutomu Itoh --- fs/btrfs/qgroup.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 38b42e7..7aee652

[PATCH] Btrfs: return error of btrfs_update_inode() to caller

2012-06-25 Thread Tsutomu Itoh
We didn't check error of btrfs_update_inode(), but that error looks easy to bubble back up. Signed-off-by: Tsutomu Itoh --- fs/btrfs/inode.c|2 +- fs/btrfs/tree-log.c |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c

[PATCH] Btrfs: check return value of btrfs_set_extent_delalloc()

2012-06-25 Thread Tsutomu Itoh
btrfs_set_extent_delalloc() has the possibility of returning the error. So I add the code in which the return value of btrfs_set_extent_delalloc() is checked. Signed-off-by: Tsutomu Itoh --- fs/btrfs/ioctl.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/btrfs

Re: [PATCH 4/4] Btrfs: do not set subvolume flags in readonly mode

2012-06-21 Thread Tsutomu Itoh
(2012/06/21 20:48), Liu Bo wrote: > $ mkfs.btrfs /dev/sdb7 > $ btrfstune -S1 /dev/sdb7 > $ mount /dev/sdb7 /mnt/btrfs > mount: block device /dev/sdb7 is write-protected, mounting read-only > $ btrfs dev add /dev/sdb8 /mnt/btrfs/ > > Now we get a btrfs in which mnt flags has readonly but sb flags d

[PATCH] Btrfs: return value of btrfs_read_buffer is checked correctly

2012-05-29 Thread Tsutomu Itoh
btrfs_read_buffer() has the possibility of returning the error. Therefore, I add the code in which the return value of btrfs_read_buffer() is checked. Signed-off-by: Tsutomu Itoh --- fs/btrfs/ctree.c|6 +- fs/btrfs/tree-log.c | 16 +--- 2 files changed, 18 insertions

Re: [PATCH 19/24] Btrfs: qgroup implementation and prototypes

2012-05-20 Thread Tsutomu Itoh
Hi Jan, (2012/05/21 1:06), Jan Schmidt wrote: > From: Arne Jansen > > Signed-off-by: Arne Jansen > Signed-off-by: Jan Schmidt > --- > fs/btrfs/Makefile |2 +- > fs/btrfs/ctree.h | 33 ++ > fs/btrfs/ioctl.h | 24 + > fs/btrfs/qgroup.c | 1531 > ++

Re: [PATCH 07/24] Btrfs: add tree modification log functions

2012-05-20 Thread Tsutomu Itoh
Hi Jan, (2012/05/21 1:06), Jan Schmidt wrote: > The tree mod log will log modifications made fs-tree nodes. Most > modifications are done by autobalance of the tree. Such changes are recorded > as long as a block entry exists. When released, the log is cleaned. > > With the tree modification log,

Re: [GIT PULL] Btrfs updates

2012-04-15 Thread Tsutomu Itoh
ree in __btrfs_end_transaction > > Liu Bo (1) commits (+18/-2): > Btrfs: fix eof while discarding extents > > Ilya Dryomov (1) commits (+2/-3): > Btrfs: remove lock assert from get_restripe_target() > > Josef Bacik (1) commits (+3/-10): > Btrfs: use commi

[PATCH] Btrfs: check return value of bio_alloc() properly

2012-04-11 Thread Tsutomu Itoh
bio_alloc() has the possibility of returning NULL. So, it is necessary to check the return value. Signed-off-by: Tsutomu Itoh --- fs/btrfs/compression.c |2 ++ fs/btrfs/extent_io.c |4 fs/btrfs/scrub.c |4 3 files changed, 10 insertions(+), 0 deletions(-) diff

[PATCH] Btrfs: fix return value check of read_tree_block

2012-03-21 Thread Tsutomu Itoh
read_tree_block() has the possibility of returning NULL. So, the code in which it is checked whether the return value is NULL is added. Signed-off-by: Tsutomu Itoh --- fs/btrfs/print-tree.c |1 + fs/btrfs/relocation.c |2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a

[PATCH] Btrfs: fix error handling of btrfs_iget()

2012-02-22 Thread Tsutomu Itoh
btrfs_iget() never return NULL. So, NULL check is unnecessary. Signed-off-by: Tsutomu Itoh --- fs/btrfs/relocation.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 8c1aae2..be1caf4 100644 --- a/fs/btrfs

[PATCH] Btrfs: check return value of lookup_extent_mapping() correctly

2012-02-15 Thread Tsutomu Itoh
This patch corrects error checking of lookup_extent_mapping(). Signed-off-by: Tsutomu Itoh --- fs/btrfs/compression.c |2 ++ fs/btrfs/extent_io.c |2 +- fs/btrfs/volumes.c |2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs

[PATCH] Btrfs: fix return value check of extent_io_ops

2012-02-15 Thread Tsutomu Itoh
This patch adds the check on the return value of extent_io_ops. Signed-off-by: Tsutomu Itoh --- fs/btrfs/extent_io.c | 16 ++-- 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index fcf77e1..a84621f 100644 --- a/fs/btrfs

[PATCH] Btrfs: fix memory leak in load_free_space_cache()

2012-02-14 Thread Tsutomu Itoh
load_free_space_cache() has forgotten to free path. Signed-off-by: Tsutomu Itoh --- fs/btrfs/free-space-cache.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 5802b147..b30242f 100644 --- a/fs/btrfs/free

[PATCH] Btrfs: cleanup error handling in btree_get_extent()

2012-01-30 Thread Tsutomu Itoh
This patch removes the redundant code of error handling for the cleanup of btree_get_extent(). Signed-off-by: Tsutomu Itoh --- fs/btrfs/disk-io.c | 14 +- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 4c86711..ee07847

[PATCH] Btrfs: cleanup error handling in btrfs_set_acl

2011-12-04 Thread Tsutomu Itoh
When kmalloc fails, it returns directly by ENOMEM instead of 'goto out'. Signed-off-by: Tsutomu Itoh --- fs/btrfs/acl.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 89b156d..3757995 100644 --- a/fs/btrfs/acl.c +++

[BUG 3.2-rc4] kernel BUG at fs/btrfs/inode.c:2034!

2011-12-04 Thread Tsutomu Itoh
I encountered following kernel bug when running xfstests/083. FSTYP -- btrfs PLATFORM -- Linux/x86_64 luna 3.2.0-rc4 MKFS_OPTIONS -- /dev/sdc2 MOUNT_OPTIONS -- /dev/sdc2 /test9 [ 8208.990166] btrfs: fail to dirty inode 1195 error -28 [ 8208.990578] btrfs: fail to dirty inode

[PATCH] Btrfs: forced readonly when orphan_del fails

2011-12-01 Thread Tsutomu Itoh
In the case where the orphan_del fails, and cannot return error to the caller, the filesystem turns to readonly instead of BUG_ON(). Signed-off-by: Tsutomu Itoh --- fs/btrfs/inode.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs

[PATCH] Btrfs: forced readonly when free_log_tree fails

2011-12-01 Thread Tsutomu Itoh
The filesystem turns to readonly instead of BUG_ON() when free_log_tree fails. Signed-off-by: Tsutomu Itoh --- fs/btrfs/tree-log.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index f4d81c0..44bcfba 100644 --- a/fs/btrfs

Re: BUG at fs/btrfs/file.c:1656 [for-linus]

2011-11-13 Thread Tsutomu Itoh
(2011/11/09 2:13), David Sterba wrote: > Hi, > > a new BUG_ON on for-linus branch with In current for-linus branch (8965593e41dd2d0e2a2f1e6f245336005ea94a2c), I encountered following warning message and same BUG_ON() by running xfstests/269. FSTYP -- btrfs PLATFORM -- Linux/x86_64 l

Re: WARNING: at fs/btrfs/free-space-cache.c:305

2011-11-10 Thread Tsutomu Itoh
(2011/11/10 0:17), Josef Bacik wrote: > On Thu, Nov 03, 2011 at 10:25:23AM +0900, Tsutomu Itoh wrote: >> In integration-scrub branch, following warning messages were displayed by >> running xfstests. >> >> # btrfs fi sh /dev/sdd4 >> Label: none uuid: 8f2

Re: WARNING: at fs/btrfs/free-space-cache.c:305

2011-11-09 Thread Tsutomu Itoh
Hi, Josef, (2011/11/10 0:17), Josef Bacik wrote: > On Thu, Nov 03, 2011 at 10:25:23AM +0900, Tsutomu Itoh wrote: >> In integration-scrub branch, following warning messages were displayed by >> running xfstests. >> >> # btrfs fi sh /dev/sdd4 >> Label: no

[PATCH] Btrfs: remove setting of extra cur_trans

2011-11-08 Thread Tsutomu Itoh
Because cur_trans is set after it has the branch, it is not necessary to set it here. Signed-off-by: Tsutomu Itoh --- fs/btrfs/transaction.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 960835e..0d28c8f 100644

Re: BUG at fs/btrfs/inode.c:1795

2011-11-07 Thread Tsutomu Itoh
(2011/11/07 21:50), David Sterba wrote: > Hi, > > I saw this BUG in current linus' (with last pull included) to quickly > trigger in xfstests/013, with freshly created fs and default raid flags. I encountered the same panic this morning, too. My mount option is, mount option: compress=lzo [50

Re: WARNING: at fs/btrfs/extent-tree.c:124

2011-11-07 Thread Tsutomu Itoh
(2011/11/08 1:12), Chris Mason wrote: > On Mon, Nov 07, 2011 at 02:10:29PM +0900, Tsutomu Itoh wrote: >> In for-linus branch, when xfstests was executed, the following warning >> messages were output. > > Dave Sterba and I were consistently getting these last week, but aft

Re: WARNING: at fs/btrfs/free-space-cache.c:305

2011-11-07 Thread Tsutomu Itoh
Hi, Chris, (2011/11/04 8:43), Tsutomu Itoh wrote: > (2011/11/03 20:19), Chris Mason wrote: >> On Thu, Nov 03, 2011 at 10:25:23AM +0900, Tsutomu Itoh wrote: >>> In integration-scrub branch, following warning messages were displayed by >>> running xfstests. >>> &

WARNING: at fs/btrfs/extent-tree.c:124

2011-11-06 Thread Tsutomu Itoh
In for-linus branch, when xfstests was executed, the following warning messages were output. Thanks, Tsutomu === Nov 7 13:51:00 luna kernel: [ 824.063444] device fsid 2f0ad8a9-93d5-4c99-837f-9db99543133b devid 1 transid 1

Re: WARNING: at fs/btrfs/free-space-cache.c:305

2011-11-03 Thread Tsutomu Itoh
(2011/11/03 20:19), Chris Mason wrote: > On Thu, Nov 03, 2011 at 10:25:23AM +0900, Tsutomu Itoh wrote: >> In integration-scrub branch, following warning messages were displayed by >> running xfstests. >> >> # btrfs fi sh /dev/sdd4 >> Label: none uuid: 8f2

WARNING: at fs/btrfs/free-space-cache.c:305

2011-11-02 Thread Tsutomu Itoh
In integration-scrub branch, following warning messages were displayed by running xfstests. # btrfs fi sh /dev/sdd4 Label: none uuid: 8f28d85c-e37c-4c1b-adef-2627ca59be78 Total devices 2 FS bytes used 31.49MB devid1 size 9.31GB used 9.31GB path /dev/sdd4 devid2 siz

[PATCH] Btrfs-progs: fix compiler warning of extent-tree.c

2011-10-31 Thread Tsutomu Itoh
x27;%u' expects type 'unsigned int', but argument 3 has type 'long unsigned int' Signed-off-by: Tsutomu Itoh --- extent-tree.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/extent-tree.c b/extent-tree.c index 5bed3c2..5144d57 100644 --- a/exte

Re: btrfs-tools source code

2011-10-26 Thread Tsutomu Itoh
(2011/10/27 3:26), Hugo Mills wrote: > On Wed, Oct 26, 2011 at 01:51:31PM -0400, Phillip Susi wrote: >> It still doesn't appear to have returned to kernel.org. Should that >> happen sometime soon, or is it available somewhere else now? > >If the wiki was up (which should be coming back to ker

Re: [PATCH] Btrfs: fix regression in re-setting a large xattr

2011-10-13 Thread Tsutomu Itoh
(2011/10/14 2:11), Josef Bacik wrote: > Recently I changed the xattr stuff to unconditionally set the xattr first in > case the xattr didn't exist yet. This has introduced a regression when > setting > an xattr that already exists with a large value. If we find the key we are > looking for split

[PATCH] Btrfs: fix return value of btrfs_get_acl()

2011-10-05 Thread Tsutomu Itoh
In btrfs_get_acl(), when the second __btrfs_getxattr() call fails, acl is not correctly set. Therefore, a wrong value might return to the caller. Signed-off-by: Tsutomu Itoh --- fs/btrfs/acl.c | 17 +++-- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/fs/btrfs

Re: [BUG, integration-test] fs/btrfs/inode.c:835

2011-09-29 Thread Tsutomu Itoh
Hi, David, (2011/09/30 7:05), David Sterba wrote: > Hi, > > xfstests/013 triggered this bug (I've never seen it before, though the > integration-test is basically the same what I was hammering with xfstests > recently): The problem might be solved by the following patch. http://marc.info/?l=li

Re: [PATCH] btrfs: fix directory offsets for '.' and '..' entries

2011-09-11 Thread Tsutomu Itoh
The same patch has been posted about one month ago. http://marc.info/?l=linux-btrfs&m=131363399500506&w=2 Thanks, Tsutomu (2011/09/12 5:33), Grazvydas Ignotas wrote: > Currently getdents syscall returns wrong offset for '.' directory entry, > which confuses some programs like wine. This can b

[BUG] umount command doesn't end forever

2011-09-02 Thread Tsutomu Itoh
In current for-linus branch, I encountered the problem that the umount command doesn't end forever. = # mount ... /dev/sdc9 on /test9 type btrfs (rw,space_cache,compress=lzo,autodefrag) # umount /test9 crash> ps | grep umount 13107 6558 0 8801257296c0

[PATCH] Btrfs: make some functions return void

2011-08-25 Thread Tsutomu Itoh
The type of some functions that return only 0 is changed to 'void'. In addition, the check on the return value in the caller of these functions becomes unnecessary. So, these check is removed. Signed-off-by: Tsutomu Itoh --- fs/btrfs/async-thread.c | 17 fs/btrfs/asyn

[PATCH] Btrfs: fix error handling of create_reloc_root() and btrfs_copy_root()

2011-08-25 Thread Tsutomu Itoh
If kmalloc() or btrfs_copy_root() in create_reloc_root() failed, error is returned to the caller instead of BUG_ON(). and, error handling of btrfs_copy_root() is corrected properly. Signed-off-by: Tsutomu Itoh --- fs/btrfs/ctree.c |5 - fs/btrfs/relocation.c | 16

Re: [PATCH] btrfs:make btrfs_init_compress() return void

2011-08-22 Thread Tsutomu Itoh
(2011/08/22 23:22), Wanlong Gao wrote: > From: Wanlong Gao > > Make btrfs_init_compress() return void, since it always return 0, > and no need to check return value. > > Signed-off-by: Wanlong Gao > --- > fs/btrfs/compression.c |3 +-- > fs/btrfs/compression.h |2 +- > fs/btrfs/super.c

Re: [PATCH] Re: [btrfs-progs integration] incorrect argument checking for "btrfs sub snap -r"

2011-08-10 Thread Tsutomu Itoh
Hi, Hugo, I built your for-chris branch, and ran 'btrfs sub snap' command. Then, I encountered following error message. # btrfs sub snap Dir-1 Dir-2 Invalid arguments for subvolume snapshot commit:8b4c2a22bff85f86af44587973c8da8c29a67ffc is wrong, I think. (2011/07/01 21:55), Stephane Chaze

Re: [patch 9/9] btrfs: Push up non-looped btrfs_start_transaction failures

2011-08-10 Thread Tsutomu Itoh
(2011/08/11 10:58), Jeff Mahoney wrote: > On 08/10/2011 09:27 PM, Tsutomu Itoh wrote: >> Hi, Jeff, >> >> (2011/08/11 8:20), Jeff Mahoney wrote: >>> This patch handles btrfs_start_transaction failures that don't occur >>> in a loop and are obviou

Re: [patch 9/9] btrfs: Push up non-looped btrfs_start_transaction failures

2011-08-10 Thread Tsutomu Itoh
Hi, Jeff, (2011/08/11 8:20), Jeff Mahoney wrote: > This patch handles btrfs_start_transaction failures that don't occur > in a loop and are obvious to simply push up. In all cases except the > mark_garbage_root case, the error is already handled by BUG_ON in the > caller. > > Signed-off-by: J

<    1   2   3   >