Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread Martin Steigerwald
Hi Hugo, Am Samstag, 9. März 2013 schrieb Hugo Mills: Some time ago, and occasionally since, we've discussed altering the RAID-n terminology to change it to an nCmSpP format, where n is the number of copies, m is the number of (data) devices in a stripe per copy, and p is the number of

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread Martin Steigerwald
Am Sonntag, 10. März 2013 schrieb Harald Glatt: Very good points, I was also gonna write something by the lines of 'all that matters is achieving the minimum amount of redundancy, as requested by the user, at the maximum possible performance'. After reading your post now, Roger,

[PATCH V3][BTRFS-PROGS] Enhance btrfs fi df with raid5/6 support

2013-03-10 Thread Goffredo Baroncelli
Hi all, This is the third attempt of my patches related to show how the data are stored in a btrfs filesystem. I rebased all the patches on the latest mason git. I tried to address the Zach concern abou the using of the string_list_add() in the df_pretty_sizes(): string_list_add() is removed

[PATCH 1/8] Add some helpers to manage the strings allocation/deallocation.

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it This patch adds some helpers to manage the strings allocation and deallocation. The function string_list_add(char *) adds the passed string to a list; the function string_list_free() frees all the strings together. Signed-off-by: Goffredo Baroncelli

[PATCH 2/8] Enhance the command btrfs filesystem df.

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it Enhance the command btrfs filesystem df to show space usage information for a mount point(s). It shows also an estimation of the space available, on the basis of the current one used. Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- Makefile

[PATCH 3/8] Create the man page entry for the command btrfs fi df

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- man/btrfs.8.in | 49 + 1 file changed, 49 insertions(+) diff --git a/man/btrfs.8.in b/man/btrfs.8.in index 94f4ffe..e2f86ea 100644 ---

[PATCH 4/8] Add helpers functions to handle the printing of data in tabular format.

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it This patch adds some functions to manage the printing of the data in tabular format. The function struct string_table *table_create(int columns, int rows) creates an (empty) table. The functions char *table_printf(struct string_table

[PATCH 6/8] Create entry in man page for btrfs filesystem disk-usage

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- man/btrfs.8.in | 13 + 1 file changed, 13 insertions(+) diff --git a/man/btrfs.8.in b/man/btrfs.8.in index e2f86ea..50dc510 100644 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@

[PATCH 8/8] Create a new entry in btrfs man page for btrfs device disk-usage.

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- man/btrfs.8.in |8 1 file changed, 8 insertions(+) diff --git a/man/btrfs.8.in b/man/btrfs.8.in index 50dc510..e60c81f 100644 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -46,6

[PATCH 7/8] Add btrfs device disk-usage command

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- cmds-device.c|3 ++ cmds-fi-disk_usage.c | 141 ++ cmds-fi-disk_usage.h |3 ++ 3 files changed, 147 insertions(+) diff --git

[PATCH 5/8] Add command btrfs filesystem disk-usage

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it Signed-off-by: Goffredo Baroncelli kreij...@inwind.it --- cmds-fi-disk_usage.c | 432 ++ cmds-fi-disk_usage.h |3 + cmds-filesystem.c|2 + utils.c | 58 +++ utils.h

Re: [PATCH V3][BTRFS-PROGS] Enhance btrfs fi df with raid5/6 support

2013-03-10 Thread Martin Steigerwald
Am Sonntag, 10. März 2013 schrieb Goffredo Baroncelli: Hi all, Hi Goffredo, This is the third attempt of my patches related to show how the data are stored in a btrfs filesystem. I rebased all the patches on the latest mason git. I tried to address the Zach concern abou the using of the

Re: [PATCH V3][BTRFS-PROGS] Enhance btrfs fi df with raid5/6 support

2013-03-10 Thread Martin Steigerwald
Am Sonntag, 10. März 2013 schrieb Martin Steigerwald: Am Sonntag, 10. März 2013 schrieb Goffredo Baroncelli: Hi all, Hi Goffredo, This is the third attempt of my patches related to show how the data are stored in a btrfs filesystem. I rebased all the patches on the latest mason git.

Re: [PATCH 5/5] Add man page description for nCmSpP replication levels

2013-03-10 Thread Goffredo Baroncelli
Hi Hugo, could you please add also to the btrfs man page a section where are described the nCmSpP levels ? Thanks. GB On 03/09/2013 09:31 PM, Hugo Mills wrote: Signed-off-by: Hugo Mills h...@carfax.org.uk --- man/btrfs.8.in |9 + man/mkfs.btrfs.8.in | 24

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread Goffredo Baroncelli
Hi Martin, On 03/10/2013 12:23 PM, Martin Steigerwald wrote: Hi Hugo, Am Samstag, 9. März 2013 schrieb Hugo Mills: Some time ago, and occasionally since, we've discussed altering the RAID-n terminology to change it to an nCmSpP format, where n is the number of copies, m is the number of

Re: [PATCH 1/8] Add some helpers to manage the strings allocation/deallocation.

2013-03-10 Thread Wang Shilong
Hello, From: Goffredo Baroncelli kreij...@inwind.it This patch adds some helpers to manage the strings allocation and deallocation. The function string_list_add(char *) adds the passed string to a list; the function string_list_free() frees all the strings together. Signed-off-by:

Re: [PATCH 1/8] Add some helpers to manage the strings allocation/deallocation.

2013-03-10 Thread Goffredo Baroncelli
On 03/10/2013 03:34 PM, Wang Shilong wrote: Hello, [...] + +/* + * Add a string to the dynamic allocated string list + */ +char *string_list_add(char *s) +{ +int size; + I'd prefer to have a check here firstly, like: if (!s) return s;

Re: [PATCH 2/8] Enhance the command btrfs filesystem df.

2013-03-10 Thread Wang Shilong
Hello, From: Goffredo Baroncelli kreij...@inwind.it Enhance the command btrfs filesystem df to show space usage information for a mount point(s). It shows also an estimation of the space available, on the basis of the current one used. Signed-off-by: Goffredo Baroncelli

Re: [PATCH 00/14] btrfs-progs: more Coverity cleanups

2013-03-10 Thread David Sterba
On Mon, Mar 04, 2013 at 04:39:50PM -0600, Eric Sandeen wrote: This gets the coverity issue count down to 33. Before Zach started this process, we were over 150, IIRC. So it's almost to the point where the scans will be manageable going forward. Not a lot of real bugfixes here, but a bit

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread Goffredo Baroncelli
Hi Hugo, On 03/09/2013 09:31 PM, Hugo Mills wrote: Some time ago, and occasionally since, we've discussed altering the RAID-n terminology to change it to an nCmSpP format, where n is the number of copies, m is the number of (data) devices in a stripe per copy, and p is the number of parity

Re: [PATCH V3][BTRFS-PROGS] Enhance btrfs fi df with raid5/6 support

2013-03-10 Thread Goffredo Baroncelli
On 03/10/2013 02:19 PM, Martin Steigerwald wrote: Am Sonntag, 10. März 2013 schrieb Martin Steigerwald: Am Sonntag, 10. März 2013 schrieb Goffredo Baroncelli: Hi all, Hi Goffredo, This is the third attempt of my patches related to show how the data are stored in a btrfs filesystem. I

Re: [PATCH 5/5] Add man page description for nCmSpP replication levels

2013-03-10 Thread Hugo Mills
On Sun, Mar 10, 2013 at 03:01:12PM +0100, Goffredo Baroncelli wrote: Hi Hugo, could you please add also to the btrfs man page a section where are described the nCmSpP levels ? Thanks. GB On 03/09/2013 09:31 PM, Hugo Mills wrote: Signed-off-by: Hugo Mills h...@carfax.org.uk ---

Re: [PATCH 5/5] Add man page description for nCmSpP replication levels

2013-03-10 Thread Goffredo Baroncelli
On 03/10/2013 06:20 PM, Hugo Mills wrote: On Sun, Mar 10, 2013 at 03:01:12PM +0100, Goffredo Baroncelli wrote: Hi Hugo, could you please add also to the btrfs man page a section where are described the nCmSpP levels ? Thanks. GB On 03/09/2013 09:31 PM, Hugo Mills wrote: Signed-off-by:

Re: Balance terminating

2013-03-10 Thread David Sterba
On Sat, Mar 09, 2013 at 12:03:07PM +, Swasher wrote: After it, I'm start watch for progress via 'balance status', and I can see how progress run. But only for 83% left. I'm wait few hours and try cancel it with 'balance cancel'. More than 12 hours had passed, but balance stalled in

[PATCH] btrfs-progs: output raid[56] options in mkfs.btrfs

2013-03-10 Thread Matias Bjørling
This patch adds the raid[56] options to the output of mkfs.btrfs help. --- mkfs.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkfs.c b/mkfs.c index 5ece186..f9f26a5 100644 --- a/mkfs.c +++ b/mkfs.c @@ -326,7 +326,7 @@ static void print_usage(void)

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread Hugo Mills
On Sun, Mar 10, 2013 at 12:23:56PM +0100, Martin Steigerwald wrote: Hi Hugo, Am Samstag, 9. März 2013 schrieb Hugo Mills: Some time ago, and occasionally since, we've discussed altering the RAID-n terminology to change it to an nCmSpP format, where n is the number of copies, m is the

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread Harald Glatt
On Sun, Mar 10, 2013 at 10:36 PM, Hugo Mills h...@carfax.org.uk wrote: Oh, sorry. It's reduced redundancy, aka DUP -- i.e. you get that number of copies, but not guarantee that the copies all live on different devices. I'm not devoted to showing it this way. Other suggestions for making

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread Goffredo Baroncelli
On 03/10/2013 10:45 PM, Harald Glatt wrote: I've noticed through my own tests that on a single device I can corrupt around 5% of the data completely before btrfs fails. Up to that point both filesystem as well as data integrity stays at 100%. However the default layout for one disk seems to

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread Hugo Mills
On Sat, Mar 09, 2013 at 09:41:50PM -0800, Roger Binns wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/03/13 17:44, Hugo Mills wrote: You've got at least three independent parameters to the system in order to make that choice, though, and it's a fairly fuzzy decision problem.

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread Harald Glatt
I created a btrfs volume on a 4GB drive using the entire drive (VirtualBox VM). Of this drive btrfs immediately used 400 MB. I then filled it up with random data, left around 300 MB free and made a md5sum of said data. Then I umounted the volume and wrote random data into it the drive with dd at

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread Hugo Mills
On Sun, Mar 10, 2013 at 04:43:33PM +0100, Goffredo Baroncelli wrote: Hi Hugo, On 03/09/2013 09:31 PM, Hugo Mills wrote: Some time ago, and occasionally since, we've discussed altering the RAID-n terminology to change it to an nCmSpP format, where n is the number of copies, m is the

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread Harald Glatt
On Sun, Mar 10, 2013 at 11:24 PM, Hugo Mills h...@carfax.org.uk wrote: On 03/09/2013 09:31 PM, Hugo Mills wrote: Some time ago, and occasionally since, we've discussed altering the RAID-n terminology to change it to an nCmSpP format, where n is the number of copies, m is the number of

Re: xfstests: 301: sparse copy between different filesystems/mountpoints on btrfs

2013-03-10 Thread Dave Chinner
On Sat, Mar 09, 2013 at 06:24:47PM -0600, Eric Sandeen wrote: On 1/18/13 3:48 PM, Koen De Wit wrote: +} + +_scratch_mount +_create_reflinks_to $TESTDIR2 +_scratch_unmount + +mount $TEST_DEV $SCRATCH_MNT +_create_reflinks_to $TESTDIR3 +umount $SCRATCH_MNT TBH this confuses me,

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread Diego Calleja
El Domingo, 10 de marzo de 2013 12:23:56 Martin Steigerwald escribió: Any other idea to make it less cryptic? I would vote for optionally allowing to expand the codes into something more verbose and self-documented, ie: 1CmS1P - 1Copy-manyStripes-1Parity -- To unsubscribe from this list: send

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread sam tygier
On 10/03/13 15:43, Goffredo Baroncelli wrote: - DUP - dD (to allow more that 2 copy per disk) - RAID1 - nC or *C - RAID0 - mS or *S - RAID10 - nCmS or *CmS or nC*s -

[PATCH] fs: btrfs: Replaced calls to kmalloc and memcpy with kmemdup

2013-03-10 Thread Alexandru Gheorghiu
Replaced calls to kmalloc followed by memcpy with single call to kmemdup. This patch was found using coccicheck. Signed-off-by: Alexandru Gheorghiu gheorghiuan...@gmail.com --- fs/btrfs/send.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/btrfs/send.c

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread Hugo Mills
On Sun, Mar 10, 2013 at 11:40:27PM +, sam tygier wrote: On 10/03/13 15:43, Goffredo Baroncelli wrote: - DUP - dD (to allow more that 2 copy per disk) - RAID1 - nC or *C - RAID0

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread sam tygier
On 09/03/13 20:31, Hugo Mills wrote: Some time ago, and occasionally since, we've discussed altering the RAID-n terminology to change it to an nCmSpP format, where n is the number of copies, m is the number of (data) devices in a stripe per copy, and p is the number of parity devices in a

Re: [PATCH 0/5] [RFC] RAID-level terminology change

2013-03-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/03/13 15:04, Hugo Mills wrote: On Sat, Mar 09, 2013 at 09:41:50PM -0800, Roger Binns wrote: The only constraints that matter are surviving N device failures, and data not lost if at least N devices are still present. Under the hood the best

Re: xfstests: 301: sparse copy between different filesystems/mountpoints on btrfs

2013-03-10 Thread Eric Sandeen
On 3/10/13 6:03 PM, Dave Chinner wrote: On Sat, Mar 09, 2013 at 06:24:47PM -0600, Eric Sandeen wrote: On 1/18/13 3:48 PM, Koen De Wit wrote: +} + +_scratch_mount +_create_reflinks_to $TESTDIR2 +_scratch_unmount + +mount $TEST_DEV $SCRATCH_MNT +_create_reflinks_to $TESTDIR3 +umount

snapshot deletion / unmount slowness

2013-03-10 Thread Michael Johnson - MJ
I currently have a btrfs filesystem that I am unmounting and it has been has been unmounting for the last 20 minutes. I'm pretty sure I know exactly what is going on and in my current situation it's not a huge issues, but it would be a problem if this was a production system and I was trying to