[PATCH 1/4] Btrfs: use btrfs_get_fs_root in resolve_indirect_ref

2015-09-22 Thread Mark Fasheh
e able to search down the snapshot we are deleting, which will cause us to miss roots. So use btrfs_get_fs_root and send false for check_ref so we can always get the root we're looking for. Thanks, Signed-off-by: Josef Bacik <jba...@fb.com> Signed-off-by: Mark Fasheh <mfas...@suse.de

[PATCH 3/4] btrfs: Add qgroup tracing

2015-09-22 Thread Mark Fasheh
This patch adds tracepoints to the qgroup code on both the reporting side (insert_dirty_extents) and the accounting side. Taken together it allows us to see what qgroup operations have happened, and what their result was. Signed-off-by: Mark Fasheh <mfas...@suse.de> --- fs/btrfs/qg

[PATCH 2/4] Btrfs: keep dropped roots in cache until transaction commit, V2

2015-09-22 Thread Mark Fasheh
remove the roots at the same time it drops the commit roots. This will keep all of the backref searching code in sync properly, and fixes a problem Mark was seeing with snapshot delete and qgroups. Thanks, Signed-off-by: Josef Bacik <jba...@fb.com> Signed-off-by: Mark Fasheh <mfas...@s

[PATCH 0/4] btrfs: update qgroups in drop snapshot

2015-09-22 Thread Mark Fasheh
/b09ca51c012824e44546b13862ab1f93a6f2f675 Thanks, --Mark From: Mark Fasheh <mfas...@suse.de> [PATCH] btrfs: add test for quota groups and drop snapshot Test btrfs quota group consistency operations during snapshot delete. Btrfs has had long standing issues with drop snapshot failing to pr

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

2015-09-22 Thread Mark Fasheh
/inc functions so we don't have to add actions beyond what we had originally. Signed-off-by: Mark Fasheh <mfas...@suse.de> --- fs/btrfs/extent-tree.c | 41 ++--- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs

Re: [PATCH 0/4] btrfs: update qgroups in drop snapshot

2015-09-22 Thread Mark Fasheh
On Tue, Sep 22, 2015 at 01:15:44PM -0700, Mark Fasheh wrote: > The entire patch series can be tested with the following xfstests.git > patch, which will be sent to the appropriate list shortly) > > https://github.com/markfasheh/xfstests/commit/b09ca51c012824e44546b13862ab

Re: [PATCH] Btrfs: keep dropped roots in cache until transaciton commit

2015-09-11 Thread Mark Fasheh
for snapshot deletion. Indeed. My tests against a kernel with Josefs patches and my snapshot deletion code seem to be passing. I'll have something on the list shortly. Thanks, --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH RFC 00/14] Accurate qgroup reserve framework

2015-09-10 Thread Mark Fasheh
On Thu, Sep 10, 2015 at 10:33:02PM +0100, Filipe David Manana wrote: > On Thu, Sep 10, 2015 at 10:01 PM, Mark Fasheh <mfas...@suse.de> wrote: > > Hi Qu, > > > > On Tue, Sep 08, 2015 at 04:56:52PM +0800, Qu Wenruo wrote: > >> [[BUG]] > >> O

Re: [PATCH RFC 00/14] Accurate qgroup reserve framework

2015-09-10 Thread Mark Fasheh
k through a few of these, none of them have any trace_* functions, yet you're adding several new entrypoints to the qgroup code. Those are incredibly useful for debugging on live systems and in fact I've got a patch which reintroduces the ones you removed in your last patch series ;) This time around c

Re: Major qgroup regression in 4.2?

2015-08-21 Thread Mark Fasheh
+0800: Qu Wenruo wrote on 2015/08/18 09:42 +0800: Mark Fasheh wrote on 2015/08/17 14:13 -0700: Hi Qu, Firstly thanks for the response. I have a few new questions and comments below, On Mon, Aug 17, 2015 at 09:33:54AM +0800, Qu Wenruo wrote: Thanks for pointing out the problem

Re: Major qgroup regression in 4.2?

2015-08-17 Thread Mark Fasheh
qgroup is enabled and the snapshot to delete is above level 1(level starts from 0), then mark the QGROUP_INCONSISTENT flag to info user to do a rescan. This is exactly the kind of band-aid solution we wanted to avoid the first time qgroups and subvolume handling were fixed. --Mark -- Mark

Re: Major qgroup regression in 4.2?

2015-08-14 Thread Mark Fasheh
On Thu, Aug 13, 2015 at 04:13:08PM -0700, Mark Fasheh wrote: If there *is* a plan to make this all work again, can I please hear it? The comment mentions something about adding those nodes to a dirty_extent_root. Why wasn't that done? Ok so I had more time to look through the changes today

Major qgroup regression in 4.2?

2015-08-13 Thread Mark Fasheh
Hi I was looking at qgroups in linux 4.2 and noticed that the code to handle subvolume deletion was removed and replaced with a comment: /* * TODO: Modify related function to add related node/leaf to * dirty_extent_root, * for later qgroup accounting. * * Current, this function does nothing.

Re: Missing dedupe/locking patch in integration-4.2 tree?

2015-08-11 Thread Mark Fasheh
thanks for pointing that out Holger! --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Missing dedupe/locking patch in integration-4.2 tree?

2015-08-11 Thread Mark Fasheh
deal). --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2] Btrfs: fix memory leak in the extent_same ioctl

2015-07-06 Thread Mark Fasheh
Signed-off-by: Filipe Manana fdman...@suse.com Reviewed-by: Mark Fasheh mfas...@suse.de --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: running duperemove but no free space gain

2015-07-06 Thread Mark Fasheh
that but in your case almost everything will be reported shared. Btw, I have to leave my office now but will get to the rest of your e-mail later. -- Mark Fasheh -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo

Re: running duperemove but no free space gain

2015-07-06 Thread Mark Fasheh
against any other extent. For duperemove to discover it though you have to provide it a path which will eventually resolve to those extents (that is, duperemove has to find it in the file scan stage). --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH] Btrfs: fix memory leak in the extent_same ioctl

2015-07-03 Thread Mark Fasheh
Manana fdman...@suse.com Reviewed-by: Mark Fasheh mfas...@suse.de --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 2/5] btrfs: fix deadlock with extent-same and readpage

2015-06-30 Thread Mark Fasheh
and btrfs_cmp_data_free() to clean up our context. Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: David Sterba dste...@suse.cz --- fs/btrfs/ioctl.c | 148 +++ 1 file changed, 117 insertions(+), 31 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs

[PATCH 3/5] btrfs: fix clone / extent-same deadlocks

2015-06-30 Thread Mark Fasheh
, removing a case (both inodes being the same) which was poorly accounted for and never actually used by the callers. Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: David Sterba dste...@suse.cz --- fs/btrfs/ioctl.c | 34 -- 1 file changed, 8 insertions(+), 26

[PATCH 1/5] btrfs: pass unaligned length to btrfs_cmp_data()

2015-06-30 Thread Mark Fasheh
In the case that we dedupe the tail of a file, we might expand the dedupe len out to the end of our last block. We don't want to compare data past i_size however, so pass the original length to btrfs_cmp_data(). Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: David Sterba dste...@suse.cz

[PATCH 4/5] btrfs: allow dedupe of same inode

2015-06-30 Thread Mark Fasheh
clone() supports cloning within an inode so extent-same can do the same now. This patch fixes up the locking in extent-same to know about the single-inode case. In addition to that, we add a check for overlapping ranges, which clone does not allow. Signed-off-by: Mark Fasheh mfas...@suse.de

[PATCH 0/5] btrfs: dedupe fixes, features V5

2015-06-30 Thread Mark Fasheh
Hi Chris, The following patches are based on top of my patch titled btrfs: Handle unaligned length in extent_same which you have in your 'integration-4.2' branch: https://git.kernel.org/cgit/linux/kernel/git/mason/linux-btrfs.git/commit/?id=e1d227a42ea2b4664f94212bd1106b9a3413ffb8 The series

[PATCH 5/5] btrfs: don't update mtime/ctime on deduped inodes

2015-06-30 Thread Mark Fasheh
to the user. Clone still wants time changes, so we special case this in the code. This was tested with the btrfs-extent-same tool. Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/ioctl.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/fs/btrfs

Re: [PATCH 5/5] btrfs: don't update mtime on deduped inodes

2015-06-29 Thread Mark Fasheh
On Sat, Jun 27, 2015 at 05:44:28PM -0400, Zygo Blaxell wrote: On Fri, Jun 26, 2015 at 02:01:01PM -0700, Mark Fasheh wrote: One issue users have reported is that dedupe changes mtime on files, resulting in tools like rsync thinking that their contents have changed when in fact the data

Re: [PATCH 5/5] btrfs: don't update mtime on deduped inodes

2015-06-29 Thread Mark Fasheh
On Mon, Jun 29, 2015 at 03:35:02PM -0400, Zygo Blaxell wrote: On Mon, Jun 29, 2015 at 10:52:41AM -0700, Mark Fasheh wrote: On Sat, Jun 27, 2015 at 05:44:28PM -0400, Zygo Blaxell wrote: On Fri, Jun 26, 2015 at 02:01:01PM -0700, Mark Fasheh wrote: One issue users have reported

[PATCH 5/5] btrfs: don't update mtime on deduped inodes

2015-06-26 Thread Mark Fasheh
-same tool. Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/ioctl.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 83f4679..0af0f13 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -87,7 +87,8

[PATCH 2/5] btrfs: fix deadlock with extent-same and readpage

2015-06-26 Thread Mark Fasheh
and btrfs_cmp_data_free() to clean up our context. Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: David Sterba dste...@suse.cz --- fs/btrfs/ioctl.c | 148 +++ 1 file changed, 117 insertions(+), 31 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs

[PATCH 4/5] btrfs: allow dedupe of same inode

2015-06-26 Thread Mark Fasheh
clone() supports cloning within an inode so extent-same can do the same now. This patch fixes up the locking in extent-same to know about the single-inode case. In addition to that, we add a check for overlapping ranges, which clone does not allow. Signed-off-by: Mark Fasheh mfas...@suse.de

[PATCH 0/5] btrfs: dedupe fixes, features V4

2015-06-26 Thread Mark Fasheh
Hi Chris, The following patches are based on top of my patch titled btrfs: Handle unaligned length in extent_same which you have in your 'integration-4.2' branch: https://git.kernel.org/cgit/linux/kernel/git/mason/linux-btrfs.git/commit/?id=e1d227a42ea2b4664f94212bd1106b9a3413ffb8 The series

[PATCH 1/5] btrfs: pass unaligned length to btrfs_cmp_data()

2015-06-26 Thread Mark Fasheh
In the case that we dedupe the tail of a file, we might expand the dedupe len out to the end of our last block. We don't want to compare data past i_size however, so pass the original length to btrfs_cmp_data(). Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: David Sterba dste...@suse.cz

[PATCH 3/5] btrfs: fix clone / extent-same deadlocks

2015-06-26 Thread Mark Fasheh
, removing a case (both inodes being the same) which was poorly accounted for and never actually used by the callers. Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: David Sterba dste...@suse.cz --- fs/btrfs/ioctl.c | 34 -- 1 file changed, 8 insertions(+), 26

Re: [PATCH 5/5] btrfs: add no_mtime flag to btrfs-extent-same

2015-06-25 Thread Mark Fasheh
of content change. Why do we need the flag at all? Good point, I don't see the usecase for updating MTIME. Yeah there isn't one and I doubt anyone will be upset if we just always ignore the mtime update. I'll send some new patches shortly. Thanks for the suggestion Zygo. --Mark -- Mark

Re: [PATCH 5/5] btrfs: add no_mtime flag to btrfs-extent-same

2015-06-23 Thread Mark Fasheh
On Tue, Jun 23, 2015 at 05:11:56PM +0200, David Sterba wrote: On Mon, Jun 22, 2015 at 03:47:42PM -0700, Mark Fasheh wrote: --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -87,7 +87,8 @@ struct btrfs_ioctl_received_subvol_args_32 { static int btrfs_clone(struct inode *src, struct

[PATCH 4/5] btrfs: allow dedupe of same inode

2015-06-23 Thread Mark Fasheh
clone() supports cloning within an inode so extent-same can do the same now. This patch fixes up the locking in extent-same to know about the single-inode case. In addition to that, we add a check for overlapping ranges, which clone does not allow. Signed-off-by: Mark Fasheh mfas...@suse.de

[PATCH 5/5] btrfs: add no_mtime flag to btrfs-extent-same

2015-06-23 Thread Mark Fasheh
the BTRFS_SAME_NO_MTIME flag to a dedupe request and the kernel will honor it by only changing ctime. I have an updated version of the btrfs-extent-same test program with a switch to provide this flag at the 'no_time' branch of: https://github.com/markfasheh/duperemove/ Signed-off-by: Mark Fasheh

[PATCH 2/5] btrfs: fix deadlock with extent-same and readpage

2015-06-23 Thread Mark Fasheh
and btrfs_cmp_data_free() to clean up our context. Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: David Sterba dste...@suse.cz --- fs/btrfs/ioctl.c | 148 +++ 1 file changed, 117 insertions(+), 31 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs

[PATCH 1/5] btrfs: pass unaligned length to btrfs_cmp_data()

2015-06-23 Thread Mark Fasheh
In the case that we dedupe the tail of a file, we might expand the dedupe len out to the end of our last block. We don't want to compare data past i_size however, so pass the original length to btrfs_cmp_data(). Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: David Sterba dste...@suse.cz

[PATCH 3/5] btrfs: fix clone / extent-same deadlocks

2015-06-23 Thread Mark Fasheh
, removing a case (both inodes being the same) which was poorly accounted for and never actually used by the callers. Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: David Sterba dste...@suse.cz --- fs/btrfs/ioctl.c | 34 -- 1 file changed, 8 insertions(+), 26

[PATCH 0/5] btrfs: dedupe fixes, features V3

2015-06-23 Thread Mark Fasheh
Hi Chris, The following patches are based on top of my patch titled btrfs: Handle unaligned length in extent_same which you have in your 'integration-4.2' branch: https://git.kernel.org/cgit/linux/kernel/git/mason/linux-btrfs.git/commit/?id=e1d227a42ea2b4664f94212bd1106b9a3413ffb8 The series

[PATCH 0/5] btrfs: dedupe fixes, features V2

2015-06-22 Thread Mark Fasheh
Hi Chris, The following patches are based on top of my patch titled btrfs: Handle unaligned length in extent_same which you have in your 'integration-4.2' branch: https://git.kernel.org/cgit/linux/kernel/git/mason/linux-btrfs.git/commit/?id=e1d227a42ea2b4664f94212bd1106b9a3413ffb8 I sent

[PATCH 2/5] btrfs: fix deadlock with extent-same and readpage

2015-06-22 Thread Mark Fasheh
and btrfs_cmp_data_free() to clean up our context. Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: David Sterba dste...@suse.cz --- fs/btrfs/ioctl.c | 148 +++ 1 file changed, 117 insertions(+), 31 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs

[PATCH 3/5] btrfs: fix clone / extent-same deadlocks

2015-06-22 Thread Mark Fasheh
, removing a case (both inodes being the same) which was poorly accounted for and never actually used by the callers. Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/ioctl.c | 34 -- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/fs/btrfs/ioctl.c

[PATCH 1/5] btrfs: pass unaligned length to btrfs_cmp_data()

2015-06-22 Thread Mark Fasheh
In the case that we dedupe the tail of a file, we might expand the dedupe len out to the end of our last block. We don't want to compare data past i_size however, so pass the original length to btrfs_cmp_data(). Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: David Sterba dste...@suse.cz

[PATCH 5/5] btrfs: add no_mtime flag to btrfs-extent-same

2015-06-22 Thread Mark Fasheh
the BTRFS_SAME_NO_MTIME flag to a dedupe request and the kernel will honor it by only changing ctime. I have an updated version of the btrfs-extent-same test program with a switch to provide this flag at the 'no_time' branch of: https://github.com/markfasheh/duperemove/ Signed-off-by: Mark Fasheh

[PATCH 4/5] btrfs: allow dedupe of same inode

2015-06-22 Thread Mark Fasheh
clone() supports cloning within an inode so extent-same can do the same now. This patch fixes up the locking in extent-same to know about the single-inode case. In addition to that, we add a check for overlapping ranges, which clone does not allow. Signed-off-by: Mark Fasheh mfas...@suse.de

Re: [PATCH 2/2] btrfs: fix deadlock with extent-same and readpage

2015-06-19 Thread Mark Fasheh
On Fri, Jun 19, 2015 at 05:47:53PM +0200, David Sterba wrote: On Thu, Jun 18, 2015 at 02:10:03PM -0700, Mark Fasheh wrote: So I split btrfs_cmp_data() into 3 parts with a small context structure that is passed between them. The first, btrfs_cmp_data_prepare() gathers up the pages needed

[PATCH 2/2] btrfs: fix deadlock with extent-same and readpage

2015-06-18 Thread Mark Fasheh
and btrfs_cmp_data_free() to clean up our context. Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/ioctl.c | 148 +++ 1 file changed, 117 insertions(+), 31 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 2deea1f..b899584

[PATCH 1/2] btrfs: pass unaligned length to btrfs_cmp_data()

2015-06-18 Thread Mark Fasheh
In the case that we dedupe the tail of a file, we might expand the dedupe len out to the end of our last block. We don't want to compare data past i_size however, so pass the original length to btrfs_cmp_data(). Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/ioctl.c | 3 ++- 1 file

[PATCH 0/2] btrfs: two more dedupe fixes

2015-06-18 Thread Mark Fasheh
Hi Chris, The following fixes are based on top of my patch titled btrfs: Handle unaligned length in extent_same which you have in your 'integration-4.2' branch: https://git.kernel.org/cgit/linux/kernel/git/mason/linux-btrfs.git/commit/?id=e1d227a42ea2b4664f94212bd1106b9a3413ffb8 The first

Re: [RESEND][PATCH] btrfs: Align EOF length to block in extent_same

2015-06-12 Thread Mark Fasheh
mine in there if it's easiest or take Matt's if you like it better. Both were tested the same way on my end too. Thanks Chris. --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo

[RESEND][PATCH] btrfs: Align EOF length to block in extent_same

2015-06-10 Thread Mark Fasheh
to the file lengths and would be internally extended to the end of the block (1,015,808), allowing one set of extents to be shared completely between the full length of both files. Signed-off-by: Matt Robinson g...@nerdoftheherd.com Reviewed-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/ioctl.c | 21

[PATCH] btrfs: Handle unaligned length in extent_same

2015-06-08 Thread Mark Fasheh
of these behaviors winds up giving us worst-case dedupe on many files. We can fix this by allowing a length that extents to i_size and internally aligining those to the end of the block. This is what btrfs_ioctl_clone() so we can just copy that check over. Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs

Re: [PATCH] btrfs: Handle unaligned length in extent_same

2015-06-08 Thread Mark Fasheh
On Mon, Jun 08, 2015 at 11:36:25PM +, Holger Hoffstätte wrote: On Mon, 08 Jun 2015 15:05:25 -0700, Mark Fasheh wrote: The extent-same code rejects requests with an unaligned length. This poses a problem when we want to dedupe the tail extent of files as we skip cloning the portion

[PATCH][RFC] btrfs-progs: add 'du' command

2015-04-23 Thread Mark Fasheh
Attached to this e-mail is a single patch version of the change. Comments/feedback appreciated. Signed-off-by: Mark Fasheh mfas...@suse.de diff --git a/Makefile.in b/Makefile.in index 83927e4..6095b6e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -40,7 +40,7 @@ cmds_objects = cmds-subvolume.o

Re: [PATCH] btrfs: clear 'ret' in btrfs_check_shared() loop

2015-04-21 Thread Mark Fasheh
On Tue, Apr 21, 2015 at 08:49:08PM -0400, Chris Mason wrote: On 04/21/2015 05:47 PM, Mark Fasheh wrote: btrfs_check_shared() is leaking a return value of '1' from find_parent_nodes(). As a result, callers (in this case, extent_fiemap()) are told extents are shared when

[PATCH] btrfs: clear 'ret' in btrfs_check_shared() loop

2015-04-21 Thread Mark Fasheh
who might come across them. Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/backref.c | 17 + 1 file changed, 17 insertions(+) diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index f55721f..8d47380 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -880,6

Re: btrfs dedup - available or experimental? Or yet to be?

2015-03-27 Thread Mark Fasheh
features and bug fixing before I'm ready to call it stable. Does it work across subvolumes? (Presumably not...) Yep it will dedupe across subvolumes for you! --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord

Re: btrfs dedup - available or experimental? Or yet to be?

2015-03-27 Thread Mark Fasheh
but other things have kept me busy). But anyway that should help with the lack of intelligence on what files to scan. --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info

Re: rsync vs. extent-same: this time with lock debugging (still v3.18.8)

2015-03-19 Thread Mark Fasheh
correctly. --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 3/3] btrfs: qgroup: fix a wrong parameter of no_quota.

2015-03-03 Thread Mark Fasheh
bunch of work. Thanks, Agreed, reverting these would re-introduce far more problems than it would solve. --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http

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: Kernel crash during btrfs device delete on raid6 volume

2014-11-04 Thread Mark Fasheh
Fasheh mfas...@suse.de if you like, thanks. --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] btrfs: don't go readonly on existing qgroup items

2014-08-18 Thread Mark Fasheh
in add_qgroup_item() and initializing the existing items. We have the problem of orphaned relation items being on disk from an old snapshot but that is outside the scope of this patch. Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/qgroup.c | 10 -- 1 file changed, 8 insertions(+), 2

Re: [PATCH] btrfs: fix leak in qgroup_subtree_accounting() error path

2014-08-18 Thread Mark Fasheh
. If btrfs_find_all_roots() returns an error, we need to free up all allocations before we return. roots is initialized to NULL, so it should be safe to free it unconditionally (ulist_free() handles that case). Great, thanks for this Eric. Reviewed-by: Mark Fasheh mfas...@suse.de -- Mark Fasheh

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 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: Btrfs offline deduplication

2014-08-01 Thread Mark Fasheh
software itself inside the kernel is exactly what we want to avoid by having the dedupe ioctl in the first place. --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: Btrfs offline deduplication

2014-08-01 Thread Mark Fasheh
itself inside the kernel is exactly what we want to avoid by having the dedupe ioctl in the first place. --Mark -- Mark Fasheh Based on the same logic however, we don't need scrub to be done kernel side, as it wouldn't take but one more ioctl to be able to tell it which block out

[PATCH 5/5] btrfs: correctly handle return from ulist_add

2014-07-17 Thread Mark Fasheh
ulist_add() can return '1' on sucess, which qgroup_subtree_accounting() doesn't take into account. As a result, that value can be bubbled up to callers, causing an error to be printed. Fix this by only returning the value of ulist_add() when it indicates an error. Signed-off-by: Mark Fasheh mfas

[PATCH 4/5] btrfs: delete qgroup items in drop_snapshot

2014-07-17 Thread Mark Fasheh
that some relation items persist, they will not affect functioning of our level 0 subvolume qgroup. Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/extent-tree.c | 6 +++ fs/btrfs/qgroup.c | 114 +++-- fs/btrfs/qgroup.h | 3 ++ 3 files

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

2014-07-17 Thread Mark Fasheh
for btrfs_dec/inc_ref, so just drop the argument and make __btrfs_mod_ref call it's process function with no_quota set always. Thanks, Signed-off-by: Josef Bacik jba...@fb.com Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/ctree.c | 20 ++-- fs/btrfs/ctree.h

[PATCH 0/5] btrfs: qgroup fixes for btrfs_drop_snapshot V5

2014-07-17 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. We also have a bug where qgroup

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

2014-07-17 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/5] btrfs: qgroup: account shared subtrees during snapshot delete

2014-07-17 Thread Mark Fasheh
is encountered during qgroup accounting, we search for any root references to that extent and in the case that we find only one reference left, we go ahead and do the math on it's exclusive counts. Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: Josef Bacik jba...@fb.com --- fs/btrfs

[PATCH 0/4] btrfs: qgroup fixes for btrfs_drop_snapshot V4

2014-07-15 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. We also have a bug where qgroup

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

2014-07-15 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/4] btrfs: qgroup: account shared subtrees during snapshot delete

2014-07-15 Thread Mark Fasheh
is encountered during qgroup accounting, we search for any root references to that extent and in the case that we find only one reference left, we go ahead and do the math on it's exclusive counts. Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: Josef Bacik jba...@fb.com --- fs/btrfs

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

2014-07-15 Thread Mark Fasheh
for btrfs_dec/inc_ref, so just drop the argument and make __btrfs_mod_ref call it's process function with no_quota set always. Thanks, Signed-off-by: Josef Bacik jba...@fb.com Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/ctree.c | 20 ++-- fs/btrfs/ctree.h

[PATCH 4/4] btrfs: delete qgroup items in drop_snapshot

2014-07-15 Thread Mark Fasheh
that some relation items persist, they will not affect functioning of our level 0 subvolume qgroup. Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/extent-tree.c | 6 +++ fs/btrfs/qgroup.c | 114 +++-- fs/btrfs/qgroup.h | 3 ++ 3 files

Re: [PATCH] xfstests/btrfs: add test for quota groups and drop snapshot

2014-07-10 Thread Mark Fasheh
the previous sleep I don't think this can be reduced by much :( --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] xfstests/btrfs: add test for quota groups and drop snapshot

2014-07-10 Thread Mark Fasheh
On Thu, Jul 10, 2014 at 11:32:28AM -0700, Zach Brown wrote: On Thu, Jul 10, 2014 at 10:36:14AM -0700, Mark Fasheh wrote: On Thu, Jul 10, 2014 at 10:43:30AM +1000, Dave Chinner wrote: On Wed, Jul 09, 2014 at 03:41:50PM -0700, Mark Fasheh wrote: + +# Enable qgroups now that we have our

Re: [PATCH] xfstests/btrfs: add test for quota groups and drop snapshot

2014-07-10 Thread Mark Fasheh
On Thu, Jul 10, 2014 at 12:05:05PM -0700, Zach Brown wrote: On Thu, Jul 10, 2014 at 12:00:55PM -0700, Mark Fasheh wrote: On Thu, Jul 10, 2014 at 11:32:28AM -0700, Zach Brown wrote: On Thu, Jul 10, 2014 at 10:36:14AM -0700, Mark Fasheh wrote: On Thu, Jul 10, 2014 at 10:43:30AM +1000, Dave

[PATCH] xfstests/btrfs: add test for quota groups and drop snapshot

2014-07-09 Thread Mark Fasheh
://github.com/markfasheh/xfstests-patches/tree/qgroup-drop-snapshot Signed-off-by: Mark Fasheh mfas...@suse.de --- tests/btrfs/057 | 117 tests/btrfs/057.out | 7 tests/btrfs/group | 1 + 3 files changed, 125 insertions(+) create mode

[PATCH] btrfs-progs: ignore orphaned qgroups by default

2014-07-08 Thread Mark Fasheh
it depends on (to do qgroup verification) can be found at: https://github.com/markfasheh/btrfs-progs-patches/tree/qgroup-verify Signed-off-by: Mark Fasheh mfas...@suse.de --- qgroup-verify.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/qgroup-verify.c b

btrfs: add trace for qgroup accounting

2014-07-07 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 0/3] btrfs: qgroup fixes for btrfs_drop_snapshot V3

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

btrfs: qgroup: account shared subtrees during snapshot delete

2014-07-07 Thread Mark Fasheh
is encountered during qgroup accounting, we search for any root references to that extent and in the case that we find only one reference left, we go ahead and do the math on it's exclusive counts. Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: Josef Bacik jba...@fb.com --- fs/btrfs

[PATCH] Btrfs: __btrfs_mod_ref should always use no_quota

2014-07-07 Thread Mark Fasheh
for btrfs_dec/inc_ref, so just drop the argument and make __btrfs_mod_ref call it's process function with no_quota set always. Thanks, Signed-off-by: Josef Bacik jba...@fb.com Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/ctree.c | 20 ++-- fs/btrfs/ctree.h

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

2014-07-02 Thread Mark Fasheh
/markfasheh/btrfs-progs-patches/tree/qgroup-verify Please apply, Signed-off-by: Mark Fasheh mfas...@suse.de --- cmds-check.c| 12 + qgroup-verify.c | 81 ++--- qgroup-verify.h | 2 ++ 3 files changed, 92 insertions(+), 3 deletions(-) diff

[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
_always_ need to use no_quota for btrfs_dec/inc_ref, so just drop the argument and make __btrfs_mod_ref call it's process function with no_quota set always. Thanks, Signed-off-by: Josef Bacik jba...@fb.com Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/ctree.c | 20

[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
is encountered during qgroup accounting, we search for any root references to that extent and in the case that we find only one reference left, we go ahead and do the math on it's exclusive counts. Signed-off-by: Mark Fasheh mfas...@suse.de Reviewed-by: Josef Bacik jba...@fb.com --- fs/btrfs

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

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

2014-06-19 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

btrfs: add trace for qgroup accounting

2014-06-19 Thread Mark Fasheh
We want this to debug qgroup changes on live systems. Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/qgroup.c| 3 +++ fs/btrfs/super.c | 1 + include/trace/events/btrfs.h | 56 3 files changed, 60 insertions(+) diff

btrfs: qgroup: account shared subtrees during snapshot delete

2014-06-19 Thread Mark Fasheh
is encountered during qgroup accounting, we search for any root references to that extent and in the case that we find only one reference left, we go ahead and do the math on it's exclusive counts. Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/extent-tree.c | 234

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

<    1   2   3   4   5   >