Re: snapshot deletion / unmount slowness

2013-03-10 Thread Liu Bo
On Mon, Mar 11, 2013 at 12:11:43PM +0600, Roman Mamedov wrote: > On Sun, 10 Mar 2013 22:31:08 -0700 > Michael Johnson - MJ wrote: > > > What I now suspect is going on is that while deleting the snapshots > > was quick, that probably kicks of a background thread which actually > > does the heavy l

Re: snapshot deletion / unmount slowness

2013-03-10 Thread Roman Mamedov
On Sun, 10 Mar 2013 22:31:08 -0700 Michael Johnson - MJ wrote: > What I now suspect is going on is that while deleting the snapshots > was quick, that probably kicks of a background thread which actually > does the heavy lifting. Exactly that, the snapshot deletion only "syncs" on unmount, there

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

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_t

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 th

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

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

[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 --- fs/btrfs/send.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index f7a8b86..f1e1e3

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 o

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: 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 > > T

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 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 (data)

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,

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 1G

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 prob

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 t

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 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 this distincti

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 copie

[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) fprintf(stderr,

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

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

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 > > --- [sni

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 fi

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

2013-03-10 Thread Goffredo Baroncelli
Hi Martin, On 03/10/2013 02:16 PM, Martin Steigerwald wrote: > 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 lates

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

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 bi

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

2013-03-10 Thread Wang Shilong
Hello, > From: Goffredo Baroncelli > > 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 > --- > Makefile

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) > r

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

2013-03-10 Thread Wang Shilong
Hello, > From: Goffredo Baroncelli > > 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 Baronce

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 t

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 > --- > man/btrfs.8.in |9 + > man/mkfs.btrfs.8.in | 24 +++- > 2

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

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 > th

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

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Signed-off-by: Goffredo Baroncelli --- cmds-fi-disk_usage.c | 432 ++ cmds-fi-disk_usage.h |3 + cmds-filesystem.c|2 + utils.c | 58 +++ utils.h |3 + 5 files changed, 498

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

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Signed-off-by: Goffredo Baroncelli --- cmds-device.c|3 ++ cmds-fi-disk_usage.c | 141 ++ cmds-fi-disk_usage.h |3 ++ 3 files changed, 147 insertions(+) diff --git a/cmds-device.c b/cmds-device.c index 1

[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 Signed-off-by: Goffredo Baroncelli --- 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 +46,8 @@ btrfs \- control a btrfs files

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

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli 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 *tab, int column,

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

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Signed-off-by: Goffredo Baroncelli --- 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 @@ -29,6 +29,9 @@ btrfs \- control a btrfs

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

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli Signed-off-by: Goffredo Baroncelli --- 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 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -31

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

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli 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 --- Makefile |2 +- cmds-fi-dis

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

2013-03-10 Thread Goffredo Baroncelli
From: Goffredo Baroncelli 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 --- Makefile

[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 from

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

2013-03-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/03/13 22:37, Harald Glatt wrote: > I have to add something to my own message: Even the notion of thinking > in 'how many devices do I want to give away for redundancy' is > outdated... Devices are the only real tangible thing that you can actu

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 n

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