Btrfs: wait for quota rescan to complete

2013-05-06 Thread Jan Schmidt
Two small patches, one for the kernel and one for the user mode. Both required to support waiting for quota rescan to complete. Jan Schmidt (1): Btrfs: add ioctl to wait for qgroup rescan completion fs/btrfs/ctree.h |2 ++ fs/btrfs/ioctl.c | 12 fs/btrfs

[PATCH 2/2] Btrfs-progs: added btrfs quota rescan -w switch (wait)

2013-05-06 Thread Jan Schmidt
With -w one can wait for a rescan operation to finish. It can be used when starting a rescan operation or later to wait for the currently running rescan operation to finish. Waiting is interruptible. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- cmds-quota.c | 19

[PATCH 1/2] Btrfs-progs: fixup: add flags to struct btrfs_ioctl_quota_rescan_args

2013-05-06 Thread Jan Schmidt
The patch set previously sent was sent together with the kernel part, but was not updated as I added some reserved bytes to the ioctl struct for future compatibility. This fixes struct btrfs_ioctl_quota_rescan_args. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- ioctl.h |1 + 1

[PATCH] Btrfs: add ioctl to wait for qgroup rescan completion

2013-05-06 Thread Jan Schmidt
btrfs_qgroup_wait_for_completion waits until the currently running qgroup operation completes. It returns immediately when no rescan process is in progress. This is useful to automate things around the rescan process (e.g. testing). Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs

Re: hard freezes with 3.9.0 during io-intensive loads

2013-05-07 Thread Jan Schmidt
On Mon, May 06, 2013 at 22:29 (+0200), Kai Krakow wrote: Jan Schmidt list.bt...@jan-o-sch.net schrieb: That one should be fixed in btrfs-next. If you can reliably reproduce the bug I'd be glad to get a confirmation - you can probably even save putting it on bugzilla then ;-) I can

Re: [PATCH] Btrfs: add ioctl to wait for qgroup rescan completion

2013-05-07 Thread Jan Schmidt
On Mon, May 06, 2013 at 23:20 (+0200), David Sterba wrote: On Mon, May 06, 2013 at 09:14:17PM +0200, Jan Schmidt wrote: --- a/include/uapi/linux/btrfs.h +++ b/include/uapi/linux/btrfs.h @@ -530,6 +530,7 @@ struct btrfs_ioctl_send_args { struct

Re: [PATCH] Btrfs: save us a mutex_lock usage when doing quota rescan

2013-05-07 Thread Jan Schmidt
don't need hold qgroup_rescan_lock when doing qgroup accounting. NAK. After a discussion on that lock the last thing in this thread I see is ... On Wed, May 01, 2013 at 13:57 (+0200), Jan Schmidt wrote: Now I see what you mean. The second check is only required when we start a rescan operation

Re: [PATCH] Btrfs: fix passing wrong arg gfp_t to decide the correct allocation mode

2013-05-07 Thread Jan Schmidt
On Tue, May 07, 2013 at 08:20 (+0200), Wang Shilong wrote: If you look the code carefully, you will see all the tree_mod_alloc() has to use GFP_ATOMIC. However, the original code pass the wrong arg gfp_t in some places, this dosen't cause any problems, because in the tree_mod_alloc(), it

Re: Kernel BUG: __tree_mod_log_rewind

2013-05-07 Thread Jan Schmidt
the commits mentioned in my previous email today: On Tue, May 07, 2013 at 08:08 (+0200), Jan Schmidt wrote: In git log order: 6ced2666 Btrfs: separate sequence numbers for delayed ref tracking and tree mod log ef9120b1 Btrfs: fix tree mod log regression on root split operations 2ed098ca Btrfs: fix

Re: [PATCH] Btrfs: Don't allocate inode that is already in use

2013-10-15 Thread Jan Schmidt
__btrfs_add_free_space(pinned, objectid, 1); Reviewed-by: Jan Schmidt list.bt...@jan-o-sch.net ... although this is not the most beautiful commit message I've ever seen ;-) -Jan -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org

Re: [PATCH] Btrfs: Don't allocate inode that is already in use

2013-10-16 Thread Jan Schmidt
On Tue, October 15, 2013 at 22:41 (+0200), Zach Brown wrote: Probably a bit too obscure to turn this into an xfstest? At least nobody complained so far, and this reproducer takes me 1m57 to run, so nothing I want in each xfstest cycle. I disagree. The entire point of regression tests is

Re: [PATCH] Btrfs: use right root when checking for hash collision

2013-10-16 Thread Jan Schmidt
On Wed, October 09, 2013 at 18:26 (+0200), Josef Bacik wrote: btrfs_rename was using the root of the old dir instead of the root of the new dir when checking for a hash collision, so if you tried to move a file into a subvol it would freak out because it would see the file you are trying to

Re: [PATCH] Btrfs: fix negative qgroup tracking from owner accounting (bug #61951)

2013-10-24 Thread Jan Schmidt
On Thu, October 24, 2013 at 16:49 (+0200), Wang Shilong wrote: Hello Jan, btrfs_dec_ref() queued a delayed ref for owner of a tree block. The qgroup tracking is based on delayed refs. The owner of a tree block is set when a tree block is allocated, it is never updated. When you allocate a

Re: [PATCH] Btrfs: fix negative qgroup tracking from owner accounting (bug #61951)

2013-11-01 Thread Jan Schmidt
(cc Arne) On Thu, October 24, 2013 at 16:49 (+0200), Wang Shilong wrote: Hello Jan, btrfs_dec_ref() queued a delayed ref for owner of a tree block. The qgroup tracking is based on delayed refs. The owner of a tree block is set when a tree block is allocated, it is never updated. When you

Re: [PATCH] Btrfs: fix negative qgroup tracking from owner accounting (bug #61951)

2013-11-01 Thread Jan Schmidt
delayed refs for the root being removed. This fixes the qgroup accounting. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net Tested-by: dustym...@gmail.com --- fs/btrfs/extent-tree.c | 14 +- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/extent-tree.c

Re: btrfs send/receive do not keep inode ctimes

2013-11-01 Thread Jan Schmidt
Hi Karl, On Fri, October 25, 2013 at 15:12 (+0200), Karl Kiniger wrote: is there low level support to change inode ctimes somehow? (on ext[234] it can be done using debugfs) No. It would be nice to make received snapshots as similar as possible to their send source. (I am not talking about

Re: [PATCH] Btrfs: fix negative qgroup tracking from owner accounting (bug #61951)

2013-11-06 Thread Jan Schmidt
On Mon, November 04, 2013 at 18:42 (+0100), Josef Bacik wrote: On Thu, Oct 24, 2013 at 03:22:06PM +0200, Jan Schmidt wrote: btrfs_dec_ref() queued a delayed ref for owner of a tree block. The qgroup tracking is based on delayed refs. The owner of a tree block is set when a tree block

<    1   2   3   4   5   6