Re: btrfs fi df mount point outputs info instead of error even when mount-point is just a directory

2014-07-02 Thread Qu Wenruo
Original Message Subject: btrfs fi df mount point outputs info instead of error even when mount-point is just a directory From: Vikram Goyal vikigo...@gmail.com To: linux-btrfs@vger.kernel.org Date: 2014年07月02日 13:14 Hi, As the subject specifies there is some confusion (at

Re: [PATCH 1/2 v2] btrfs: device add must be sysloged

2014-07-02 Thread Satoru Takeuchi
(2014/07/02 10:37), Anand Jain wrote: when we add a new disk to the mounted btrfs we don't record it as of now, disk add is a critical change of btrfs configuration, it must be recorded in the syslog to help offline investigations of customer problems when reported. Signed-off-by: Anand

Re: [PATCH 2/2 v2] btrfs: device delete must be sysloged

2014-07-02 Thread Satoru Takeuchi
(2014/07/02 10:37), Anand Jain wrote: as in the disk add patch, disk detached from the volume must be recorded in the syslog as well for the same reason. Signed-off-by: Anand Jain anand.j...@oracle.com Reviewed-by: David Sterba dste...@suse.cz Reviewed-by: Satoru Takeuchi

Re: [PATCH 1/2 v2] btrfs: device add must be sysloged

2014-07-02 Thread Satoru Takeuchi
(2014/07/02 16:02), Satoru Takeuchi wrote: (2014/07/02 10:37), Anand Jain wrote: when we add a new disk to the mounted btrfs we don't record it as of now, disk add is a critical change of btrfs configuration, it must be recorded in the syslog to help offline investigations of customer

Re: [PATCH v3] Btrfs: fix race of using total_bytes_pinned

2014-07-02 Thread Liu Bo
On Wed, Jul 02, 2014 at 10:28:17AM +0800, Miao Xie wrote: On Tue, 1 Jul 2014 17:28:46 +0800, Liu Bo wrote: This percpu counter @total_bytes_pinned is introduced to skip unnecessary operations of 'commit transaction', it accounts for those space we may free but are stuck in delayed refs.

Re: [RFC PATCH] Revert btrfs: allow mounting btrfs subvolumes with different ro/rw options

2014-07-02 Thread Harald Hoyer
On 01.07.2014 18:36, Chris Mason wrote: On 07/01/2014 11:32 AM, David Sterba wrote: (adding Harald to CC) On Tue, Jul 01, 2014 at 05:30:01PM +0800, Qu Wenruo wrote: This reverts commit 0723a0473fb48a1c93b113a28665b64ce5faf35a. This commit has the following problem: 1) Break the ro mount

Re: Question about fallocate

2014-07-02 Thread Duncan
Gionatan Danti posted on Tue, 01 Jul 2014 12:16:34 +0200 as excerpted: So, my question is: why writing to a fallocated file produce fragmentation, even with CoW disabled? Good question. But how did you disable COW? The nodatacow mount option? Setting the NOCOW attribute on the file or

Re: [RFC PATCH] Revert btrfs: allow mounting btrfs subvolumes with different ro/rw options

2014-07-02 Thread Duncan
Harald Hoyer posted on Wed, 02 Jul 2014 09:59:15 +0200 as excerpted: Pull it out, if the patch causes problems, but _please_ think about the problem and come up with a solution, so that mount -a works with a normal fstab. FWIW, systemd makes it a LOT easier to manage multi-stage mounts with

Re: [RFC PATCH] Revert btrfs: allow mounting btrfs subvolumes with different ro/rw options

2014-07-02 Thread Qu Wenruo
Original Message Subject: Re: [RFC PATCH] Revert btrfs: allow mounting btrfs subvolumes with different ro/rw options From: Harald Hoyer har...@redhat.com To: Chris Mason c...@fb.com, dste...@suse.cz, Qu Wenruo quwen...@cn.fujitsu.com, linux-btrfs@vger.kernel.org Date:

[PATCH v4] Btrfs: fix race of using total_bytes_pinned

2014-07-02 Thread Liu Bo
This percpu counter @total_bytes_pinned is introduced to skip unnecessary operations of 'commit transaction', it accounts for those space we may free but are stuck in delayed refs. And we zero out @space_info-total_bytes_pinned every transaction period so we have a better idea of how much space

[PATCH] Btrfs: fix wrong uevent target

2014-07-02 Thread Miao Xie
block_device's bd_disk points to the disk, not the object which block_device is actually corresponding to(the whole disk or a partition), so we would send uevent to the wrong target. Fix it. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/volumes.c | 2 +- 1 file changed, 1

Re: [PATCH] btrfs-progs: Check superblock's checksum in btrfs-progs.

2014-07-02 Thread Qu Wenruo
I'm very sorry that this patch breaks the open_ctree(). 1) pread() only reads sizeof(struct btrfs_super_block), not BTRFS_SUPER_INFO_SIZE. Which makes csum always dismatch. 2) memcpy() uses wrong src(should be 'buf' not 'sb'). I'll send v2 version patch soon. Thanks, Qu Original

Re: [PATCH v4] Btrfs: fix race of using total_bytes_pinned

2014-07-02 Thread Miao Xie
On Wed, 2 Jul 2014 16:58:01 +0800, Liu Bo wrote: This percpu counter @total_bytes_pinned is introduced to skip unnecessary operations of 'commit transaction', it accounts for those space we may free but are stuck in delayed refs. And we zero out @space_info-total_bytes_pinned every

Re: build failure with mason/for-linus tree

2014-07-02 Thread Miao Xie
On Wed, 2 Jul 2014 08:41:54 +0900, Satoru Takeuchi wrote: Hi Chris, (2014/07/01 23:30), Chris Mason wrote: On 07/01/2014 01:43 AM, Satoru Takeuchi wrote: Hi Chris, FYI, today I failed to build mason/for-linus tree as follows. You were building for 3.15? I just run the following

Re: [PATCH 1/2] btrfs-progs: move the check_argc_* functions into utils.c

2014-07-02 Thread David Sterba
On Wed, Jul 02, 2014 at 01:20:41AM +0100, WorMzy Tykashi wrote: I'm getting a build failure in integration-20140701 in regard to these changes: - [CC] help.o help.c:23:23: error: 'ARGV0_BUF_SIZE' undeclared here (not in a function) static char argv0_buf[ARGV0_BUF_SIZE];

Re: Question about fallocate

2014-07-02 Thread Gionatan Danti
Hi, But how did you disable COW? The nodatacow mount option? Setting the NOCOW attribute on the file or parent-dir (chattr +C)? Something else? Because there are caveats to both the mount option and the file attribute methods. I used the nodatacow mount point. When doing the test, I had

Re: [PATCH 1/2] btrfs-progs: move the check_argc_* functions into utils.c

2014-07-02 Thread WorMzy Tykashi
On 2 July 2014 10:34, David Sterba dste...@suse.cz wrote: Oh sorry, fixed branch pushed. I've added the utils.h inlucde into cmds-property.c as well, fixes implicit declaration of function warnings. Great stuff, thanks. WorMzy -- To unsubscribe from this list: send the line unsubscribe

Re: Question about fallocate

2014-07-02 Thread Maurizio Lombardi
On 07/02/2014 12:36 PM, Gionatan Danti wrote: Hi, But how did you disable COW? The nodatacow mount option? Setting the NOCOW attribute on the file or parent-dir (chattr +C)? Something else? Because there are caveats to both the mount option and the file attribute methods. I used

Re: [PATCH] btrfs-progs: add supported attr flags to btrfs(5)

2014-07-02 Thread David Sterba
On Tue, Jul 01, 2014 at 07:43:46PM +0200, David Sterba wrote: (only nitpick: is 'X' ever reported by lsattr on btrfs? If so, it could/should still be included) I'll take a look and will keep 'X' if it's visible somewher. For the record, with sufficiently new e2fsprogs 'X' appears if the

Re: btrfs fi df mount point outputs info instead of error even when mount-point is just a directory

2014-07-02 Thread Vikram Goyal
On Wed, Jul 02, 2014 at 02:19:52PM +0800, Qu Wenruo wrote: Original Message Subject: btrfs fi df mount point outputs info instead of error even when mount-point is just a directory From: Vikram Goyal vikigo...@gmail.com To: linux-btrfs@vger.kernel.org Date: 2014年07月02日 13:14

Re: Blocked tasks on 3.15.1

2014-07-02 Thread Chris Mason
On 07/02/2014 08:27 AM, Cody P Schafer wrote: Will do. The rsync I'm running is processing a lot of chromium cache files when it hangs (just for a reference), and ends up triggering a bunch of deletes as well. Still a problem with your v3.15.y (eb97581), here's the log with sysrq-t and

Re: Question about fallocate

2014-07-02 Thread Gionatan Danti
I am unable to reproduce the problem on kernel version 3.16.0-rc2 using nodatacow. I all, I can confirm that with Fedora 20 x86_64 (kernel 3.14.9-200.fc20.x86_64) the problem do not occour: using the nodatacow option leads to un-fragmented file. Sorry for the noise. -- Danti Gionatan

Re: Blocked tasks on 3.15.1

2014-07-02 Thread Chris Mason
On 07/02/2014 09:58 AM, Chris Mason wrote: On 07/02/2014 08:27 AM, Cody P Schafer wrote: Will do. The rsync I'm running is processing a lot of chromium cache files when it hangs (just for a reference), and ends up triggering a bunch of deletes as well. Still a problem with your v3.15.y

Re: [PATCH v2] btrfs: fix nossd and ssd_spread mount option regression

2014-07-02 Thread Eric Sandeen
On 7/1/14, 11:19 PM, Qu Wenruo wrote: From: Eric Sandeen sand...@redhat.com The commit 0780253 btrfs: Cleanup the btrfs_parse_options for remount. broke ssd options quite badly; it stopped making ssd_spread imply ssd, and it made nossd unsettable. Put things back at least as well as

Question about debugfs on btrfs

2014-07-02 Thread Zhe Zhang
Hi, I'm trying to use a functionality like debugfs blocks or dump_extents on a btrfs partition. The current debugfs user space program doesn't seem to support it (from e2fsprogs). I cannot find debugfs in btrfs-progs either. Any advice on how to do it? Thanks! Zhe -- To unsubscribe from this

Re: Question about debugfs on btrfs

2014-07-02 Thread Hugo Mills
On Wed, Jul 02, 2014 at 12:23:01PM -0400, Zhe Zhang wrote: Hi, I'm trying to use a functionality like debugfs blocks or dump_extents on a btrfs partition. The current debugfs user space program doesn't seem to support it (from e2fsprogs). I cannot find debugfs in btrfs-progs either. Any

Re: Question about debugfs on btrfs

2014-07-02 Thread Zhe Zhang
Thanks Hugo, that works great. On Wed, Jul 2, 2014 at 12:31 PM, Hugo Mills h...@carfax.org.uk wrote: On Wed, Jul 02, 2014 at 12:23:01PM -0400, Zhe Zhang wrote: Hi, I'm trying to use a functionality like debugfs blocks or dump_extents on a btrfs partition. The current debugfs user space

[PATCH] Btrfs: fix btrfs_print_leaf for skinny metadata

2014-07-02 Thread Josef Bacik
We wouldn't actuall print the extent information if we had a skinny metadata item, this fixes that. Thanks, Signed-off-by: Josef Bacik jba...@fb.com --- fs/btrfs/print-tree.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/print-tree.c

Re: [RFC PATCH] Revert btrfs: allow mounting btrfs subvolumes with different ro/rw options

2014-07-02 Thread Goffredo Baroncelli
On 07/01/2014 11:30 AM, Qu Wenruo wrote: This commit has the following problem: 1) Break the ro mount rule. When users mount the whole btrfs ro, it is still possible to mount subvol rw and change the contents. Which make the whole fs ro mount non-sense. Where is the problem ? I see an use

[PATCH] Btrfs: __btrfs_mod_ref should always use no_quota

2014-07-02 Thread Josef Bacik
Before I extended the no_quota arg to btrfs_dec/inc_ref because I didn't understand how snapshot delete was using it and assumed that we needed the quota operations there. With Mark's work this has turned out to be not the case, we _always_ need to use no_quota for btrfs_dec/inc_ref, so just drop

[PATCH] Btrfs: read lock extent buffer while walking backrefs

2014-07-02 Thread Filipe Manana
Before processing the extent buffer, acquire a read lock on it, so that we're safe against concurrent updates on the extent buffer. Signed-off-by: Filipe Manana fdman...@suse.com --- fs/btrfs/backref.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c

[PATCH] btrfs-progs: show extent state for a subvolume

2014-07-02 Thread Mark Fasheh
The qgroup verification code can trivially be extended to provide extended information on the extents which a subvolume root references. Along with qgroup-verify, I have found this tool to be invaluable when tracking down extent references. The patch adds a switch to the check subcommand

3.15.1: kernel BUG at fs/btrfs/locking.c:269

2014-07-02 Thread Marc MERLIN
This got triggered by an rsync I think. I'm not sure which of my btrfs FS has the issue yet since BUG_ON isn't very helpful as discussed earlier. [160562.925463] parent transid verify failed on 2776298520576 wanted 41015 found 18120 [160562.950297] [ cut here ]

[PATCH 0/3] btrfs: qgroup fixes for btrfs_drop_snapshot

2014-07-02 Thread Mark Fasheh
Hi, the following patches try to fix a long outstanding issue with qgroups and snapshot deletion. The core problem is that btrfs_drop_snapshot will skip shared extents during it's tree walk. This results in an inconsistent qgroup state once the drop is processed. The first patch adds some tracing

[PATCH 3/3] Btrfs: __btrfs_mod_ref should always use no_quota

2014-07-02 Thread Mark Fasheh
From: Josef Bacik jba...@fb.com From Josef Bacik jba...@fb.com Before I extended the no_quota arg to btrfs_dec/inc_ref because I didn't understand how snapshot delete was using it and assumed that we needed the quota operations there. With Mark's work this has turned out to be not the case, we

[PATCH 1/3] btrfs: add trace for qgroup accounting

2014-07-02 Thread Mark Fasheh
We want this to debug qgroup changes on live systems. Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: Josef Bacik jba...@fb.com --- fs/btrfs/qgroup.c| 3 +++ fs/btrfs/super.c | 1 + include/trace/events/btrfs.h | 56

[PATCH 2/3] btrfs: qgroup: account shared subtrees during snapshot delete

2014-07-02 Thread Mark Fasheh
During its tree walk, btrfs_drop_snapshot() will skip any shared subtrees it encounters. This is incorrect when we have qgroups turned on as those subtrees need to have their contents accounted. In particular, the case we're concerned with is when removing our snapshot root leaves the subtree with

Re: [PATCH v2] btrfs: fix nossd and ssd_spread mount option regression

2014-07-02 Thread Qu Wenruo
Original Message Subject: Re: [PATCH v2] btrfs: fix nossd and ssd_spread mount option regression From: Eric Sandeen sand...@redhat.com To: Qu Wenruo quwen...@cn.fujitsu.com, linux-btrfs@vger.kernel.org Date: 2014年07月03日 00:12 On 7/1/14, 11:19 PM, Qu Wenruo wrote: From: Eric

Re: [RFC PATCH] Revert btrfs: allow mounting btrfs subvolumes with different ro/rw options

2014-07-02 Thread Qu Wenruo
Original Message Subject: Re: [RFC PATCH] Revert btrfs: allow mounting btrfs subvolumes with different ro/rw options From: Goffredo Baroncelli kreij...@libero.it To: Qu Wenruo quwen...@cn.fujitsu.com, linux-btrfs@vger.kernel.org Date: 2014年07月03日 01:48 On 07/01/2014 11:30

Re: [PATCH v2] btrfs: fix nossd and ssd_spread mount option regression

2014-07-02 Thread Chris Mason
On 07/02/2014 08:24 PM, Qu Wenruo wrote: Original Message Subject: Re: [PATCH v2] btrfs: fix nossd and ssd_spread mount option regression From: Eric Sandeen sand...@redhat.com To: Qu Wenruo quwen...@cn.fujitsu.com, linux-btrfs@vger.kernel.org Date: 2014年07月03日 00:12 On

Re: [RFC PATCH] Revert btrfs: allow mounting btrfs subvolumes with different ro/rw options

2014-07-02 Thread Chris Mason
On 7/2/14, 3:59 AM, Harald Hoyer har...@redhat.com wrote: On 01.07.2014 18:36, Chris Mason wrote: On 07/01/2014 11:32 AM, David Sterba wrote: (adding Harald to CC) On Tue, Jul 01, 2014 at 05:30:01PM +0800, Qu Wenruo wrote: This reverts commit 0723a0473fb48a1c93b113a28665b64ce5faf35a. This

[PATCH 1/2] btrfs-progs: add ask_user confirmation for btrfstune clear seeding flag

2014-07-02 Thread Gui Hecheng
Clear the seeding flag may cause the original filesystem to be writable, which is dangerous. In this case, add user confirmation check when clearing seeding flag. Also warn the user that the fs is in a dangerous condition when the seeding flag is cleared if it it forced to. Signed-off-by: Gui

Re: [PATCH] Btrfs: implement support for fallocate collapse range

2014-07-02 Thread Chandan Rajendra
On Monday 23 Jun 2014 11:25:47 Filipe David Borba Manana wrote: diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index aeab453..8f1a371 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -2825,12 +2825,12 @@ cow_done: * It is safe to drop the lock on our parent before we