Re: [PATCH] btrfs: Don't call btrfs_start_transaction() on frozen fs to avoid deadlock.

2015-01-23 Thread David Sterba
On Wed, Jan 21, 2015 at 03:47:54PM +0800, Qu Wenruo wrote: To David: I'm a little curious about why inode_cache needs to be delayed to next transaction. In btrfs_remount() we have s_umount mutex, and we synced the whole filesystem already, so there should be no running transaction and we

Re: [PATCH] btrfs: Don't call btrfs_start_transaction() on frozen fs to avoid deadlock.

2015-01-23 Thread David Sterba
On Wed, Jan 21, 2015 at 03:04:02PM +0800, Miao Xie wrote: Pending changes are *not* only mount options. Feature change and label change are also pending changes if using sysfs. My miss, I don't notice feature and label change by sysfs. But the implementation of feature and label

[PATCH 3.19-rc] btrfs: add read-only check to sysfs handler of features

2015-01-23 Thread David Sterba
We don't want to trigger the change on a read-only filesystem, similar to what the label handler does. Signed-off-by: David Sterba dste...@suse.cz --- This emerged during the discussions about pending changes problems. fs/btrfs/sysfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [PATCH 1/1] Btrfs: move super_kobj and device_dir_kobj from fs_info to btrfs_fs_devices

2015-01-23 Thread David Sterba
On Tue, Jan 20, 2015 at 12:02:27AM +0800, Anand Jain wrote: This patch will provide a framework and help to create attributes from the structure btrfs_fs_devices which are available even before fs_info is created. So by moving the parent kobject super_kobj from fs_info to btrfs_fs_devices, it

Re: [PATCH 2/2 RESEND] btrfs: introduce shrinker for rb_tree that keeps valid btrfs_devices

2015-01-23 Thread David Sterba
On Thu, Jan 15, 2015 at 04:53:08PM +0800, Gui Hecheng wrote: The following patch: btrfs: remove empty fs_devices to prevent memory runout introduces @valid_dev_root aiming at recording @btrfs_device objects that have corresponding block devices with btrfs. But if a block device is

Re: Moving snapshots

2015-01-23 Thread Noah Massey
On Fri, Jan 23, 2015 at 5:05 AM, Matthias Urlichs matth...@urlichs.de wrote: Hello, how do I move a (read-only) snapshot? If you want to move a read-only snapshot to a different directory, '..' changes, and therefore is not a read-only operation. Simply creating another read-only snap from

Re: [PATCH v4] btrfs: add regression test for remount with thread_pool resized

2015-01-23 Thread Dave Chinner
On Fri, Jan 23, 2015 at 08:36:37PM +0800, Eryu Guan wrote: On Fri, Jan 23, 2015 at 03:28:59PM +0800, Xing Gu wrote: Regression test for a btrfs issue of resizing 'thread_pool' when remount the fs. This regression was introduced by the following linux kernel commit: btrfs: Added

Re: 3.19-rc5: Bug 91911: [REGRESSION] rm command hangs big time with deleting a lot of files at once

2015-01-23 Thread Zygo Blaxell
On Fri, Jan 23, 2015 at 03:01:28PM +0100, Martin Steigerwald wrote: Hi! Anyone seen this? Reported as: https://bugzilla.kernel.org/show_bug.cgi?id=91911 I have seen something like this since 3.15. I've also seen its cousin, which gets stuck in evict_inode, but the stacks of the hanging

3.19-rc5: Bug 91911: [REGRESSION] rm command hangs big time with deleting a lot of files at once

2015-01-23 Thread Martin Steigerwald
Hi! Anyone seen this? Reported as: https://bugzilla.kernel.org/show_bug.cgi?id=91911 I just want to get rid of some 127000+ akonadi lost+found files, any delete command I start just gets rid of some thousands and then hangs. merkaba:~ btrfs fi df /home Data, RAID1: total=160.92GiB,

Re: btrfs convert running out of space

2015-01-23 Thread Duncan
Marc Joliet posted on Fri, 23 Jan 2015 08:54:41 +0100 as excerpted: Am Fri, 23 Jan 2015 04:34:19 + (UTC) schrieb Duncan 1i5t5.dun...@cox.net: Gareth Pye posted on Fri, 23 Jan 2015 08:58:08 +1100 as excerpted: What are the chances that splitting all the large files up into sub gig

Re: [PATCH v2] Btrfs: Add code to support file creation time

2015-01-23 Thread David Sterba
On Thu, Jan 22, 2015 at 12:01:10PM -0800, Zach Brown wrote: @@ -5729,6 +5744,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans, struct btrfs_path *path; struct btrfs_inode_ref *ref; struct btrfs_key key[2]; + struct timespec current_time;

Re: Recovery Operation With Multiple Devices

2015-01-23 Thread Hugo Mills
On Fri, Jan 23, 2015 at 06:53:42PM +1100, Brett King wrote: Hi All, Just wondering how 'btrfs recovery' operates, when the source device given is one of many in an MD array - I can't find anything documentation beyond a single device use case. Does it automatically include all devices in

[PATCH RFC v3 4/5] btrfs: Use btrfs_test_trans_opt() to handle SPACE_CACHE if it's under transaction protect.

2015-01-23 Thread Qu Wenruo
Convert btrfs_test_opt() to btrfs_test_trans_opt() if it's called under transaction protection. This will ensure SPACE_CACHE bit is consistent during transaction. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/transaction.c | 7 --- 2 files

[PATCH RFC v3 1/5] Revert btrfs: add support for processing pending changes related commits

2015-01-23 Thread Qu Wenruo
This reverts commit 572d9ab7845 ~ a6f69dc8018. This pending commits patches introduce deadlock with freeze, and fix for it will introduce extra checks on freeze and read only case. For mount option change, later patches will introduce copy-n-update method and rwsem protects to keep mount options

[PATCH RFC v3 2/5] btrfs: Make btrfs_parse_options() parse mount option in a atomic way

2015-01-23 Thread Qu Wenruo
Current btrfs_parse_options() is not atomic, which can set and clear a bit, especially for nospace_cache case. For example, if a fs is mounted with nospace_cache, btrfs_parse_options() will set SPACE_CACHE bit first(since cache_generation is non-zeo) and clear the SPACE_CACHE bit due to

[PATCH RFC v3 3/5] btrfs: Introduce per-transaction mount_opt to keep mount option consistent during transaction.

2015-01-23 Thread Qu Wenruo
Before this patch, mount_opt is not consistent during a transaction. btrfs_parse_options() can race with transaction. Now each transaction will keep a copy of fs_info-mount_opt upon creation, and new btrfs_test_trans_opt() macro is introduced to get the mount_opt in the transaction.

[PATCH RFC v3 0/5] mount options consistent enhancement

2015-01-23 Thread Qu Wenruo
Patchset to solve the previous found deadlock and enhance mount options consistence. Unlike previous pending_changes, which uses transaction commits to ensure mount option doesn't change during transaction. This patch use the RCU-like concept, which will copy the mount_opt from fs_info into

RE: Recovery Operation With Multiple Devices

2015-01-23 Thread Brett King
-Original message- From: Hugo Mills h...@carfax.org.uk Sent: Fri 01-23-2015 08:48 pm Subject:Re: Recovery Operation With Multiple Devices Attachment: signature.asc To: Brett King brett.k...@commandict.com.au; CC: linux-btrfs@vger.kernel.org; On Fri, Jan 23, 2015

btrfs send and interrupts

2015-01-23 Thread Matthias Urlichs
Hi, root@data:/daten/backup/email/xmit# btrfs send foo | ssh wherever btrfs receive /mnt/mail/xmit/ At subvol foo At subvol foo [ some time passes and I need to do something else on that volume ] ^Z [1]+ Stopped btrfs send foo | ssh -p50022 surf btrfs receive /mnt/mail/xmit/

Moving snapshots

2015-01-23 Thread Matthias Urlichs
Hello, how do I move a (read-only) snapshot? Simply creating another read-only snap from the first one and then deleting the source works, except that it destroy's the snapshot's identity -- which means that it can't be used as a parent for btrfs receive any more. :-( -- -- Matthias Urlichs

Re: Recovery Operation With Multiple Devices

2015-01-23 Thread Brendan Hide
On 2015/01/23 09:53, Brett King wrote: Hi All, Just wondering how 'btrfs recovery' operates I'm assuming you're referring to a different set of commands or general scrub/recovery processes. AFAIK there is no btrfs recovery command. , when the source device given is one of many in an MD array

Re: [PATCH] btrfs-progs:qgroup:make large size aligned

2015-01-23 Thread David Sterba
On Fri, Jan 23, 2015 at 09:50:49AM +0800, Fan Chengniang wrote: problem: when the size is too big, the output format will be unaligned. the __update__columns_max_len function has been updated to fix this problem Signed-off-by: Fan Chengniang fancn.f...@cn.fujitsu.com --- In my patch [PATCH

[PATCH v3] Btrfs: Add code to support file creation time

2015-01-23 Thread David Sterba
From: chandan r chandanrm...@gmail.com This patch adds a new member to the 'struct btrfs_inode' structure to hold the file creation time. Signed-off-by: chandan chandanrm...@gmail.com [refreshed, removed btrfs_inode_otime] Signed-off-by: David Sterba dste...@suse.cz --- V3: - removed forgotten

Re: btrfs send and interrupts

2015-01-23 Thread Brendan Hide
On 2015/01/23 11:58, Matthias Urlichs wrote: Hi, root@data:/daten/backup/email/xmit# btrfs send foo | ssh wherever btrfs receive /mnt/mail/xmit/ At subvol foo At subvol foo [ some time passes and I need to do something else on that volume ] ^Z [1]+ Stopped btrfs send foo |

Re: 3.19-rc5: Bug 91911: [REGRESSION] rm command hangs big time with deleting a lot of files at once

2015-01-23 Thread Holger Hoffstätte
On Fri, 23 Jan 2015 15:01:28 +0100, Martin Steigerwald wrote: Hi! Anyone seen this? Reported as: https://bugzilla.kernel.org/show_bug.cgi?id=91911 You might be interested in:

Re: [PULL] [PATCH 0/3] Btrfs, fixes for freezing vs pending changes

2015-01-23 Thread David Sterba
On Fri, Jan 23, 2015 at 10:32:16AM +0800, Qu Wenruo wrote: 1) mount option change problem. In fact, there is no need to start a transaction to change mount option, since it doesn't change anything on-disk. The commit is to flush all the data that should see the same state of the mount

Re: [PATCH RFC v3 1/5] Revert btrfs: add support for processing pending changes related commits

2015-01-23 Thread David Sterba
On Fri, Jan 23, 2015 at 05:31:41PM +0800, Qu Wenruo wrote: For mount option change, later patches will introduce copy-n-update method and rwsem protects to keep mount options consistent during transaction. That's a better approach, for the mount options. For sysfs interface to change

Re: 3.19-rc5: Bug 91911: [REGRESSION] rm command hangs big time with deleting a lot of files at once

2015-01-23 Thread Chris Mason
On Fri, Jan 23, 2015 at 9:38 AM, Holger Hoffstätte holger.hoffstae...@googlemail.com wrote: On Fri, 23 Jan 2015 15:01:28 +0100, Martin Steigerwald wrote: Hi! Anyone seen this? Reported as:

Re: [PATCH v4] btrfs: add regression test for remount with thread_pool resized

2015-01-23 Thread Eryu Guan
On Fri, Jan 23, 2015 at 03:28:59PM +0800, Xing Gu wrote: Regression test for a btrfs issue of resizing 'thread_pool' when remount the fs. This regression was introduced by the following linux kernel commit: btrfs: Added btrfs_workqueue_struct implemented ordered execution based on

Re: [PATCH v2] fstests: btrfs/079: Fix wrong value passed to available space check.

2015-01-23 Thread David Sterba
On Wed, Jan 21, 2015 at 02:08:37PM +0800, Qu Wenruo wrote: Wrong value is passed to _require_fs_space, which should be in unit of kilobyte(1024), but passed in unit of gigabyte(1024^3). Fix it. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com Reviewed-by: David Sterba dste...@suse.cz --