Re: [PATCH] Btrfs/send: sparse and pre-allocated file support for, btrfs-send mechanism

2013-01-25 Thread Jan Schmidt
Hi Alex, On Thu, January 24, 2013 at 19:06 (+0100), Alex Lyakas wrote: On Thu, Jan 24, 2013 at 7:13 PM, Jan Schmidt list.bt...@jan-o-sch.net wrote: We don't transfer the metadata itself and that's for good reason. The data should look alike from a user's point of view where possible. In places

[PATCH 02/10] Btrfs-progs: move printing subvol list outside of btrfs_list_subvols

2013-01-25 Thread Anand Jain
To improve the code reuse its better to have btrfs_list_subvols just return list of subvols witout printing Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 28 ++-- btrfs-list.h | 2 +- cmds-subvolume.c | 4 ++-- 3 files changed, 21

[PATCH 00/10 V2] add show sub-command for btrfs subvol cli

2013-01-25 Thread Anand Jain
Here is the V2 of this patch-set, kindly review and accept. v1-v2: . 2nd attempt to Rebase to git://repo.or.cz/btrfs-progs-unstable/devel.git for-chris and . Accepts Eric's review comments. Thanks Anand Jain (10): Btrfs-progs: move open_file_or_dir() to utils.c Btrfs-progs: move

[PATCH 01/10] Btrfs-progs: move open_file_or_dir() to utils.c

2013-01-25 Thread Anand Jain
The definition of the function open_file_or_dir() is moved from common.c to utils.c in order to be able to share some common code between scrub and the device stats in the following step. That common code uses open_file_or_dir(). Since open_file_or_dir() makes use of the function dirfd(3), the

[PATCH 03/10] Btrfs-progs: add parent uuid for snapshots

2013-01-25 Thread Anand Jain
Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 34 -- btrfs-list.h | 1 + cmds-subvolume.c | 6 +- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/btrfs-list.c b/btrfs-list.c index b404e1d..13a365d 100644 ---

[PATCH 05/10] Btrfs-progs: add function btrfs_get_subvol to get root_info of a subvol

2013-01-25 Thread Anand Jain
We need a function which can get the root_info of a given subvol. This is in preparation to add support for the show sub-cli. Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 38 ++ btrfs-list.h | 1 + 2 files changed, 39 insertions(+) diff

[PATCH 07/10] Btrfs-progs: put find_mount_root() in commands.h

2013-01-25 Thread Anand Jain
A useful function need to define it in a header file. Signed-off-by: Anand Jain anand.j...@oracle.com --- commands.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands.h b/commands.h index 8114a73..9b77f3e 100644 --- a/commands.h +++ b/commands.h @@ -103,3 +103,6 @@ int

[PATCH 08/10] Btrfs-progs: make printing subvol extensible to newer layouts

2013-01-25 Thread Anand Jain
Currently you can print subvol in a list or table format. This patch will provide a way to extend this to other formats like the upcoming raw format. Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 26 +++--- btrfs-list.h | 3 +++ cmds-subvolume.c

[PATCH 06/10] Btrfs-progs: add method to filter snapshots by parent uuid

2013-01-25 Thread Anand Jain
Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 6 ++ btrfs-list.h | 1 + 2 files changed, 7 insertions(+) diff --git a/btrfs-list.c b/btrfs-list.c index 0ee13b6..9c84ecb 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -1142,6 +1142,11 @@ static int

[PATCH 04/10] Btrfs-progs: move struct root_info to btrfs-list.h

2013-01-25 Thread Anand Jain
As we would add more ways to list and manage the subvols and snapshots, its better if we have struct root_info defined in the header file. Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 47 --- btrfs-list.h | 47

[PATCH 09/10] Btrfs-progs: make get_subvol_name non cmds-send specific

2013-01-25 Thread Anand Jain
get_subvol_name can be used other than the just with in cmds-send.c so this patch will make it possible with out changing the original intentions. Signed-off-by: Anand Jain anand.j...@oracle.com --- cmds-send.c | 12 ++-- commands.h | 1 + 2 files changed, 7 insertions(+), 6

Re: [PATCH 05/10] Btrfs-progs: add function btrfs_get_subvol to get root_info of a subvol

2013-01-25 Thread Anand Jain
On 01/24/2013 12:49 PM, Eric Sandeen wrote: On 1/23/13 2:12 AM, Anand Jain wrote: We need a function which can get the root_info of a given subvol. This is in preparation to add support for the show sub-cli. Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 38

[PATCH 10/10] Btrfs-progs: add show subcommand to subvol cli

2013-01-25 Thread Anand Jain
This adds show sub-command to the btrfs subvol cli to display detailed inforamtion of the given subvol or snapshot. Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 25 +++- btrfs-list.h | 3 +- cmds-subvolume.c | 172

Re: [PATCH 01/10] Btrfs-progs: move open_file_or_dir() to utils.c

2013-01-25 Thread Anand Jain
Cool, I had this on my stack too. But can you maybe remove the nonsensical return values, and instead of renaming keeping the btrfsctl.c copy, why not just use a common copy in utils.c? It'd just be 2 checks for fd 0 in the btrfsctl callers. Thanks for the comments Eric. Though I agree,

Re: [PATCH 00/10] add show sub-command for btrfs subvol cli

2013-01-25 Thread Anand Jain
OK, in spite of saying that these patches did not apply clean, it was not terribly difficult to refit what did not apply. I did this in two steps: 1. I created the equivalent of the for-chris branch. This did not apply clean which surprised me. Yes I see it. Not sure where I went wrong,

Re: [PATCH 10/10] Btrfs-progs: add show subcommand to subvol cli

2013-01-25 Thread Anand Jain
Eric. All accepted. Thanks for the review. Anand On 01/24/2013 01:06 PM, Eric Sandeen wrote: On 1/23/13 2:12 AM, Anand Jain wrote: This adds show sub-command to the btrfs subvol cli to display detailed inforamtion of the given subvol or snapshot. Couple things below. Signed-off-by:

[PATCH 03/10] Btrfs-progs: add parent uuid for snapshots

2013-01-25 Thread Anand Jain
Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 34 -- btrfs-list.h | 1 + cmds-subvolume.c | 6 +- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/btrfs-list.c b/btrfs-list.c index b404e1d..13a365d 100644 ---

[RESEND] [PATCH 00/10 V2] add show sub-command for btrfs subvol cli

2013-01-25 Thread Anand Jain
Here is the V2 of this patch-set, kindly review and accept. v1-v2: . 2nd attempt to Rebase to git://repo.or.cz/btrfs-progs-unstable/devel.git for-chris and . Accepts Eric's review comments. Thanks Anand Jain (10): Btrfs-progs: move open_file_or_dir() to utils.c Btrfs-progs: move

[PATCH 01/10] Btrfs-progs: move open_file_or_dir() to utils.c

2013-01-25 Thread Anand Jain
The definition of the function open_file_or_dir() is moved from common.c to utils.c in order to be able to share some common code between scrub and the device stats in the following step. That common code uses open_file_or_dir(). Since open_file_or_dir() makes use of the function dirfd(3), the

[PATCH 02/10] Btrfs-progs: move printing subvol list outside of btrfs_list_subvols

2013-01-25 Thread Anand Jain
To improve the code reuse its better to have btrfs_list_subvols just return list of subvols witout printing Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 28 ++-- btrfs-list.h | 2 +- cmds-subvolume.c | 4 ++-- 3 files changed, 21

[PATCH 04/10] Btrfs-progs: move struct root_info to btrfs-list.h

2013-01-25 Thread Anand Jain
As we would add more ways to list and manage the subvols and snapshots, its better if we have struct root_info defined in the header file. Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 47 --- btrfs-list.h | 47

[PATCH 05/10] Btrfs-progs: add function btrfs_get_subvol to get root_info of a subvol

2013-01-25 Thread Anand Jain
We need a function which can get the root_info of a given subvol. This is in preparation to add support for the show sub-cli. Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 38 ++ btrfs-list.h | 1 + 2 files changed, 39 insertions(+) diff

[PATCH 06/10] Btrfs-progs: add method to filter snapshots by parent uuid

2013-01-25 Thread Anand Jain
Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 6 ++ btrfs-list.h | 1 + 2 files changed, 7 insertions(+) diff --git a/btrfs-list.c b/btrfs-list.c index 0ee13b6..9c84ecb 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -1142,6 +1142,11 @@ static int

[PATCH 07/10] Btrfs-progs: put find_mount_root() in commands.h

2013-01-25 Thread Anand Jain
A useful function need to define it in a header file. Signed-off-by: Anand Jain anand.j...@oracle.com --- commands.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands.h b/commands.h index 8114a73..9b77f3e 100644 --- a/commands.h +++ b/commands.h @@ -103,3 +103,6 @@ int

[PATCH 08/10] Btrfs-progs: make printing subvol extensible to newer layouts

2013-01-25 Thread Anand Jain
Currently you can print subvol in a list or table format. This patch will provide a way to extend this to other formats like the upcoming raw format. Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 26 +++--- btrfs-list.h | 3 +++ cmds-subvolume.c

[PATCH 10/10] Btrfs-progs: add show subcommand to subvol cli

2013-01-25 Thread Anand Jain
This adds show sub-command to the btrfs subvol cli to display detailed inforamtion of the given subvol or snapshot. Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 25 +++- btrfs-list.h | 3 +- cmds-subvolume.c | 172

[PATCH 09/10] Btrfs-progs: make get_subvol_name non cmds-send specific

2013-01-25 Thread Anand Jain
get_subvol_name can be used other than the just with in cmds-send.c so this patch will make it possible with out changing the original intentions. Signed-off-by: Anand Jain anand.j...@oracle.com --- cmds-send.c | 12 ++-- commands.h | 1 + 2 files changed, 7 insertions(+), 6

Re: [PATCH 10/10] Btrfs-progs: add show subcommand to subvol cli

2013-01-25 Thread Stefan Behrens
On Fri, 25 Jan 2013 17:30:39 +0800, Anand Jain wrote: This adds show sub-command to the btrfs subvol cli to display detailed inforamtion of the given subvol or snapshot. Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 25 +++- btrfs-list.h | 3 +-

[PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Gene Czarcinski
This patch hits a lot of files but adds little code. It could be considered a bugfix, Currently, when one of the btrfs user-space programs is executed by a regular user, the result if oftem a number of strange error messages which do not indicate the real problem. This patch changes that

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Stefan Behrens
On Fri, 25 Jan 2013 06:32:30 -0500, Gene Czarcinski wrote: This patch hits a lot of files but adds little code. It could be considered a bugfix, Currently, when one of the btrfs user-space programs is executed by a regular user, the result if oftem a number of strange error messages which

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Roman Mamedov
On Fri, 25 Jan 2013 06:32:30 -0500 Gene Czarcinski g...@czarc.net wrote: This patch hits a lot of files but adds little code. It could be considered a bugfix, Currently, when one of the btrfs user-space programs is executed by a regular user, the result if oftem a number of strange error

Re: [PATCH] Btrfs-progs: remove btrfsctl, btrfs-show and btrfs-vol from default build

2013-01-25 Thread Gene Czarcinski
On 06/08/2012 02:00 PM, Stefan Behrens wrote: Remove btrfsctl, btrfs-show and btrfs-vol from all target of Makefile. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Gene Czarcinski
On 01/25/2013 06:41 AM, Stefan Behrens wrote: On Fri, 25 Jan 2013 06:32:30 -0500, Gene Czarcinski wrote: This patch hits a lot of files but adds little code. It could be considered a bugfix, Currently, when one of the btrfs user-space programs is executed by a regular user, the result if

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Stefan Behrens
On Fri, 25 Jan 2013 07:03:19 -0500, Gene Czarcinski wrote: On 01/25/2013 06:41 AM, Stefan Behrens wrote: On Fri, 25 Jan 2013 06:32:30 -0500, Gene Czarcinski wrote: This patch hits a lot of files but adds little code. It could be considered a bugfix, Currently, when one of the btrfs

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Gene Czarcinski
On 01/25/2013 06:55 AM, Roman Mamedov wrote: On Fri, 25 Jan 2013 06:32:30 -0500 Gene Czarcinski g...@czarc.net wrote: This patch hits a lot of files but adds little code. It could be considered a bugfix, Currently, when one of the btrfs user-space programs is executed by a regular user, the

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Hugo Mills
On Fri, Jan 25, 2013 at 07:29:44AM -0500, Gene Czarcinski wrote: On 01/25/2013 06:55 AM, Roman Mamedov wrote: On Fri, 25 Jan 2013 06:32:30 -0500 Gene Czarcinski g...@czarc.net wrote: This patch hits a lot of files but adds little code. It could be considered a bugfix, Currently, when one

Re: [PATCH] btrfs-progs pretty/quiet build

2013-01-25 Thread Gene Czarcinski
On 01/24/2013 06:32 PM, Eric Sandeen wrote: A quieter build makes warnings more obvious. This could probably be improved, but just to see if people like this or if they hate it. :) make V=1 overrides it and gets you the full glory again. # make [CC] ctree.o [CC] disk-io.o

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Roman Mamedov
On Fri, 25 Jan 2013 07:29:44 -0500 Gene Czarcinski g...@czarc.net wrote: After all, I do not need to be root to execute btrfs --version. Is that all that comes to mind? I just did $ dd if=/dev/zero of=fs.img bs=1M count=2048 2048+0 records in 2048+0 records out 2147483648 bytes (2.1 GB)

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Gene Czarcinski
On 01/25/2013 07:17 AM, Stefan Behrens wrote: On Fri, 25 Jan 2013 07:03:19 -0500, Gene Czarcinski wrote: On 01/25/2013 06:41 AM, Stefan Behrens wrote: On Fri, 25 Jan 2013 06:32:30 -0500, Gene Czarcinski wrote: This patch hits a lot of files but adds little code. It could be considered a

Re: inconsistent output on sub list

2013-01-25 Thread Brendan Hide
.20130121-23h45.snap ID 430 gen 5034 top level 5 path FS_TREE/__snapshot/__active_var.20130121-23h45.snap ID 431 gen 5034 top level 5 path FS_TREE/__snapshot/__active_usr.20130121-23h45.snap ID 550 gen 5043 top level 5 path FS_TREE/__snapshot/__active_home.20130125-13h38.snap ID 552 gen 5034 top level 5

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Russell Coker
On Fri, 25 Jan 2013, Roman Mamedov r...@romanrm.ru wrote: The user does not have to be root, they can be a member of the group disk to manage this device. Also some or all of the tools accept not just a block device, but also a regular file as their parameter. Wouldn't it be better to

Re: [PATCH V5] Btrfs: snapshot-aware defrag

2013-01-25 Thread Mitch Harder
On Wed, Jan 23, 2013 at 6:52 PM, Liu Bo bo.li@oracle.com wrote: On Wed, Jan 23, 2013 at 10:05:04AM -0600, Mitch Harder wrote: On Wed, Jan 23, 2013 at 1:51 AM, Liu Bo bo.li@oracle.com wrote: On Tue, Jan 22, 2013 at 11:41:19AM -0600, Mitch Harder wrote: On Thu, Jan 17, 2013 at 8:42 AM,

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Gene Czarcinski
OK, I think I have gotten the message that this is a bad idea as implemented and that it should be dropped as such. I believe that there are some things (btrfs fi show comes to mind) which will need root and I am going to explore doing something for that case. And it also might be reasonable

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Eric Sandeen
On 1/25/13 5:32 AM, Gene Czarcinski wrote: This patch hits a lot of files but adds little code. It could be considered a bugfix, Currently, when one of the btrfs user-space programs is executed by a regular user, the result if oftem a number of strange error messages which do not indicate

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Gene Czarcinski
On 01/25/2013 10:04 AM, Gene Czarcinski wrote: OK, I think I have gotten the message that this is a bad idea as implemented and that it should be dropped as such. I believe that there are some things (btrfs fi show comes to mind) which will need root and I am going to explore doing something

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Brendan Hide
On 25/01/13 14:43, Hugo Mills wrote: On Fri, Jan 25, 2013 at 07:29:44AM -0500, Gene Czarcinski wrote: On 01/25/2013 06:55 AM, Roman Mamedov wrote: On Fri, 25 Jan 2013 06:32:30 -0500 Gene Czarcinski g...@czarc.net wrote: This patch hits a lot of files but adds little code. It could be

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread cwillu
On Fri, Jan 25, 2013 at 9:04 AM, Gene Czarcinski g...@czarc.net wrote: OK, I think I have gotten the message that this is a bad idea as implemented and that it should be dropped as such. I believe that there are some things (btrfs fi show comes to mind) which will need root and I am going to

Re: [PATCH] Btrfs-progs: remove btrfsctl, btrfs-show and btrfs-vol from default build

2013-01-25 Thread Eric Sandeen
On 1/25/13 5:57 AM, Gene Czarcinski wrote: On 06/08/2012 02:00 PM, Stefan Behrens wrote: Remove btrfsctl, btrfs-show and btrfs-vol from all target of Makefile. TBH, unless there are objections, I'd rather remove the source files as well. Having unbuilt source code lying around is potentially

Re: [PATCH V5] Btrfs: snapshot-aware defrag

2013-01-25 Thread Stefan Behrens
On Fri, 25 Jan 2013 08:55:58 -0600, Mitch Harder wrote: On Wed, Jan 23, 2013 at 6:52 PM, Liu Bo bo.li@oracle.com wrote: On Wed, Jan 23, 2013 at 10:05:04AM -0600, Mitch Harder wrote: On Wed, Jan 23, 2013 at 1:51 AM, Liu Bo bo.li@oracle.com wrote: On Tue, Jan 22, 2013 at 11:41:19AM

Re: [PATCH V5] Btrfs: snapshot-aware defrag

2013-01-25 Thread Liu Bo
On Fri, Jan 25, 2013 at 08:55:58AM -0600, Mitch Harder wrote: On Wed, Jan 23, 2013 at 6:52 PM, Liu Bo bo.li@oracle.com wrote: On Wed, Jan 23, 2013 at 10:05:04AM -0600, Mitch Harder wrote: On Wed, Jan 23, 2013 at 1:51 AM, Liu Bo bo.li@oracle.com wrote: On Tue, Jan 22, 2013 at

Re: [PATCH] Btrfs-progs: remove btrfsctl, btrfs-show and btrfs-vol from default build

2013-01-25 Thread Stefan Behrens
On Fri, 25 Jan 2013 09:32:01 -0600, Eric Sandeen wrote: On 1/25/13 5:57 AM, Gene Czarcinski wrote: On 06/08/2012 02:00 PM, Stefan Behrens wrote: Remove btrfsctl, btrfs-show and btrfs-vol from all target of Makefile. TBH, unless there are objections, I'd rather remove the source files as

Re: [PATCH 01/10] Btrfs-progs: move open_file_or_dir() to utils.c

2013-01-25 Thread Eric Sandeen
On 1/24/13 1:42 PM, Eric Sandeen wrote: On 1/24/13 11:57 AM, Goffredo Baroncelli wrote: On 01/24/2013 10:23 AM, Stefan Behrens wrote: On Wed, 23 Jan 2013 22:39:29 -0600, Eric Sandeen wrote: instead of renaming keeping the btrfsctl.c copy There is a new momentum to improve the Btrfs-progs

[PATCH, RFC] mkfs: collapse redundant logic in custom_alloc_extent()

2013-01-25 Thread Eric Sandeen
It looks to me like the logic in these two if statements are overlapping. The test for flags BTRFS_BLOCK_GROUP_SYSTEM in the 2nd case should never get triggered, because it would have triggered on the first case, right? And since the actions are identical in both cases, this can be collapsed

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Eric Sandeen
On 1/25/13 9:04 AM, Gene Czarcinski wrote: OK, I think I have gotten the message that this is a bad idea as implemented and that it should be dropped as such. I believe that there are some things (btrfs fi show comes to mind) which will need root and I am going to explore doing something for

Re: [PATCH 01/10] Btrfs-progs: move open_file_or_dir() to utils.c

2013-01-25 Thread Eric Sandeen
On 1/24/13 4:09 PM, Goffredo Baroncelli wrote: On 01/24/2013 08:42 PM, Eric Sandeen wrote: On 1/24/13 11:57 AM, Goffredo Baroncelli wrote: On 01/24/2013 10:23 AM, Stefan Behrens wrote: On Wed, 23 Jan 2013 22:39:29 -0600, Eric Sandeen wrote: instead of renaming keeping the btrfsctl.c copy

Re: [PATCH 01/10] Btrfs-progs: move open_file_or_dir() to utils.c

2013-01-25 Thread Hugo Mills
On Fri, Jan 25, 2013 at 10:14:06AM -0600, Eric Sandeen wrote: On 1/24/13 4:09 PM, Goffredo Baroncelli wrote: On 01/24/2013 08:42 PM, Eric Sandeen wrote: On 1/24/13 11:57 AM, Goffredo Baroncelli wrote: On 01/24/2013 10:23 AM, Stefan Behrens wrote: On Wed, 23 Jan 2013 22:39:29 -0600, Eric

Re: [PATCH V5] Btrfs: snapshot-aware defrag

2013-01-25 Thread Mitch Harder
On Fri, Jan 25, 2013 at 9:42 AM, Liu Bo bo.li@oracle.com wrote: On Fri, Jan 25, 2013 at 08:55:58AM -0600, Mitch Harder wrote: On Wed, Jan 23, 2013 at 6:52 PM, Liu Bo bo.li@oracle.com wrote: On Wed, Jan 23, 2013 at 10:05:04AM -0600, Mitch Harder wrote: On Wed, Jan 23, 2013 at 1:51 AM,

Re: [PATCH 01/10] Btrfs-progs: move open_file_or_dir() to utils.c

2013-01-25 Thread Gene Czarcinski
On 01/25/2013 11:48 AM, Hugo Mills wrote: On Fri, Jan 25, 2013 at 10:14:06AM -0600, Eric Sandeen wrote: On 1/24/13 4:09 PM, Goffredo Baroncelli wrote: On 01/24/2013 08:42 PM, Eric Sandeen wrote: On 1/24/13 11:57 AM, Goffredo Baroncelli wrote: On 01/24/2013 10:23 AM, Stefan Behrens wrote: On

btrfs stability

2013-01-25 Thread Andrew McNabb
I tried creating a multi-device btrfs filesystem for the first time (on Fedora 18 with 3.7.2-204.fc18.x86_64), and I ran into some problems. I had heard that btrfs is now reasonably stable, and though I expected to possibly see a problem here or there, I was a little surprised at just how many

Re: btrfs stability

2013-01-25 Thread Josef Bacik
On Fri, Jan 25, 2013 at 01:05:14PM -0700, Andrew McNabb wrote: I tried creating a multi-device btrfs filesystem for the first time (on Fedora 18 with 3.7.2-204.fc18.x86_64), and I ran into some problems. I had heard that btrfs is now reasonably stable, and though I expected to possibly see a

Re: btrfs stability

2013-01-25 Thread Josef Bacik
On Fri, Jan 25, 2013 at 01:05:14PM -0700, Andrew McNabb wrote: I tried creating a multi-device btrfs filesystem for the first time (on Fedora 18 with 3.7.2-204.fc18.x86_64), and I ran into some problems. I had heard that btrfs is now reasonably stable, and though I expected to possibly see a

Re: btrfs stability

2013-01-25 Thread Andrew McNabb
On Fri, Jan 25, 2013 at 03:37:17PM -0500, Josef Bacik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=903794 This one is just a allocator warning because the relocator doesn't do the right accounting for relocation. It's just complainig, we need to fix it but it won't keep it from

Re: btrfs stability

2013-01-25 Thread Andrew McNabb
On Fri, Jan 25, 2013 at 03:53:22PM -0500, Josef Bacik wrote: Actually for this one, how did you remove the disk? Did you just yank it out while the box was running? Did you mount -o degraded and then delete the device and then remove it? How exactly did you get to this situation.

[RFC] Abort on memory allocation failure

2013-01-25 Thread Ian Kumlien
Hi, Could someone do a sanity check of this, i have removed some of the checking code that is no longer needed but i would prefer to have reviewers. I haven't looked much at the code, mainly been focusing on the grunt work ;) Anyway, thanks for looking at it! From

[RFC] add static compile target to make file

2013-01-25 Thread Ian Kumlien
Hi, This is something i have been hacking in several times when i have had odd issues or had to use a special version of btrfs-progs to handle issues. Anyway, thought i'd send something generic enough for everyone =). From 42f4bae2d2e8ee4a46a36454f7d9e3c63a6284d2 Mon Sep 17 00:00:00 2001 From:

Re: [RFC] Abort on memory allocation failure

2013-01-25 Thread cwillu
On Fri, Jan 25, 2013 at 4:55 PM, Ian Kumlien po...@vapor.com wrote: Hi, Could someone do a sanity check of this, i have removed some of the checking code that is no longer needed but i would prefer to have reviewers. I haven't looked much at the code, mainly been focusing on the grunt work

Re: [RFC] Abort on memory allocation failure

2013-01-25 Thread Ian Kumlien
On Fri, Jan 25, 2013 at 05:55:16PM -0600, cwillu wrote: On Fri, Jan 25, 2013 at 4:55 PM, Ian Kumlien po...@vapor.com wrote: Hi, Could someone do a sanity check of this, i have removed some of the checking code that is no longer needed but i would prefer to have reviewers. I haven't

Re: [RFC] Abort on memory allocation failure

2013-01-25 Thread Hugo Mills
On Sat, Jan 26, 2013 at 01:02:21AM +0100, Ian Kumlien wrote: On Fri, Jan 25, 2013 at 05:55:16PM -0600, cwillu wrote: On Fri, Jan 25, 2013 at 4:55 PM, Ian Kumlien po...@vapor.com wrote: Hi, Could someone do a sanity check of this, i have removed some of the checking code that is no

[PATCH] [RFC] Add static compile target

2013-01-25 Thread Ian Kumlien
Sometimes, when you least expect it, a static binary is what you need to rescue your data... Or just get a good enough handle on things to make it work again ;) make static is a gift to you, dear user with filesystem problems! --- Makefile | 4 1 file changed, 4 insertions(+) diff --git

[RFC] Abort on memory allocation failure, try three - using git send-email

2013-01-25 Thread Ian Kumlien
Sorry about that, selecting a range in git send-email isn't really ovious the first time you try to select a change in the middle of a log. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at

[PATCH] [RFC] Abort on memory allocation failure.

2013-01-25 Thread Ian Kumlien
declare btrfs_calloc|malloc|strdup|strndup, verify the memory and abort() if allocation fails. Please verify, there is a small glitch about strndup being redefined during compilation - haven't had time to figure out why this happened. Another issue is that there seems to be a malloc failure

[RFC] Add static build target, try two - using git send-email

2013-01-25 Thread Ian Kumlien
And this adds the static compile target... *phew* -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] [RFC] Add static compile target

2013-01-25 Thread Ian Kumlien
Sometimes, when you least expect it, a static binary is what you need to rescue your data... Or just get a good enough handle on things to make it work again ;) make static is a gift to you, dear user with filesystem problems! --- Makefile | 4 1 file changed, 4 insertions(+) diff --git

Integration branch of btrfs-progs 2013-01-26 [pullable]

2013-01-25 Thread David Sterba
Hi, here goes another set of fixes, a mix of old patches and some of them sent during last week. Part of it was included in the previous integration branch and thus has the ssd detection, device-ready support and superblock dump tool. There are lots of small fixes or cleanups and help string

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Russell Coker
On Sat, 26 Jan 2013, Gene Czarcinski g...@czarc.net wrote: OK, I think I have gotten the message that this is a bad idea as implemented and that it should be dropped as such. I believe that there are some things (btrfs fi show comes to mind) which will need root and I am going to explore

Re: [PATCH] Btrfs-progs: Exit if not running as root

2013-01-25 Thread Goffredo Baroncelli
On 01/26/2013 03:18 AM, Russell Coker wrote: On Sat, 26 Jan 2013, Gene Czarcinskig...@czarc.net wrote: OK, I think I have gotten the message that this is a bad idea as implemented and that it should be dropped as such. I believe that there are some things (btrfs fi show comes to mind) which