[PATCH] Btrfs: cleanup unused run_most

2014-12-17 Thread Liu Bo
run_most is not used anymore. Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/extent-tree.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 222d6ae..4f54c30 100644 --- a/fs/btrfs/extent-tree.c +++

[PATCH v3] xfstests: btrfs: add test case for qgroup account on shared extents

2014-12-17 Thread Liu Bo
This is a regression test of 'commit fcebe4562dec (Btrfs: rework qgroup accounting)' It can produce qgroup related warnings. The fix is https://patchwork.kernel.org/patch/5499981/ Btrfs: fix a warning of qgroup account on shared extents Signed-off-by: Liu Bo bo.li@oracle.com Reviewed-by:

Re: [PATCH] Btrfs: cleanup unused run_most

2014-12-17 Thread Satoru Takeuchi
(2014/12/17 17:14), Liu Bo wrote: run_most is not used anymore. Signed-off-by: Liu Bo bo.li@oracle.com Reviewed-by: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com Thanks, Satoru --- fs/btrfs/extent-tree.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

Re: [PATCH v3] xfstests: btrfs: add test case for qgroup account on shared extents

2014-12-17 Thread Satoru Takeuchi
Hi Liu, (2014/12/17 17:30), Liu Bo wrote: This is a regression test of 'commit fcebe4562dec (Btrfs: rework qgroup accounting)' It can produce qgroup related warnings. The fix is https://patchwork.kernel.org/patch/5499981/ Btrfs: fix a warning of qgroup account on shared extents

Re: Quota limit question

2014-12-17 Thread Duncan
Christian Robottom Reis posted on Tue, 16 Dec 2014 23:15:37 -0200 as excerpted: # btrfs qgroup limit 2000m 0/261 . touch x touch: cannot touch ‘x’: Disk quota exceeded The strange thing is that it doesn't seem to be actually out of space: # btrfs qgroup show -p -r -e /var |

Re: Standards Problems [Was: [PATCH v2 1/3] Btrfs: get more accurate output in df command.]

2014-12-17 Thread Dongsheng Yang
On 12/17/2014 03:52 AM, Robert White wrote: On 12/16/2014 03:30 AM, Dongsheng Yang wrote: Hi Robert, thanx for your proposal about this. IMHO, output of df command shoud be more friendly to user. Well, I think we have a disagreement on this point, let's take a look at what the zfs is doing.

Re: btrfs-prog: improve build-system by autoconf

2014-12-17 Thread David Sterba
On Fri, Dec 12, 2014 at 01:35:14PM +0100, Karel Zak wrote: This is first step to make btrfs-progs build system more conventional for userspace users and developers. All is implemented by small incremental patches to keep things review-able. Thanks. I went through the patches and haven't found

Re: [RFC][BTRFS-PROGS] Improve output of mkfs.btrfs command

2014-12-17 Thread David Sterba
On Mon, Dec 15, 2014 at 09:02:53PM +0100, Goffredo Baroncelli wrote: enclosed a patches set to improve the output of mkfs.btrfs command. Currently I find the output of mkfs.btrfs command quite confusing: Thanks. I've marked the wiki://Project_ideas item as claimed. After my patches the

Re: [PATCH] BUG: use metadata_profile instead of data_profile

2014-12-17 Thread David Sterba
On Sat, Dec 13, 2014 at 01:05:51PM +0100, Goffredo Baroncelli wrote: The function test_num_disk_vs_raid() show an error message if the raid profile is incompatible with the number of devices. Unfortunately when the error is related to data profile, the message print the metadata profile.

Re: [RFC][BTRFS-PROGS] Improve output of mkfs.btrfs command

2014-12-17 Thread Holger Hoffstätte
On Mon, 15 Dec 2014 21:02:53 +0100, Goffredo Baroncelli wrote: enclosed a patches set to improve the output of mkfs.btrfs command. This is very nice! I do have a comment about the device list: .. UUID IDSIZEPATH

Re: [RFC] btrfs-progs: Support for musl libc (and perhaps also uclibc)

2014-12-17 Thread David Sterba
On Sat, Dec 13, 2014 at 03:35:09PM +0100, Merlijn Wajer wrote: [snip] Attached are the two patches generated with git format-patch. I am aware that this may not be required format for submitting patches -- but please give me some time to get used to the etiquette. :-) Thanks, there are minor

Re: [RFC] btrfs-progs: Support for musl libc (and perhaps also uclibc)

2014-12-17 Thread Austin S Hemmelgarn
On 2014-12-17 11:49, David Sterba wrote: On Sat, Dec 13, 2014 at 03:35:09PM +0100, Merlijn Wajer wrote: [snip] Please let me know if musl-libc (or any other libc) is a supported platform, and if so, if and how I can improve on said patches. I'm not aware of non-glibc users, but I don't see

Re: [PATCH 6/7] Print the summary

2014-12-17 Thread Goffredo Baroncelli
On 12/16/2014 02:58 AM, Duncan wrote: Goffredo Baroncelli posted on Mon, 15 Dec 2014 21:02:59 +0100 as excerpted: +printf( Total disks size: %10s\n, +pretty_size(total_block_count)); I really like this patch series. Makes mkfs.btrfs much nicer to

Fwd: Re: [RFC][BTRFS-PROGS] Improve output of mkfs.btrfs command

2014-12-17 Thread Goffredo Baroncelli
I forgoto to put in CC the mailing list Forwarded Message Subject: Re: [RFC][BTRFS-PROGS] Improve output of mkfs.btrfs command Date: Wed, 17 Dec 2014 19:57:25 +0100 From: Goffredo Baroncelli kreij...@inwind.it Reply-To: kreij...@inwind.it To: Holger Hoffstätte

Re: [RFC][BTRFS-PROGS] Improve output of mkfs.btrfs command

2014-12-17 Thread Goffredo Baroncelli
On 12/16/2014 04:23 AM, Satoru Takeuchi wrote: Hi Goffredo, [...] It removes Incompat from original message. I consider Backward Incompatible Feature is better. I consider, the word, incompatible, is very important for users. Right, another good catch. In addition, original version

[PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command

2014-12-17 Thread Goffredo Baroncelli
Hi All, enclosed a patches set to improve the output of mkfs.btrfs command. Currently I find the output of mkfs.btrfs command quite confusing: -- cut -- cut -- # mkfs.btrfs -f -M -d raid5 -m raid5 /dev/vd[b-k] Btrfs v3.17 See http://btrfs.wiki.kernel.org for more information. Turning ON

[PATCH 2/8] Move group_profile_str() in utils.c

2014-12-17 Thread Goffredo Baroncelli
This is a preparation patch. Move the group_profile_str() function from cmds-filesystem.c to utils.c to be re-used from other modules (in this case from mkfs.c) Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- cmds-filesystem.c | 22 -- utils.c | 22

[PATCH 5/8] Return the fsid from make_btrfs()

2014-12-17 Thread Goffredo Baroncelli
The function make_btrfs() has as argument the fsid of the filesystem. If this fsid is empty or null make_btrfs() generates a new fsid. However If the buffer is valid (but the string is empty) the generated fsid is copied back to the caller. Signed-off-by: Goffredo Baroncelli kreij...@inwind.it

[PATCH 4/8] Add strdup in btrfs_add_to_fsid() to track the device path.

2014-12-17 Thread Goffredo Baroncelli
When creating a new btrfs_device, copy the path to track it. This path is then used by mkfs.btrfs to list all devices. Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utils.c b/utils.c index dcb4f74..3f50e4d 100644 ---

[PATCH 7/8] Print the summary

2014-12-17 Thread Goffredo Baroncelli
This patch prints the summary of the filesystem after the creation. The main fileds printed are: - devices list with their uuid, devid, path and size - raid profile (dup,single,raid0...) - leafsize/nodesize/sectorsize - filesystem features (raid56, extref, mixed-bg) - chunk size and type If the

[PATCH 3/8] Add verbose option to btrfs_add_to_fsid()

2014-12-17 Thread Goffredo Baroncelli
Add verbose option to btrfs_add_to_fsid() in order to avoid to print the information to console when not needed. The same information is print in the summary of the mkfs.btrfs command. Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- mkfs.c | 3 ++- utils.c | 7 --- utils.h | 2 +-

[PATCH 1/8] Add -v -q switches to mkfs.btrfs.

2014-12-17 Thread Goffredo Baroncelli
Add -v -q switches to mkfs.btrfs, to control the verbosity of mkfs.btrfs. Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- mkfs.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/mkfs.c b/mkfs.c index e10e62d..a5f19cc 100644 --- a/mkfs.c +++ b/mkfs.c

[PATCH 6/8] Track the size of the chunk created

2014-12-17 Thread Goffredo Baroncelli
Track the size of the chunk during the filesystem creation. These information are printed in a next patch. Signed-off-by: Goffredo Baroncelli --- mkfs.c | 54 +++--- 1 file changed, 43 insertions(+), 11 deletions(-) diff --git a/mkfs.c b/mkfs.c

[PATCH 8/8] Add -v and -q switches in the mkfs.btrfs man page

2014-12-17 Thread Goffredo Baroncelli
Add -v and -q switches to the mkfs.btrfs man page. These information will be printed by a next patch in the summary. Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- Documentation/mkfs.btrfs.txt | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/mkfs.btrfs.txt

Re: [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command

2014-12-17 Thread Martin Steigerwald
Am Mittwoch, 17. Dezember 2014, 21:14:04 schrieb Goffredo Baroncelli: # mkfs.btrfs -L btrfs-test -f -M -m raid5 -d raid5 /dev/vd[b-k] BTRFS filesystem summary: Label:btrfs-test UUID: 4409e381-f066-4e7b-af74-b6525fefa08b Node size:4096

btrfs_reserve_extent: Assertion `ret` failed. during btrfsck --init-csum-tree

2014-12-17 Thread Karl-Philipp Richter
Hi together, after a btrfs was missing some csums and therefore remounted read-only, I unmounted it and experienced $ sudo btrfsck --init-csum-tree /dev/sde1 Creating a new CRC tree Checking filesystem on /dev/sde1 UUID: bd6298ea-0748-45fe-87c8-eace6793ca89 Reinit crc root

Re: [PATCH v3] xfstests: btrfs: add test case for qgroup account on shared extents

2014-12-17 Thread Dave Chinner
On Wed, Dec 17, 2014 at 04:30:47PM +0800, Liu Bo wrote: This is a regression test of 'commit fcebe4562dec (Btrfs: rework qgroup accounting)' It can produce qgroup related warnings. The fix is https://patchwork.kernel.org/patch/5499981/ Btrfs: fix a warning of qgroup account on shared

Re: Device only missing if unmounted

2014-12-17 Thread Anand Jain
I checked this for all three devices and num_devices is 4 for all of them. The full output is below. so now if you mount and run 'btrfs fi show mnt' that should tell device missing, which then 'btrfs device missing mnt' should be successful theoretically. It may fail if you are mounting

Re: [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command

2014-12-17 Thread Anand Jain
This is nice ! Can I suggest you to take care of 'btrfs fi show' output as well :-) it needs a similar revamp. Earlier I tried to add group profile into the show output but that broke xfstest cases depending on it. so just a note. Thanks, Anand On 18/12/2014 04:14, Goffredo Baroncelli

[PATCH] btrfs-progs: remove uneccessary subvol name check for subvol deletion

2014-12-17 Thread Gui Hecheng
When we want to delete a subvol, we first check to see whether it is a subvolume or not. After the check, we are sure that it is a valid subvol, don't have to check its name. Signed-off-by: Gui Hecheng guihc.f...@cn.fujitsu.com --- cmds-subvolume.c | 15 --- 1 file changed, 15

[PATCH 0/5] Add repair function for file extent to enhance

2014-12-17 Thread Qu Wenruo
Add two repair functions to handle 2 types of file extent error: 1. Orphan file extents Orphan file extents are extent items whose type is DATA but its data backref is invalid(points to non-exists). This kind of corruption can occur when fs tree is corrupted but extent tree stay fine. The repair

[PATCH 4/5] btrfs-progs: Add repair and report function for orphan file exntent.

2014-12-17 Thread Qu Wenruo
In some fs tree leaf/node corruption case, file extents may be lost, but in extent tree, its record may still exists. This provide the possiblity for such orphan file extents to be recovered even we can't recover its compression and other info, we can still insert it as a normal non-compression

[PATCH 3/5] btrfs-progs: Record and report every file extent hole.

2014-12-17 Thread Qu Wenruo
Record every file extent discontinuous hole in inode_record using a rb_tree member. Before the patch, btrfsck will only record the first file extent hole by using first_extent_gap, that's good for detecting error, but not suitable for fixing it. This patch provides the ability to record every

[PATCH 5/5] btrfs-progs: Add repair function for discount file extent hole.

2014-12-17 Thread Qu Wenruo
Since orphan extents are handled in previous patches, now just punch holes to fill the file extents hole. Also since now btrfsck is aware of whether the inode has orphan file extent, allow repair_inode_no_item() to determine filetype according to orphan file extent. Signed-off-by: Qu Wenruo

[PATCH 2/5] btrfs-progs: Add btrfs_get_extent() and btrfs_punch_hole().

2014-12-17 Thread Qu Wenruo
Add btrfs_get_extent() adn btrfs_punch_hole() for btrfs-progs. Btrfs_get_extent() will act much like kernel one, return the first extent that covers the given range. The difference will be that progs btrfs_get_extent() can't handle no-holes feature, which means caller should handle it carefully.

[PATCH 1/5] btrfs-progs: Record orphan data extent ref to corresponding root.

2014-12-17 Thread Qu Wenruo
Before this patch, when a extent's data ref points to a invalid key in fs tree, this happens if a leaf/node of fs tree is corrupted, btrfsck can't do any repair and just exit. In fact, such problem can be handled in fs tree repair routines, rebuild the inode item(if missing) and add back the

Re: Standards Problems [Was: [PATCH v2 1/3] Btrfs: get more accurate output in df command.]

2014-12-17 Thread Robert White
I don't disagree with the _ideal_ of your patch. I just think that it's impossible to implement it without lying to the user or making things just as bad in a different way. I would _like_ you to be right. But my thing is finding and quantifying failure cases and the entire question is full of

Re: [PATCH 6/7] Print the summary

2014-12-17 Thread Robert White
On 12/16/2014 01:05 AM, Hugo Mills wrote: On Mon, Dec 15, 2014 at 07:47:06PM -0800, Robert White wrote: I prefer slice, not that I am totally happy with that word either. But by the time you get through loopback devices, memory map devices, the device files that represent parts of partitioned

[PATCH 1/2] Fix wrong memory free on check_is_root

2014-12-17 Thread Satoru Takeuchi
From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com Date: Thu, 18 Dec 2014 14:35:22 +0900 @tmp is freed even if its allocation fails. Signed-off-by: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com --- cmds-property.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff

[PATCH 2/2] btrfs-progs: fix the file system root is regarded as non-root

2014-12-17 Thread Satoru Takeuchi
From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com When / is Btrfs, btrfs property subcommand / regards it as non-root by mistake. check_is_root() regards @object as a file system root if the following two conditions are satisfied. a) Both @object and its parent directory are Btrfs object

Re: [PATCH 1/2] Fix wrong memory free on check_is_root

2014-12-17 Thread Gui Hecheng
On Thu, 2014-12-18 at 15:09 +0900, Satoru Takeuchi wrote: From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com Date: Thu, 18 Dec 2014 14:35:22 +0900 @tmp is freed even if its allocation fails. Signed-off-by: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com --- cmds-property.c | 13

Re: [PATCH 2/2] btrfs-progs: fix the file system root is regarded as non-root

2014-12-17 Thread Gui Hecheng
On Thu, 2014-12-18 at 15:42 +0900, Satoru Takeuchi wrote: From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com When / is Btrfs, btrfs property subcommand / regards it as non-root by mistake. check_is_root() regards @object as a file system root if the following two conditions are

Re: [PATCH 1/2] Fix wrong memory free on check_is_root

2014-12-17 Thread Satoru Takeuchi
On 2014/12/18 16:03, Gui Hecheng wrote: On Thu, 2014-12-18 at 15:09 +0900, Satoru Takeuchi wrote: From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com Date: Thu, 18 Dec 2014 14:35:22 +0900 @tmp is freed even if its allocation fails. Signed-off-by: Satoru Takeuchi

Re: [PATCH 2/2] btrfs-progs: fix the file system root is regarded as non-root

2014-12-17 Thread Satoru Takeuchi
On 2014/12/18 16:09, Gui Hecheng wrote: On Thu, 2014-12-18 at 15:42 +0900, Satoru Takeuchi wrote: From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com When / is Btrfs, btrfs property subcommand / regards it as non-root by mistake. check_is_root() regards @object as a file system root if the

[PATCH v2] Fix wrong memory free on check_is_root

2014-12-17 Thread Satoru Takeuchi
From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com When / is Btrfs, btrfs property subcommand / regards it as non-root by mistake. check_is_root() regards @object as a file system root if the following two conditions are satisfied. a) Both @object and its parent directory are Btrfs object