[PATCH 1/2] Btrfs-progs: set string end sing '\0' for property

2014-04-25 Thread Liu Bo
Set string xattr_name 's end with '\0' so that it won't be violated in memory. With this fix, xfstest/btrfs/048 can pass on my box. Signed-off-by: Liu Bo bo.li@oracle.com --- props.c | 1 + 1 file changed, 1 insertion(+) diff --git a/props.c b/props.c index 4d0aeea..53223a3 100644 ---

[PATCH 1/2] Btrfs-progs: set string end sing '\0' for property

2014-04-25 Thread Liu Bo
Set string xattr_name 's end with '\0' so that it won't be violated in memory. With this fix, xfstest/btrfs/048 can pass on my box. Signed-off-by: Liu Bo bo.li@oracle.com --- props.c | 1 + 1 file changed, 1 insertion(+) diff --git a/props.c b/props.c index 4d0aeea..53223a3 100644 ---

[PATCH 2/2] Btrfs-progs: open file with O_RDONLY on getting property

2014-04-25 Thread Liu Bo
We don't need change an object when getting its property, so O_RDWR is not necessary in this case. Moreover, the object may be readonly, with O_RDWR it will fail. Signed-off-by: Liu Bo bo.li@oracle.com --- props.c | 5 - utils.c | 14 -- utils.h | 1 + 3 files changed, 17

Re: Can anyone boot a system using btrfs root with linux 3.14 or newer?

2014-04-25 Thread Duncan
Chris Mason posted on Thu, 24 Apr 2014 20:08:28 -0400 as excerpted: On 04/24/2014 08:04 PM, Chris Murphy wrote: So I don't think the order is it. The biggest difference I'm seeing between the 3.13.11 and 3.14.1 dmesg's provided: 3.13.11: [1.861740] bio: create slab bio-1 at 1 [

Re: how to cancel scrub which got aborted due to hardly switching off the machine?

2014-04-25 Thread George Eleftheriou
rm /var/lib/btrfs/scrub-bla-bla-bla-bla On Fri, Apr 18, 2014 at 7:18 PM, Martin Steigerwald mar...@lichtvoll.de wrote: Hello, I have: merkaba:/mnt#1 btrfs scrub status -d /home scrub status for […] scrub device /dev/dm-0 (id 1) status scrub started at Fri Apr 18 17:48:10 2014,

Re: [PATCH 2/2] Btrfs-progs: open file with O_RDONLY on getting property

2014-04-25 Thread Filipe David Manana
On Fri, Apr 25, 2014 at 7:29 AM, Liu Bo bo.li@oracle.com wrote: We don't need change an object when getting its property, so O_RDWR is not necessary in this case. Moreover, the object may be readonly, with O_RDWR it will fail. This was already addressed here Liu:

Re: [PATCH 1/2] Btrfs-progs: set string end sing '\0' for property

2014-04-25 Thread Filipe David Manana
On Fri, Apr 25, 2014 at 7:29 AM, Liu Bo bo.li@oracle.com wrote: Set string xattr_name 's end with '\0' so that it won't be violated in memory. With this fix, xfstest/btrfs/048 can pass on my box. Signed-off-by: Liu Bo bo.li@oracle.com --- props.c | 1 + 1 file changed, 1

Re: [PATCH] Btrfs-progs: allow compression property gets for read-only subvolumes

2014-04-25 Thread Liu Bo
On Tue, Apr 15, 2014 at 08:47:27PM +0100, Filipe David Borba Manana wrote: Because the function open_file_or_dir() always opened the input file in read/write mode (O_RDWR), we were not able to due a compression property get against a file living in a read-only subvolume/snapshot. Fix this by

Re: [PATCH 1/2] Btrfs-progs: set string end sing '\0' for property

2014-04-25 Thread Liu Bo
On Fri, Apr 25, 2014 at 11:07:49AM +0100, Filipe David Manana wrote: On Fri, Apr 25, 2014 at 7:29 AM, Liu Bo bo.li@oracle.com wrote: Set string xattr_name 's end with '\0' so that it won't be violated in memory. With this fix, xfstest/btrfs/048 can pass on my box. Signed-off-by:

Re: [PATCH 2/2] Btrfs-progs: open file with O_RDONLY on getting property

2014-04-25 Thread Liu Bo
On Fri, Apr 25, 2014 at 11:04:39AM +0100, Filipe David Manana wrote: On Fri, Apr 25, 2014 at 7:29 AM, Liu Bo bo.li@oracle.com wrote: We don't need change an object when getting its property, so O_RDWR is not necessary in this case. Moreover, the object may be readonly, with O_RDWR it

Re: how to cancel scrub which got aborted due to hardly switching off the machine?

2014-04-25 Thread Martin Steigerwald
Am Freitag, 25. April 2014, 11:40:28 schrieben Sie: On Fri, Apr 18, 2014 at 7:18 PM, Martin Steigerwald mar...@lichtvoll.de wrote: Hello, I have: merkaba:/mnt#1 btrfs scrub status -d /home scrub status for […] scrub device /dev/dm-0 (id 1) status scrub started at

[PATCH v2] Btrfs-progs: set string end sing '\0' for property

2014-04-25 Thread Liu Bo
Set string xattr_name 's end with '\0' so that it won't be violated in memory. With this fix, xfstest/btrfs/048 can pass on my box. Signed-off-by: Liu Bo bo.li@oracle.com --- v2: avoid buffer overflow of malloc(). props.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff

Re: [PATCH v2] Btrfs-progs: set string end sing '\0' for property

2014-04-25 Thread Filipe David Manana
On Fri, Apr 25, 2014 at 11:44 AM, Liu Bo bo.li@oracle.com wrote: Set string xattr_name 's end with '\0' so that it won't be violated in memory. With this fix, xfstest/btrfs/048 can pass on my box. Signed-off-by: Liu Bo bo.li@oracle.com Reviewed-by: Filipe Manana fdman...@gmail.com

[PATCH] btrfs: Remove unnecessary check for NULL

2014-04-25 Thread Tobias Klauser
iput() already checks for the inode being NULL, thus it's unnecessary to check before calling. Signed-off-by: Tobias Klauser tklau...@distanz.ch --- fs/btrfs/scrub.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index

Re: Which companies are using Btrfs in production?

2014-04-25 Thread David Sterba
On Thu, Apr 24, 2014 at 04:14:56PM -0700, Marc MERLIN wrote: Netgear uses BTRFS as the filesystem in their refreshed ReadyNAS line. They apparently use Oracle's linux distro so I assume they're relying on them to do most of the heavy lifting as far as support BTRFS and backporting goes

Re: Which companies are using Btrfs in production?

2014-04-25 Thread Chris Mason
On 04/25/2014 10:47 AM, David Sterba wrote: On Thu, Apr 24, 2014 at 04:14:56PM -0700, Marc MERLIN wrote: Netgear uses BTRFS as the filesystem in their refreshed ReadyNAS line. They apparently use Oracle's linux distro so I assume they're relying on them to do most of the heavy lifting as far as

safe/necessary to balance system chunks?

2014-04-25 Thread Steve Leung
Hi list, I've got a 3-device RAID1 btrfs filesystem that started out life as single-device. btrfs fi df: Data, RAID1: total=1.31TiB, used=1.07TiB System, RAID1: total=32.00MiB, used=224.00KiB System, DUP: total=32.00MiB, used=32.00KiB System, single: total=4.00MiB, used=0.00 Metadata,

Re: Which companies are using Btrfs in production?

2014-04-25 Thread Marc MERLIN
On Fri, Apr 25, 2014 at 04:47:04PM +0200, David Sterba wrote: On Thu, Apr 24, 2014 at 04:14:56PM -0700, Marc MERLIN wrote: Netgear uses BTRFS as the filesystem in their refreshed ReadyNAS line. They apparently use Oracle's linux distro so I assume they're relying on them to do most of

Re: Which companies are using Btrfs in production?

2014-04-25 Thread ronnie sahlberg
On Fri, Apr 25, 2014 at 8:20 AM, Marc MERLIN m...@merlins.org wrote: On Fri, Apr 25, 2014 at 04:47:04PM +0200, David Sterba wrote: On Thu, Apr 24, 2014 at 04:14:56PM -0700, Marc MERLIN wrote: Netgear uses BTRFS as the filesystem in their refreshed ReadyNAS line. They apparently use

Re: safe/necessary to balance system chunks?

2014-04-25 Thread Chris Murphy
On Apr 25, 2014, at 8:57 AM, Steve Leung sjle...@shaw.ca wrote: Hi list, I've got a 3-device RAID1 btrfs filesystem that started out life as single-device. btrfs fi df: Data, RAID1: total=1.31TiB, used=1.07TiB System, RAID1: total=32.00MiB, used=224.00KiB System, DUP:

Re: safe/necessary to balance system chunks?

2014-04-25 Thread Austin S Hemmelgarn
On 2014-04-25 13:24, Chris Murphy wrote: On Apr 25, 2014, at 8:57 AM, Steve Leung sjle...@shaw.ca wrote: Hi list, I've got a 3-device RAID1 btrfs filesystem that started out life as single-device. btrfs fi df: Data, RAID1: total=1.31TiB, used=1.07TiB System, RAID1: total=32.00MiB,

Re: safe/necessary to balance system chunks?

2014-04-25 Thread Steve Leung
On 04/25/2014 12:12 PM, Austin S Hemmelgarn wrote: On 2014-04-25 13:24, Chris Murphy wrote: On Apr 25, 2014, at 8:57 AM, Steve Leung sjle...@shaw.ca wrote: I've got a 3-device RAID1 btrfs filesystem that started out life as single-device. btrfs fi df: Data, RAID1: total=1.31TiB,

Re: safe/necessary to balance system chunks?

2014-04-25 Thread Austin S Hemmelgarn
On 2014-04-25 14:43, Steve Leung wrote: On 04/25/2014 12:12 PM, Austin S Hemmelgarn wrote: On 2014-04-25 13:24, Chris Murphy wrote: On Apr 25, 2014, at 8:57 AM, Steve Leung sjle...@shaw.ca wrote: I've got a 3-device RAID1 btrfs filesystem that started out life as single-device. btrfs fi

Re: safe/necessary to balance system chunks?

2014-04-25 Thread Hugo Mills
On Fri, Apr 25, 2014 at 02:12:17PM -0400, Austin S Hemmelgarn wrote: On 2014-04-25 13:24, Chris Murphy wrote: On Apr 25, 2014, at 8:57 AM, Steve Leung sjle...@shaw.ca wrote: Hi list, I've got a 3-device RAID1 btrfs filesystem that started out life as single-device. btrfs fi

[PATCH] Btrfs-progs: mkfs: remove ununsed parameters

2014-04-25 Thread Rakesh Pandit
Remove ununsed parameters since 71d6bd3c in create_raid_groups. Signed-off-by: Rakesh Pandit rak...@tuxera.com --- mkfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkfs.c b/mkfs.c index dbd83f5..35917f1 100644 --- a/mkfs.c +++ b/mkfs.c @@ -210,7 +210,7 @@ static int

Re: safe/necessary to balance system chunks?

2014-04-25 Thread Duncan
Austin S Hemmelgarn posted on Fri, 25 Apr 2014 14:12:17 -0400 as excerpted: On 2014-04-25 13:24, Chris Murphy wrote: On Apr 25, 2014, at 8:57 AM, Steve Leung sjle...@shaw.ca wrote: Assuming this is something that needs to be fixed, would I be able to fix this by balancing the system

[PATCH] Btrfs: read inode size after acquiring the mutex when punching a hole

2014-04-25 Thread Filipe David Borba Manana
In a previous change, commit 12870f1c9b2de7d475d22e73fd7db1b418599725, I accidentally moved the roundup of inode-i_size to outside of the critical section delimited by the inode mutex, which is not atomic and not correct since the size can be changed by other task before we acquire the mutex.

Re: safe/necessary to balance system chunks?

2014-04-25 Thread Duncan
Steve Leung posted on Fri, 25 Apr 2014 12:43:12 -0600 as excerpted: On 04/25/2014 12:12 PM, Austin S Hemmelgarn wrote: Personally, I would recommend making a full backup of all the data (tar works wonderfully for this), and recreate the entire filesystem from scratch, but passing all three

Re: safe/necessary to balance system chunks?

2014-04-25 Thread Chris Murphy
On Apr 25, 2014, at 12:43 PM, Steve Leung sjle...@shaw.ca wrote: Once everything gets rebalanced though, I don't think I'd be missing out on any features, would I? The default nodesize/leafsize is 16KB since btrfs-progs v3.12. This isn't changed with a balance. The difference between the

Re: safe/necessary to balance system chunks?

2014-04-25 Thread Chris Murphy
On Apr 25, 2014, at 5:03 PM, Duncan 1i5t5.dun...@cox.net wrote: But since -m/metadata includes -s/ system by default, and that was the intended way of doing things, -f/force was added as necessary when doing only -s/system, since presumably that was considered an artificial distinction, and

btrfsck is using far too much memory

2014-04-25 Thread Christian Robert
btrfsck is using far too much memory ! I tryed a btrfsck on my /dev/md127 (13T) and had to kill it because btrfsck used 7.8 Gigs of ram ( machine have 8 Gigs of ram, plus four Gigs on swap when I killed it) btrfsck should not try to bring in memory the whole metadata, etc. my 2 cents, (will

Re: safe/necessary to balance system chunks?

2014-04-25 Thread Steve Leung
On Fri, 25 Apr 2014, Chris Murphy wrote: On Apr 25, 2014, at 12:43 PM, Steve Leung sjle...@shaw.ca wrote: Once everything gets rebalanced though, I don't think I'd be missing out on any features, would I? The default nodesize/leafsize is 16KB since btrfs-progs v3.12. This isn't changed

Re: safe/necessary to balance system chunks?

2014-04-25 Thread Duncan
Austin S Hemmelgarn posted on Fri, 25 Apr 2014 15:07:40 -0400 as excerpted: I actually have a similar situation with how I have my desktop system set up, when I go about recreating the filesystem (which I do every time I upgrade either the tools or the kernel), Wow. Given that I run a git

Re: safe/necessary to balance system chunks?

2014-04-25 Thread Chris Murphy
On Apr 25, 2014, at 8:56 PM, Steve Leung sjle...@shaw.ca wrote: Incidentally, is there a way for someone to tell what the node size currently is for a btrfs filesystem? I never noticed that info printed anywhere from any of the btrfs utilities. btrfs-show-super In case anyone's

Re: safe/necessary to balance system chunks?

2014-04-25 Thread Duncan
Chris Murphy posted on Fri, 25 Apr 2014 19:41:43 -0600 as excerpted: OK so somehow in Steve's conversion, metadata was converted from DUP to RAID1 completely, but some portion of system was left as DUP, incompletely converted to RAID1. It doesn't seem obvious that -mconvert is what he'd use

Re: safe/necessary to balance system chunks?

2014-04-25 Thread Duncan
Steve Leung posted on Fri, 25 Apr 2014 20:56:06 -0600 as excerpted: Incidentally, is there a way for someone to tell what the node size currently is for a btrfs filesystem? I never noticed that info printed anywhere from any of the btrfs utilities. btrfs-show-super device displays that,