[PATCH 1/1] btrfs: looping 'mkfs.btrfs -f dev' may fail with EBUSY

2014-06-12 Thread Anand Jain
The thread holding the O_EXCL flag seems to be BTRFS_IOC_SCAN_DEV ioctl, which in turn calls btrfs_scan_one_device() to open dev with the O_EXCL flag. But btrfs_scan_one_device() does not write anything to the disk. and it is called by . An intermediary step (not the final open_ctree) in

Re: [PATCH] Btrfs-progs: fix race condition between btrfs and udev

2014-06-12 Thread Anand Jain
Wang, Futher, a easy way to trigger this problem is by running the following c codes repeatedly: int main(int argc, char **argv) { /* pass a btrfs block device */ int fd = open(argv[1], O_RDWR | O_EXCL); if (fd 0) { perror(fail to open: %s,

[PATCH v2 2/2] btrfs-progs: Add human readable flags output for chunk/block group type.

2014-06-12 Thread Qu Wenruo
Current btrfs-debug-tree output chunk/block group type as numbers, which makes it hard to understand and need to check the source to understand the meaning. This patch will convert numberic type output to human readable strings. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- changlog: v2:

[PATCH v2 1/2] btrfs-progs: Add human readable flags output string for extent flags.

2014-06-12 Thread Qu Wenruo
Current btrfs-debug-tree outputs extent flags as numbers, which makes it hard to understand and need to check the source to understand the meaning. This patch will convert numberic flags output to human readable strings. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- changlog: v2: none ---

[PATCH v2 1/3] btrfs-progs: fix missing parity stripe for raid6 in chunk-recover

2014-06-12 Thread Gui Hecheng
When deal with the p q stripes for data profile raid6, chunk-recover forgets to insert them into the chunk record. Just insert them back freely. Also wrap the insert procedure into a new function, fill_chunk_up. Signed-off-by: Gui Hecheng guihc.f...@cn.fujitsu.com --- changelog: v1-v2:

Re: [PATCH 0/8] Add support for LZ4 compression

2014-06-12 Thread David Sterba
On Wed, Jun 04, 2014 at 10:00:06AM -0400, Chris Mason wrote: I have a slightly different reason for holding off on these. Disk format changes are forever, and we need a really strong use case for pulling them in. The format upgrade is inevitable for full bidirectional interoperability of

Re: [PATCH] Add some simple end-to-end tests for btrfs-convert.

2014-06-12 Thread David Sterba
On Fri, May 30, 2014 at 08:26:02PM +0200, Julien Muchembled wrote: Le 05/21/14 19:20, Adam Buchbinder a écrit : + # 256MB is the smallest acceptable btrfs image. + dd if=/dev/zero of=$here/test.img bs=1024 count=$((256*1024)) \ +convert-tests-results.txt 21 || _fail dd

Re: [PATCH] btrfs-progs: make pretty Documentation/ build match the rest

2014-06-12 Thread David Sterba
On Fri, May 30, 2014 at 11:27:14AM -0500, Eric Sandeen wrote: This is the most important patch ever. ;) Oh it is :) I found this to be less aesthetically pleasing than it was before: [CC] btrfstune.o Making all in Documentation ASCIIDOC btrfs-convert.xml [LD]

Re: [PATCH v2] btrfs-progs: Improve the parse_size() error message.

2014-06-12 Thread David Sterba
On Thu, May 29, 2014 at 09:42:11AM +0800, Qu Wenruo wrote: When using parse_size(), even non-numeric value is passed, it will only give error message ERROR: size value is empty, which is quite confusing for end users. This patch will introduce more meaningful error message for the following

Re: [PATCH V2] btrfs-progs: add mount options to btrfs-mount.5

2014-06-12 Thread David Sterba
On Wed, Jun 11, 2014 at 05:14:55PM -0500, Eric Sandeen wrote: This is a straight cut and paste from the util-linux mount manpage into btrfs-mount.5 It's pretty much impossible for util-linux to keep up with every filesystem out there, and Karel has more than once expressed a wish that mount

R: Re: Slow startup of systemd-journal on BTRFS

2014-06-12 Thread Goffredo Baroncelli kreij...@libero.it
Messaggio originale Da: li...@colorremedies.com Data: 12/06/2014 2.40 A: kreij...@inwind.it, Goffredo Baroncellikreij...@libero.it Cc: systemd Mailing Listsystemd-de...@lists.freedesktop.org, linux-btrfs linux-btrfs@vger.kernel.org Ogg: Re: Slow startup of systemd-journal on BTRFS On

R: Re: Slow startup of systemd-journal on BTRFS

2014-06-12 Thread Goffredo Baroncelli kreij...@libero.it
Messaggio originale Da: russ...@coker.com.au Data: 12/06/2014 3.18 A: kreij...@inwind.it Cc: systemd Mailing Listsystemd-de...@lists.freedesktop.org, linux-btrfs linux-btrfs@vger.kernel.org Ogg: Re: Slow startup of systemd-journal on BTRFS On Wed, 11 Jun 2014 23:28:54 Goffredo

R: Re: Slow startup of systemd-journal on BTRFS

2014-06-12 Thread Goffredo Baroncelli kreij...@libero.it
Da: da...@fromorbit.com Data: 12/06/2014 3.21 A: kreij...@inwind.it Cc: systemd Mailing Listsystemd-de...@lists.freedesktop.org, linux-btrfs linux-btrfs@vger.kernel.org Ogg: Re: Slow startup of systemd-journal on BTRFS On Wed, Jun 11, 2014 at 11:28:54PM +0200, Goffredo Baroncelli wrote: Hi all,

Re: R: Re: Slow startup of systemd-journal on BTRFS

2014-06-12 Thread Duncan
Goffredo Baroncelli kreij...@libero.it posted on Thu, 12 Jun 2014 13:13:26 +0200 as excerpted: systemd has a very stupid journal write pattern. It checks if there is space in the file for the write, and if not it fallocates the small amount of space it needs (it does *4 byte* fallocate calls!)

Re: [PATCH V2] btrfs-progs: add mount options to btrfs-mount.5

2014-06-12 Thread Eric Sandeen
On 6/12/14, 5:51 AM, David Sterba wrote: On Wed, Jun 11, 2014 at 05:14:55PM -0500, Eric Sandeen wrote: This is a straight cut and paste from the util-linux mount manpage into btrfs-mount.5 It's pretty much impossible for util-linux to keep up with every filesystem out there, and Karel has

Deadlock/high load

2014-06-12 Thread Alin Dobre
Hi all, I have a problem that triggers quite often on our production machines. I don't really know what's triggering this or how to reproduce it, but the machine enters in some sort of deadlock state, where it consumes all the i/o and the load average goes very high in seconds (it even gets to

Re: [PATCH] Btrfs: fix qgroups sanity test crash or hang

2014-06-12 Thread Filipe David Manana
On Thu, Jun 12, 2014 at 1:35 AM, Chris Mason c...@fb.com wrote: On 06/11/2014 08:12 PM, Filipe David Borba Manana wrote: Often when running the qgroups sanity test, a crash or a hang happened. This is because the extent buffer the test uses for the root node doesn't have an header level

[PATCH] Use sparse files for filesystem conversion tests.

2014-06-12 Thread Adam Buchbinder
On my system, this brings the FS conversion test suite's runtime from over ten seconds down to under two. Thanks to Julien Muchembled for the suggestion. Signed-off-by: Adam Buchbinder abuchbin...@google.com --- tests/convert-tests.sh | 18 ++ 1 file changed, 10 insertions(+), 8

Re: [PATCH v3] lib: add size unit t/p/e to memparse

2014-06-12 Thread Andrew Morton
On Wed, 2 Apr 2014 16:54:37 +0800 Gui Hecheng guihc.f...@cn.fujitsu.com wrote: For modern filesystems such as btrfs, t/p/e size level operations are common. add size unit t/p/e parsing to memparse Signed-off-by: Gui Hecheng guihc.f...@cn.fujitsu.com --- changelog v1-v2: replace

Re: [PATCH v2] btrfs-progs: Improve the parse_size() error message.

2014-06-12 Thread Qu Wenruo
Original Message Subject: Re: [PATCH v2] btrfs-progs: Improve the parse_size() error message. From: David Sterba dste...@suse.cz To: Qu Wenruo quwen...@cn.fujitsu.com Date: 2014年06月12日 18:15 On Thu, May 29, 2014 at 09:42:11AM +0800, Qu Wenruo wrote: When using parse_size(),

Re: [PATCH v3] lib: add size unit t/p/e to memparse

2014-06-12 Thread Gui Hecheng
On Thu, 2014-06-12 at 14:15 -0700, Andrew Morton wrote: On Wed, 2 Apr 2014 16:54:37 +0800 Gui Hecheng guihc.f...@cn.fujitsu.com wrote: For modern filesystems such as btrfs, t/p/e size level operations are common. add size unit t/p/e parsing to memparse Signed-off-by: Gui Hecheng

[PATCH v3] btrfs-progs: Improve the parse_size() error message.

2014-06-12 Thread Qu Wenruo
When using parse_size(), even non-numeric value is passed, it will only give error message ERROR: size value is empty, which is quite confusing for end users. This patch will introduce more meaningful error message for the following new cases 1) Invalid size string (non-numeric string) 2) Minus

Re: Deadlock/high load

2014-06-12 Thread Liu Bo
On Thu, Jun 12, 2014 at 04:15:27PM +0100, Alin Dobre wrote: Hi all, I have a problem that triggers quite often on our production machines. I don't really know what's triggering this or how to reproduce it, but the machine enters in some sort of deadlock state, where it consumes all the i/o

[PATCH 1/2 v3 RESEND] Btrfs: device_list_add() should not update list when mounted

2014-06-12 Thread Anand Jain
From: Anand Jain anand.j...@oracle.com device_list_add() is called when user runs btrfs dev scan, which would add any btrfs device into the btrfs_fs_devices list. Now think of a mounted btrfs. And a new device which contains the a SB from the mounted btrfs devices. In this situation when user

[PATCH 2/2] btrfs: check generation as replace duplicates devid+uuid

2014-06-12 Thread Anand Jain
From: Anand Jain anand.j...@oracle.com When FS in unmounted we need to check generation number as well since devid+uuid combination could match with the missing replaced disk when it reappears, and without this patch it might pair with the replaced disk again. device_list_add() function is

Re: [PATCH] btrfs: When devices with same dev uuid occurs, only add the one with largest generation.

2014-06-12 Thread Anand Jain
Qu, Kindly note, device-generation is not updated when user scan the device for the first time. I have sent out patch: [PATCH 2/2] btrfs: check generation as replace duplicates devid+uuid Please feel free to add your Signed-off-by, if you think so. review comments are appreciated as