Re: [PATCH] Btrfs: avoid building inode cache repeatly

2013-12-10 Thread Liu Bo
On Mon, Dec 09, 2013 at 09:20:05AM -0500, Chris Mason wrote: Quoting Liu Bo (2013-12-09 04:34:31) Inode cache is similar to free space cache and in fact shares the same code, however, we don't load inode cache unless we're about to allocate inode id, then there is a case where we only

[PATCH] btrfs-progs: fix a manpage item for btrfstune

2013-12-10 Thread Gui Hecheng
btrfstune operates on umounted devices device, not mount points mnt. fix it. --- man/btrfstune.8.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/btrfstune.8.in b/man/btrfstune.8.in index d4b2b7c..0313324 100644 --- a/man/btrfstune.8.in +++ b/man/btrfstune.8.in @@ -2,7

[PATCH 1/2] Btrfs: cleanup unnecessary parameter and variant of prepare_pages()

2013-12-10 Thread Miao Xie
- the caller has gotten the inode object, needn't pass the file object. And if so, we needn't define a inode pointer variant. - the position should be aligned by the page size not sector size, so we also needn't pass the root object into prepare_pages(). Signed-off-by: Miao Xie

[PATCH 2/2] Btrfs: fix the reserved space leak caused by the race between nonlock dio and buffered io

2013-12-10 Thread Miao Xie
When we ran sysbench on the fs with compression, the following WARN_ONs were triggered: fs/btrfs/inode.c:7829 WARN_ON(BTRFS_I(inode)-outstanding_extents); fs/btrfs/inode.c:7830 WARN_ON(BTRFS_I(inode)-reserved_extents); fs/btrfs/inode.c:7832 WARN_ON(BTRFS_I(inode)-csum_bytes); Steps to

[PATCH v2] btrfs-progs: add fsck.btrfs stub and manpage

2013-12-10 Thread David Sterba
Signed-off-by: David Sterba dste...@suse.cz --- v2: * install the new file Makefile| 1 + fsck.btrfs | 40 man/Makefile| 3 ++- man/fsck.btrfs.8.in | 47 +++ 4 files changed, 90

Re: Btrfs questions

2013-12-10 Thread Hugo Mills
On Mon, Dec 09, 2013 at 01:07:11PM -0800, Cirillo Costantino wrote: resending in plain text From: Cirillo Costantino li...@pacbell.net To: Hugo Mills h...@carfax.org.uk Cc: linux-btrfs@vger.kernel.org linux-btrfs@vger.kernel.org Sent: Monday, December

Re: [PATCH 1/2] Btrfs: fix an oops when doing balance relocation

2013-12-10 Thread Shilong Wang
2013/12/10 Wang Shilong wangsl.f...@cn.fujitsu.com: On 12/10/2013 12:14 AM, Wang Shilong wrote: From: Wang Shilong wangsl.f...@cn.fujitsu.com I hit a BUG_ON() when inserting reloc root into rc-reloc_root_tree.rb_root, the fact is block bytenr has been inserted before, this is really a

Re: Warning in inode_tree_add() -- !(entry-vfs_inode.i_state (I_WILL_FREE | I_FREEING)

2013-12-10 Thread Chris Mason
Quoting Pedro Fonseca (2013-12-09 16:15:46) Hi, I've got multiple instances of warnings caused by the statement WARN_ON(!(entry-vfs_inode.i_state (I_WILL_FREE | I_FREEING))); in inode_tree_add(). The tests were executed on the official 3.12.2 kernel. Do you think it's something serious?

Re: [PATCH] Btrfs: avoid building inode cache repeatly

2013-12-10 Thread Liu Bo
On Tue, Dec 10, 2013 at 04:51:41PM +0800, Liu Bo wrote: On Mon, Dec 09, 2013 at 09:20:05AM -0500, Chris Mason wrote: Quoting Liu Bo (2013-12-09 04:34:31) Inode cache is similar to free space cache and in fact shares the same code, however, we don't load inode cache unless we're about to

Re: Warning in inode_tree_add() -- !(entry-vfs_inode.i_state (I_WILL_FREE | I_FREEING)

2013-12-10 Thread Pedro Fonseca
On 12/10/13 14:25 , Chris Mason wrote: Quoting Pedro Fonseca (2013-12-09 16:15:46) Hi, I've got multiple instances of warnings caused by the statement WARN_ON(!(entry-vfs_inode.i_state (I_WILL_FREE | I_FREEING))); in inode_tree_add(). The tests were executed on the official 3.12.2 kernel.

[PATCH] btrfs-progs: convert remaining uuid buffer declarations to BTRFS_UUID_UNPARSED_SIZE

2013-12-10 Thread David Sterba
Signed-off-by: David Sterba dste...@suse.cz --- cmds-receive.c | 6 +++--- print-tree.c | 2 +- send-test.c| 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmds-receive.c b/cmds-receive.c index 95dc3ec4cafa..ed4410761b3e 100644 --- a/cmds-receive.c +++

Re: [PATCH] btrfs-progs: add options to sync filesystem after subvol delete

2013-12-10 Thread David Sterba
On Tue, Dec 10, 2013 at 08:17:07AM -0500, Chris Mason wrote: Quoting David Sterba (2013-12-09 18:32:45) On Mon, Dec 02, 2013 at 05:02:49PM +0800, Wang Shilong wrote: So an enahced interface could look like this: subvol delete: --commit-each - run the ioc sync/wait ioctl after each

Re: [PATCH] btrfs-progs: add options to sync filesystem after subvol delete

2013-12-10 Thread Chris Mason
Quoting David Sterba (2013-12-10 12:36:28) On Tue, Dec 10, 2013 at 08:17:07AM -0500, Chris Mason wrote: Quoting David Sterba (2013-12-09 18:32:45) On Mon, Dec 02, 2013 at 05:02:49PM +0800, Wang Shilong wrote: So an enahced interface could look like this: subvol delete:

Feature Req: mkfs.btrfs -d dup option on single device

2013-12-10 Thread Imran Geriskovan
Currently, if you want to protect your data against bit-rot on a single device you must have 2 btrfs partitions and mount them as Raid1. The requested option will save the user from partitioning and will provide flexibility. Yes, I know: This will not provide any safety againts hardware failure.

Re: Feature Req: mkfs.btrfs -d dup option on single device

2013-12-10 Thread Chris Murphy
On Dec 10, 2013, at 1:31 PM, Imran Geriskovan imran.gerisko...@gmail.com wrote: Currently, if you want to protect your data against bit-rot on a single device you must have 2 btrfs partitions and mount them as Raid1. No this also works: mkfs.btrfs -d dup -m dup -M device Chris Murphy --

Re: Feature Req: mkfs.btrfs -d dup option on single device

2013-12-10 Thread Imran Geriskovan
Currently, if you want to protect your data against bit-rot on a single device you must have 2 btrfs partitions and mount them as Raid1. No this also works: mkfs.btrfs -d dup -m dup -M device Thanks a lot. I guess docs need an update: https://btrfs.wiki.kernel.org/index.php/Mkfs.btrfs:

Re: Feature Req: mkfs.btrfs -d dup option on single device

2013-12-10 Thread Chris Murphy
On Dec 10, 2013, at 4:33 PM, Imran Geriskovan imran.gerisko...@gmail.com wrote: Currently, if you want to protect your data against bit-rot on a single device you must have 2 btrfs partitions and mount them as Raid1. No this also works: mkfs.btrfs -d dup -m dup -M device Thanks a lot.

Fwd: Feature Req: mkfs.btrfs -d dup option on single device

2013-12-10 Thread Imran Geriskovan
-- Forwarded message -- From: Imran Geriskovan imran.gerisko...@gmail.com Date: Wed, 11 Dec 2013 02:14:25 +0200 Subject: Re: Feature Req: mkfs.btrfs -d dup option on single device To: Chris Murphy li...@colorremedies.com Current btrfs-progs is v3.12. 0.19 is a bit old. But yes,

Re: Feature Req: mkfs.btrfs -d dup option on single device

2013-12-10 Thread Chris Murphy
On Dec 10, 2013, at 5:14 PM, Imran Geriskovan imran.gerisko...@gmail.com wrote: Current btrfs-progs is v3.12. 0.19 is a bit old. But yes, looks like the wiki also needs updating. Anyway I just tried it on an 8GB stick and it works, but -M (mixed data+metadata) is required, which

Re: Feature Req: mkfs.btrfs -d dup option on single device

2013-12-10 Thread Imran Geriskovan
I'm not a developer, I'm just an ape who wears pants. Chris Mason is the lead developer. All I can say about it is that it's been working for me OK so far. Great:) Now, I understand that you were using -d dup, which is quite valuable for me. And since GMail only show first names in Inbox list,

Re: Feature Req: mkfs.btrfs -d dup option on single device

2013-12-10 Thread Chris Murphy
On Dec 10, 2013, at 8:19 PM, Imran Geriskovan imran.gerisko...@gmail.com wrote: Now the question is, is it a good practice to use -M for large filesystems? Pros, Cons? What is the performance impact? Or any other possible impact? Uncertain. man mkfs.btrfs says Mix data and metadata chunks

RE: Btrfs questions

2013-12-10 Thread linoc
thanks -Original Message- From: Hugo Mills [mailto:h...@carfax.org.uk] Sent: Tuesday, December 10, 2013 4:19 AM To: Cirillo Costantino Cc: linux-btrfs@vger.kernel.org Subject: Re: Btrfs questions On Mon, Dec 09, 2013 at 01:07:11PM -0800, Cirillo Costantino wrote: resending in plain

[PATCH] fs: btrfs: new helper: file_inode(file)

2013-12-10 Thread Libo Chen
Signed-off-by: Libo Chen clbchenlibo.c...@huawei.com --- fs/btrfs/ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index a111622..fdfc0d7 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2690,7 +2690,7 @@ static long

[PATCH RESEND] fs: btrfs: new helper: file_inode(file)

2013-12-10 Thread Libo Chen
Signed-off-by: Libo Chen clbchenlibo.c...@huawei.com --- fs/btrfs/ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) - just change style diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index a111622..fdfc0d7 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2690,7

Re: Feature Req: mkfs.btrfs -d dup option on single device

2013-12-10 Thread Duncan
Chris Murphy posted on Tue, 10 Dec 2013 17:33:59 -0700 as excerpted: On Dec 10, 2013, at 5:14 PM, Imran Geriskovan imran.gerisko...@gmail.com wrote: As being the lead developer, is it possible for you to provide some insights for the reliability of this option? I'm not a developer, I'm