Re: btrfs: qgroup: account shared subtrees during snapshot delete

2015-02-06 Thread Mark Fasheh
On Sun, Feb 01, 2015 at 11:51:19PM +0300, Dan Carpenter wrote: Hello Mark Fasheh, The patch 1152651a0817: btrfs: qgroup: account shared subtrees during snapshot delete from Jul 17, 2014, leads to the following static checker warning: What checker are you using? fs/btrfs/extent

re: btrfs: qgroup: account shared subtrees during snapshot delete

2015-02-01 Thread Dan Carpenter
Hello Mark Fasheh, The patch 1152651a0817: btrfs: qgroup: account shared subtrees during snapshot delete from Jul 17, 2014, leads to the following static checker warning: fs/btrfs/extent-tree.c:7642 account_shared_subtree() error: off-by-one overflow 'path-nodes' size 8. index

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

2014-08-12 Thread Mark Fasheh
On Tue, Aug 12, 2014 at 02:22:31PM -0400, Chris Mason wrote: On 07/17/2014 03:39 PM, Mark Fasheh wrote: 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

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

2014-08-12 Thread Chris Mason
On 07/17/2014 03:39 PM, Mark Fasheh wrote: 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

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

2014-08-12 Thread Mark Fasheh
On Tue, Aug 12, 2014 at 02:36:17PM -0400, Chris Mason wrote: On 08/12/2014 02:32 PM, Mark Fasheh wrote: On Tue, Aug 12, 2014 at 02:22:31PM -0400, Chris Mason wrote: On 07/17/2014 03:39 PM, Mark Fasheh wrote: During its tree walk, btrfs_drop_snapshot() will skip any shared subtrees

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

2014-08-12 Thread Chris Mason
On 08/12/2014 03:01 PM, Mark Fasheh wrote: On Tue, Aug 12, 2014 at 02:36:17PM -0400, Chris Mason wrote: On 08/12/2014 02:32 PM, Mark Fasheh wrote: On Tue, Aug 12, 2014 at 02:22:31PM -0400, Chris Mason wrote: On 07/17/2014 03:39 PM, Mark Fasheh wrote: During its tree walk,

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

2014-07-17 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

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

2014-07-15 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

btrfs: qgroup: account shared subtrees during snapshot delete

2014-07-07 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

[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: btrfs: qgroup: account shared subtrees during snapshot delete

2014-06-23 Thread David Sterba
On Fri, Jun 20, 2014 at 08:29:58AM -0700, Mark Fasheh wrote: +static int account_shared_subtree(struct btrfs_trans_handle *trans, + struct btrfs_root *root, + struct extent_buffer *root_eb, + u64

Re: btrfs: qgroup: account shared subtrees during snapshot delete

2014-06-20 Thread David Sterba
On Thu, Jun 19, 2014 at 04:17:25PM -0700, Josef Bacik wrote: We don't pay attention to the return value, we should probably abort the transaction if there is a problem. Abort or log an error and continue? I ask because technically we could continue with the subvolume drop but obviously

Re: btrfs: qgroup: account shared subtrees during snapshot delete

2014-06-20 Thread Mark Fasheh
that. Below is patch #2 with all review comments implemented. Thanks, Mark -- Mark Fasheh From: Mark Fasheh mfas...@suse.de btrfs: qgroup: account shared subtrees during snapshot delete During it's tree walk, btrfs_drop_snapshot() will skip any shared subtrees it encounters. This is incorrect when

Re: btrfs: qgroup: account shared subtrees during snapshot delete

2014-06-20 Thread Josef Bacik
On 06/20/2014 08:29 AM, Mark Fasheh wrote: On Fri, Jun 20, 2014 at 01:25:34PM +0200, David Sterba wrote: On Thu, Jun 19, 2014 at 04:17:25PM -0700, Josef Bacik wrote: We don't pay attention to the return value, we should probably abort the transaction if there is a problem. Abort or log an

btrfs: qgroup: account shared subtrees during snapshot delete

2014-06-19 Thread Mark Fasheh
During it's 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

Re: btrfs: qgroup: account shared subtrees during snapshot delete

2014-06-19 Thread Josef Bacik
On 06/19/2014 02:49 PM, Mark Fasheh wrote: During it's 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

Re: btrfs: qgroup: account shared subtrees during snapshot delete

2014-06-19 Thread Mark Fasheh
Thanks for the review Josef, I will implement everything you mentioned. I have one question below though: On Thu, Jun 19, 2014 at 03:25:12PM -0700, Josef Bacik wrote: On 06/19/2014 02:49 PM, Mark Fasheh wrote: diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 46f39bf..672d2a4

Re: btrfs: qgroup: account shared subtrees during snapshot delete

2014-06-19 Thread Josef Bacik
On 06/19/2014 04:16 PM, Mark Fasheh wrote: Thanks for the review Josef, I will implement everything you mentioned. I have one question below though: On Thu, Jun 19, 2014 at 03:25:12PM -0700, Josef Bacik wrote: On 06/19/2014 02:49 PM, Mark Fasheh wrote: diff --git a/fs/btrfs/extent-tree.c