[PATCH v2] btrfs-progs: qgroup: remove outdated comment

2021-03-23 Thread Sidong Yang
This comment was written in fb124ee4. In this version, parse_group_id() didn't support to parse path. but this function already can parse path. So, this comment is outdated and it makes confusing now. Signed-off-by: Sidong Yang Reviewed-by: Qu Wenruo --- v2: Add detailed changelog ---

Re: [PATCH] btrfs-progs: qgroup: remove outdated comment

2021-03-23 Thread Sidong Yang
On Tue, Mar 23, 2021 at 03:48:16PM +0100, David Sterba wrote: > On Mon, Mar 22, 2021 at 02:03:16PM +0000, Sidong Yang wrote: > > This comment is outdated and this patch remove > > it to avoid confusion. > > Even if it's just a comment removal, changelog should say why

[PATCH] btrfs: qgroup: reuse btrfs_qgroup* in add_qgroup_relation

2021-03-22 Thread Sidong Yang
ipped if we reuse the pointer get before. This patch adds add_relation_rb_qgroup() that receive btrfs_qgroup pointer but id. and replace add_relation_rb() to new helper function. Signed-off-by: Sidong Yang --- fs/btrfs/qgroup.c | 23 ++- 1 file changed, 22 insertions(+), 1 del

[PATCH] btrfs-progs: qgroup: remove outdated comment

2021-03-22 Thread Sidong Yang
This comment is outdated and this patch remove it to avoid confusion. Signed-off-by: Sidong Yang --- cmds/qgroup.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/cmds/qgroup.c b/cmds/qgroup.c index 2da83ffd..b33f77fa 100644 --- a/cmds/qgroup.c +++ b/cmds/qgroup.c @@ -81,9 +81,6 @@ static

Simple question for comment in btrfs-progs qgroup code

2021-03-21 Thread Sidong Yang
Hello! I see an comment in qgroup cmds below. diff --git a/cmds/qgroup.c b/cmds/qgroup.c index 2da83ffd..a71089e9 100644 --- a/cmds/qgroup.c +++ b/cmds/qgroup.c @@ -84,6 +84,7 @@ static int _cmd_qgroup_assign(const struct cmd_struct *cmd, int assign, /* * FIXME src should accept s

[PATCH v3] btrfs-progs: common: make sure that qgroup id is in range

2021-03-19 Thread Sidong Yang
2^16-1]. Signed-off-by: Sidong Yang --- v2: Use btrfs_qgroup_level() for checking v3: Add checks for qgroup level --- common/utils.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/common/utils.c b/common/utils.c index 57e41432..69fa6096 100644 --- a/c

[PATCH] btrfs-progs: common: make sure that qgroup id is in range

2021-03-19 Thread Sidong Yang
2^16-1]. Signed-off-by: Sidong Yang -- v2: Use btrfs_qgroup_level() for checking v3: Add checks for qgroup level --- common/utils.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/common/utils.c b/common/utils.c index 57e41432..69fa6096 100644 --- a/c

Re: [PATCH v2] btrfs-progs: common: make sure that qgroup id is in range

2021-03-19 Thread Sidong Yang
On Thu, Mar 18, 2021 at 09:34:14PM +0100, David Sterba wrote: > On Thu, Mar 18, 2021 at 02:22:20AM +0000, Sidong Yang wrote: > > On Wed, Mar 17, 2021 at 07:36:47PM +0100, David Sterba wrote: > > > On Tue, Mar 16, 2021 at 01:27:46PM +, Sidong Yang wrote: > > > >

Re: [PATCH v2] btrfs-progs: common: make sure that qgroup id is in range

2021-03-17 Thread Sidong Yang
On Wed, Mar 17, 2021 at 07:36:47PM +0100, David Sterba wrote: > On Tue, Mar 16, 2021 at 01:27:46PM +0000, Sidong Yang wrote: > > When user assign qgroup with qgroup id that is too big to exceeds > > range and invade level value, and it works without any error. but > > this

[PATCH v2] btrfs-progs: common: make sure that qgroup id is in range

2021-03-16 Thread Sidong Yang
When user assign qgroup with qgroup id that is too big to exceeds range and invade level value, and it works without any error. but this action would be make undefined error. this code make sure that qgroup id doesn't exceed range(0 ~ 2^48-1). Signed-off-by: Sidong Yang --- v2:

Re: [PATCH] btrfs-progs: common: make sure that qgroup id is in range

2021-03-16 Thread Sidong Yang
On Tue, Mar 16, 2021 at 01:44:33PM +0800, Qu Wenruo wrote: > > > On 2021/3/15 下午11:56, Sidong Yang wrote: > > When user assign qgroup with qgroup id that is too big to exceeds > > range and invade level value, and it works without any error. but > > this action wo

[PATCH] btrfs-progs: common: make sure that qgroup id is in range

2021-03-15 Thread Sidong Yang
When user assign qgroup with qgroup id that is too big to exceeds range and invade level value, and it works without any error. but this action would be make undefined error. this code make sure that qgroup id doesn't exceed range(0 ~ 2^48-1). Signed-off-by: Sidong Yang --- common/utils.

Re: [PATCH] btrfs-progs: docs: add seeding device section for btrfs-man5

2021-03-03 Thread Sidong Yang
On Mon, Mar 01, 2021 at 09:57:47PM +0100, David Sterba wrote: > On Sun, Feb 14, 2021 at 05:17:38PM +0000, Sidong Yang wrote: > > This patch adds a section about seeding device for btrfs-man5. > > Description and examples are from btrfs-wiki page. > > Sorry, but the contents

Re: btrfs-progs test error on fsck/012-leaf-corruption

2021-02-21 Thread Sidong Yang
On Fri, Feb 19, 2021 at 05:17:07PM +0100, David Sterba wrote: > On Thu, Feb 18, 2021 at 02:56:14AM +0000, Sidong Yang wrote: > > I found some error when I run unittest code in btrfs-progs. > > fsck/012-leaf-corruption test corrupt leaf and check that it's recovered. > > b

Re: [RFC] btrfs-progs: format-output: remove newline in fmt_end text mode

2021-02-20 Thread Sidong Yang
On Fri, Feb 19, 2021 at 10:56:11PM +0100, David Sterba wrote: > On Tue, Feb 16, 2021 at 04:28:40PM +0000, Sidong Yang wrote: > > Remove a code that inserting new line in fmt_end() for text mode. > > Old code made a failure in fstest btrfs/006. > > > > Signed-off-by:

[PATCH v4] btrfs-progs: filesystem-resize: make output more readable

2021-02-20 Thread Sidong Yang
This patch make output of filesystem-resize command more readable and give detail information for users. This patch provides more information about filesystem like below. Before: Resize '/mnt' of '1:-1G' After: Resize device id 1 (/dev/vdb) from 4.00GiB to 3.00GiB Signed

Re: [PATCH v3] btrfs-progs: filesystem-resize: make output more readable

2021-02-20 Thread Sidong Yang
On Fri, Feb 19, 2021 at 07:11:49PM +0100, David Sterba wrote: > On Fri, Feb 19, 2021 at 05:18:18PM +0000, Sidong Yang wrote: > > This patch make output of filesystem-resize command more readable and > > give detail information for users. This patch provides more information >

[PATCH v3] btrfs-progs: filesystem-resize: make output more readable

2021-02-19 Thread Sidong Yang
This patch make output of filesystem-resize command more readable and give detail information for users. This patch provides more information about filesystem like below. Before: Resize '/mnt' of '1:-1G' After: Resize device id 1 (/dev/vdb) from 4.00GiB to 3.00GiB Signed

btrfs-progs test error on fsck/012-leaf-corruption

2021-02-17 Thread Sidong Yang
Hi! I found some error when I run unittest code in btrfs-progs. fsck/012-leaf-corruption test corrupt leaf and check that it's recovered. but the test was failed and demsg below [ 47.284095] BTRFS error (device loop5): device total_bytes should be at most 27660288 but found 67108864 [ 47.284

[RFC] btrfs-progs: format-output: remove newline in fmt_end text mode

2021-02-16 Thread Sidong Yang
Remove a code that inserting new line in fmt_end() for text mode. Old code made a failure in fstest btrfs/006. Signed-off-by: Sidong Yang --- Hi, I've just read mail that Filipe written that some failure about fstest. I'm worried about this patch makes other problem. So make it R

[PATCH] btrfs-progs: docs: add seeding device section for btrfs-man5

2021-02-14 Thread Sidong Yang
This patch adds a section about seeding device for btrfs-man5. Description and examples are from btrfs-wiki page. Signed-off-by: Sidong Yang --- Documentation/btrfs-man5.asciidoc | 74 +++ 1 file changed, 74 insertions(+) diff --git a/Documentation/btrfs-man5

Re: [PATCH 1/2] btrfs-progs: corrupt generic item data with btrfs-corrupt-block

2021-02-08 Thread Sidong Yang
On Thu, Feb 04, 2021 at 12:09:31PM -0800, Boris Burkov wrote: Hi Boris, I have a question for this code. > btrfs-corrupt-block already has a mix of generic and specific corruption > options, but currently lacks the capacity for totally arbitrary > corruption in item data. > > There is already a

[PATCH v2] btrfs-progs: filesystem-resize: make output more readable

2021-01-23 Thread Sidong Yang
This patch make output of filesystem-resize command more readable and give detail information for users. This patch provides more information about filesystem like below. Before: Resize '/mnt' of '1:-1G' After: Resize device id 1 (/dev/vdb) from 4.00GiB to 3.00GiB Signed

Re: [PATCH] btrfs-progs: filesystem-resize: make output more readable

2021-01-20 Thread Sidong Yang
On Fri, Jan 15, 2021 at 12:48:59AM +0100, David Sterba wrote: Hi David, Thanks fore review. > On Wed, Dec 16, 2020 at 03:42:40AM +0000, Sidong Yang wrote: > > This patch make output of filesystem-resize command more readable and > > give detail information for users. This patc

Re: [PATCH v3 2/2] btrfs-progs: device stats: add json output format

2020-12-16 Thread Sidong Yang
On Wed, Dec 16, 2020 at 02:30:04PM +0800, Su Yue wrote: > On Sat, Dec 12, 2020 at 3:04 AM David Sterba wrote: > > > > On Fri, Dec 11, 2020 at 06:30:25PM +0100, David Sterba wrote: > > > On Fri, Dec 11, 2020 at 04:48:12PM +, Sidong Yang wrote: >

[PATCH] btrfs-progs: filesystem-resize: make output more readable

2020-12-15 Thread Sidong Yang
This patch make output of filesystem-resize command more readable and give detail information for users. This patch provides more information about filesystem like below. Before: Resize '/mnt' of '1:-1G' After: Resize device id 1 (/dev/vdb) from 4.00GiB to 3.00GiB Signed