Re: An issue when mounting the dd-copied partition and the original one together

2012-04-20 Thread Chris Samuel
On Friday 20 April 2012 16:49:48 Tydus Ken wrote: I guess there's something wrong with btrfs in how to deal with two partition with same UUID or something else, but I'm not sure. I don't believe that btrfs can cope with partitions with the same UID. A pointer here from Auke in July 2011:

Re: An issue when mounting the dd-copied partition and the original one together

2012-04-20 Thread Jan Schmidt
Hi Chris, On 20.04.2012 09:20, Chris Samuel wrote: Jan Schmidt was working on a btrfs send type command to help with this, but I've not heard anything recently (last December he posted that he was distracted by the backref-walking code which was a necessary precursor for the send/receive

Re: Problems with nodatacow/nodatasum

2012-04-20 Thread David Sterba
On Fri, Apr 20, 2012 at 11:19:39AM +0300, Avi Kivity wrote: /dev/mapper/luks-blah / btrfs subvol=/rootvol1 1 /dev/mapper/luks-blah /var/lib/libvirt/images btrfs nodatasum,nodatacow,subvol=/images.libvirt1 2 what does /proc/mounts say about the

Re: Problems with nodatacow/nodatasum

2012-04-20 Thread Avi Kivity
On Fri, Apr 20, 2012 at 12:12 PM, David Sterba d...@jikos.cz wrote: On Fri, Apr 20, 2012 at 11:19:39AM +0300, Avi Kivity wrote:   /dev/mapper/luks-blah /                       btrfs subvol=/rootvol        1 1   /dev/mapper/luks-blah /var/lib/libvirt/images     btrfs

Ceph on btrfs 3.4rc

2012-04-20 Thread Christian Brunner
After running ceph on XFS for some time, I decided to try btrfs again. Performance with the current for-linux-min branch and big metadata is much better. The only problem (?) I'm still seeing is a warning that seems to occur from time to time: [87703.784552] [ cut here ]

[PATCH 4/4] mkfs: avoid heap-buffer-read-underrun for zero-length size arg

2012-04-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * mkfs.c (parse_size): ./mkfs.btrfs -A '' would read and possibly write the byte before beginning of strdup'd heap buffer. All other size-accepting options were similarly affected. --- mkfs.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 2/4] restore: don't corrupt stack for a zero-length command-line argument

2012-04-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Given a zero-length directory name, the trailing-slash removal code would test dir_name[-1], and if it were found to be a slash, would set it to '\0'. --- restore.c |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/restore.c

[PATCH 3/4] avoid strncpy-induced buffer overrun

2012-04-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * restore.c (main): Ensure strncpy-copied dir_name is NUL-terminated. * btrfsctl.c (main): Likewise, for a command-line argument. * utils.c (multiple functions): Likewise. * btrfs-list.c (add_root): Likewise. * btrfslabel.c (change_label_unmounted):

Re: [PATCH 2/4] restore: don't corrupt stack for a zero-length command-line argument

2012-04-20 Thread Josef Bacik
On Fri, Apr 20, 2012 at 07:36:46PM +0200, Jim Meyering wrote: From: Jim Meyering meyer...@redhat.com Given a zero-length directory name, the trailing-slash removal code would test dir_name[-1], and if it were found to be a slash, would set it to '\0'. --- restore.c |8 +++- 1

Re: [PATCH 2/4] restore: don't corrupt stack for a zero-length command-line argument

2012-04-20 Thread Josef Bacik
On Fri, Apr 20, 2012 at 07:36:46PM +0200, Jim Meyering wrote: From: Jim Meyering meyer...@redhat.com Given a zero-length directory name, the trailing-slash removal code would test dir_name[-1], and if it were found to be a slash, would set it to '\0'. --- restore.c |8 +++- 1

kernel bug in 3.4.0-rc3 after disconnecting/reconnecting drives

2012-04-20 Thread Remco Hosman
I managed to brake my test filesystem after several times disconnecting 1 disk, reconnecting it, disconnecting all disks at the same time (unplugging the USB enclosure they are in) and things like that. when i try to mount, i get this error in dmesg: [ 46.645732] btrfs: use zlib compression

Re: [PATCH 4/4] mkfs: avoid heap-buffer-read-underrun for zero-length size arg

2012-04-20 Thread Josef Bacik
On Fri, Apr 20, 2012 at 07:36:48PM +0200, Jim Meyering wrote: From: Jim Meyering meyer...@redhat.com * mkfs.c (parse_size): ./mkfs.btrfs -A '' would read and possibly write the byte before beginning of strdup'd heap buffer. All other size-accepting options were similarly affected. ---

Re: [PATCH 3/4] avoid strncpy-induced buffer overrun

2012-04-20 Thread Josef Bacik
On Fri, Apr 20, 2012 at 07:36:47PM +0200, Jim Meyering wrote: From: Jim Meyering meyer...@redhat.com * restore.c (main): Ensure strncpy-copied dir_name is NUL-terminated. * btrfsctl.c (main): Likewise, for a command-line argument. * utils.c (multiple functions): Likewise. * btrfs-list.c

Re: [PATCH 3/4] avoid strncpy-induced buffer overrun

2012-04-20 Thread Jim Meyering
Josef Bacik wrote: On Fri, Apr 20, 2012 at 07:36:47PM +0200, Jim Meyering wrote: From: Jim Meyering meyer...@redhat.com * restore.c (main): Ensure strncpy-copied dir_name is NUL-terminated. * btrfsctl.c (main): Likewise, for a command-line argument. * utils.c (multiple functions): Likewise.

btrfs-progs: minor buffer-overrun fixes (v2)

2012-04-20 Thread Jim Meyering
Same net result as before, but with the stray-parenthesis fix moved to 2/4 where it belongs, rather than buried in 3/4. Thanks to Josef for the reviews. Also, I fixed this in 3/4: - args.name[BTRFS_PATH_NAME_MAX-1] = 0; + args.name[BTRFS_SUBVOL_NAME_MAX-1] = 0; [PATCHv2 1/4] mkfs:

[PATCHv2 1/4] mkfs: use strdup in place of strlen,malloc,strcpy sequence

2012-04-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * mkfs.c (traverse_directory): No semantic change. Reviewed-by: Josef Bacik jo...@redhat.com --- mkfs.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mkfs.c b/mkfs.c index c531ef2..03239fb 100644 --- a/mkfs.c +++ b/mkfs.c @@

[PATCHv2 4/4] mkfs: avoid heap-buffer-read-underrun for zero-length size arg

2012-04-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * mkfs.c (parse_size): ./mkfs.btrfs -A '' would read and possibly write the byte before beginning of strdup'd heap buffer. All other size-accepting options were similarly affected. Reviewed-by: Josef Bacik jo...@redhat.com --- cmds-subvolume.c |2 +-

[PATCHv2 3/4] avoid several strncpy-induced buffer overruns

2012-04-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * restore.c (main): Ensure strncpy-copied dir_name is NUL-terminated. * btrfsctl.c (main): Likewise, for a command-line argument. * utils.c (multiple functions): Likewise. * btrfs-list.c (add_root): Likewise. * btrfslabel.c (change_label_unmounted):

[PATCHv2 2/4] restore: don't corrupt stack for a zero-length command-line argument

2012-04-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Given a zero-length directory name, the trailing-slash removal code would test dir_name[-1], and if it were found to be a slash, would set it to '\0'. Reviewed-by: Josef Bacik jo...@redhat.com --- restore.c |8 +++- 1 file changed, 3 insertions(+),

[PATCH] Btrfs: end writeback on pages before finishing ordered extents

2012-04-20 Thread Josef Bacik
So we have a slight deadlock issue where somebody will be trying to make an allocation while holding a tree lock and then be forced to wait while we flush out data. Well our flushers will then try to finish the ordered io and get stuck on this lock and we will deadlock. The thing is we don't

Re: [PATCH v3] btrfs: fix early abort in 'remount'

2012-04-20 Thread Josef Bacik
On Thu, Apr 19, 2012 at 01:27:38AM +0300, Sergei Trofimovich wrote: From: Sergei Trofimovich sly...@gentoo.org Cc: Jeff Mahoney je...@suse.com Cc: Chris Mason chris.ma...@oracle.com Reviewed-by: Josef Bacik jo...@redhat.com Reviewed-by: Sergey V. sftp.mt...@gmail.com Signed-off-by: Sergei

Implementing encryption. Any specs?

2012-04-20 Thread Amadeus G.
Hi, I would like to make a go at implementing encryption. Can anyone provide specs for how it should be? Regards A.G. -- 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

Re: Problems with nodatacow/nodatasum

2012-04-20 Thread Chris Mason
On Fri, Apr 20, 2012 at 12:22:11PM +0300, Avi Kivity wrote: On Fri, Apr 20, 2012 at 12:12 PM, David Sterba d...@jikos.cz wrote: On Fri, Apr 20, 2012 at 11:19:39AM +0300, Avi Kivity wrote:   /dev/mapper/luks-blah /                       btrfs subvol=/rootvol        1 1