Re: Should btrfs reuse the src_dev's dev UUID when doing dev replacing?

2014-06-02 Thread Qu Wenruo
Original Message Subject: Re: Should btrfs reuse the src_dev's dev UUID when doing dev replacing? From: Anand Jain To: Qu Wenruo , linux-btrfs Date: 2014年05月22日 11:09 Thanks Qu for bringing up this topic. We definitely need some focus on the btrfs volume management re

Re: Should btrfs reuse the src_dev's dev UUID when doing dev replacing?

2014-06-02 Thread Qu Wenruo
Original Message Subject: Re: Should btrfs reuse the src_dev's dev UUID when doing dev replacing? From: Anand Jain To: Qu Wenruo , linux-btrfs Date: 2014年05月22日 11:09 Thanks Qu for bringing up this topic. We definitely need some focus on the btrfs volume management re

[PATCH] btrfs-progs: Documentation: Add filter section for btrfs-balance.

2014-06-02 Thread Qu Wenruo
Man page for 'btrfs-balance' mentioned but does not explain them, which make end users hard to use '-d', '-m' or '-s options. This patch will use the explanations from https://btrfs.wiki.kernel.org/index.php/Balance_Filters to enrich the man page. Signed-off-by: Qu Wenruo --- Documentation/btr

[PATCH 1/1] btrfs-progs: fix build, manpage compression command

2014-06-02 Thread Christian Hesse
man pages for btrfs-progs are compressed by gzip by default. In Makefile the variable GZIP is use, this evaluates to 'gzip gzip' on my system. >From man gzip: > The environment variable GZIP can hold a set of default options for > gzip. These options are interpreted first and can be overwritten by

Re: All free space eaten during defragmenting (3.14)

2014-06-02 Thread Duncan
Peter Chant posted on Mon, 02 Jun 2014 21:54:56 +0100 as excerpted: >> What I /meant/ was "only defragging what you pointed the defrag at", >> not the other snapshots of the same subvolume. "Mounted" shouldn't >> have anything to do with it, except that I didn't consider the >> possibility of hav

Re: [PATCH 3/4] btrfs: dev replace should replace the sysfs entry

2014-06-02 Thread Anand Jain
inline below. On 30/05/2014 15:40, Anand Jain wrote: On 29/05/14 21:29, David Sterba wrote: On Mon, May 26, 2014 at 05:30:25PM +0800, Anand Jain wrote: when we replace the device its corresponding sysfs entry has to be replaced as well Signed-off-by: Anand Jain --- fs/btrfs/dev-replace

Re: [PATCH v2 1/4] Btrfs-progs: fsck: only allow partial opening under repair mode

2014-06-02 Thread Wang Shilong
On 06/03/2014 12:18 AM, David Sterba wrote: On Thu, May 29, 2014 at 05:59:56PM +0800, Wang Shilong wrote: The reason that we allow partial opening is that sometimes, we may have some corrupted trees.(for example extent tree), for fsck repair case, the broken tree may be rebuilt later. So if use

[PATCH 4/6 v2] btrfs: dev replace should replace the sysfs entry

2014-06-02 Thread Anand Jain
when we replace the device its corresponding sysfs entry has to be replaced as well Signed-off-by: Anand Jain --- v2: the function name change applied here fs/btrfs/dev-replace.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index 9f22

[PATCH 3/6 v2] btrfs: dev add should add its sysfs entry

2014-06-02 Thread Anand Jain
we would need the device links to be created, when device is added. Signed-off-by: Anand Jain --- v2: the function name change applied here fs/btrfs/sysfs.c | 12 +--- fs/btrfs/sysfs.h | 2 ++ fs/btrfs/volumes.c | 5 + 3 files changed, 16 insertions(+), 3 deletions(-) diff -

[PATCH 1/6 v2] btrfs: rename add_device_membership to btrfs_kobj_add_device

2014-06-02 Thread Anand Jain
From: Anand Jain Signed-off-by: Anand Jain --- v2: this is a new patch in the patch-set sent before, as per the review comments. Thanks David. fs/btrfs/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 522d023..41b0672

[PATCH 2/6 v2] btrfs: dev delete should remove sysfs entry

2014-06-02 Thread Anand Jain
when we delete the device from the mounted btrfs, we would need its corresponding sysfs enty to be removed as well. Signed-off-by: Anand Jain --- v2: the function name change applied here fs/btrfs/sysfs.c | 20 fs/btrfs/sysfs.h | 2 ++ fs/btrfs/volumes.c | 4 3

[PATCH 6/6 RFC v2] btrfs: revamp /sys/fs/btrfs//devices

2014-06-02 Thread Anand Jain
From: Anand Jain As of now with out this patch the sysfs interface under dir /sys/fs/btrfs//devices is just link to the block devs. Moving forward we would need the above btrfs sysfs path to contain more info about the btrfs devices. So this patch provides a framework for the same. And as of no

[PATCH 0/6 v2] update sysfs per btrfs device operations

2014-06-02 Thread Anand Jain
This patch set fixes the bugs which Jeff patch is fixing, which is to update sysfs when device is added and removed. Further, this patch set also address the following. - Update sysfs path when device is replaced - Update sysfs path when sprout is created Also mainly this patch makes the code

[PATCH 5/6 v2] btrfs: create sprout should rename fsid on the sysfs as well

2014-06-02 Thread Anand Jain
Creating sprout will change the fsid of the mounted root. do the same on the sysfs as well. reproducer: mount /dev/sdb /btrfs (seed disk) btrfs dev add /dev/sdc /btrfs mount -o rw,remount /btrfs btrfs dev del /dev/sdb /btrfs mount /dev/sdb /btrfs Error: kobject_add_internal failed for fe3504

Re: [PATCH v2 3/4] Btrfs-progs: fsck: deal with corrupted csum root

2014-06-02 Thread Wang Shilong
On 06/03/2014 01:27 AM, David Sterba wrote: On Thu, May 29, 2014 at 05:59:57PM +0800, Wang Shilong wrote: If checksum root is corrupted, fsck will get segmentation. This is because if we fail to load checksum root, root's node is NULL which cause NULL pointer deferences later. To fix this probl

Re: [PATCH 4/4] btrfs: create sprout should rename fsid on the sysfs as well

2014-06-02 Thread Anand Jain
On 02/06/2014 23:39, David Sterba wrote: On Mon, Jun 02, 2014 at 04:22:20PM +0800, Anand Jain wrote: --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2084,6 +2084,7 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) mutex_unlock(&root->fs_info->fs_devices->d

Re: [PATCH 0/8] Add support for LZ4 compression

2014-06-02 Thread Mitch Harder
On Sat, May 31, 2014 at 6:48 PM, Philip Worrall wrote: > LZ4 is a lossless data compression algorithm that is focused on > compression and decompression speed. LZ4 gives a slightly worse > compression ratio compared with LZO (and much worse than Zlib) > but compression speeds are *generally* simil

Re: [RFC 00/32] making inode time stamps y2038 ready

2014-06-02 Thread H. Peter Anvin
On 06/02/2014 12:55 PM, Arnd Bergmann wrote: >> >> The bit that is really going to hurt is every single ioctl that uses a >> timespec. >> >> Honestly, though, I really don't understand the point with "struct >> inode_time". It seems like the zeroeth-order thing is to change the >> kernel internal

Re: [RFC 00/32] making inode time stamps y2038 ready

2014-06-02 Thread Joseph S. Myers
On Mon, 2 Jun 2014, Arnd Bergmann wrote: > Ok. Sorry about missing linux-api, I confused it with linux-arch, which > may not be as relevant here, except for the one question whether we > actually want to have the new ABI on all 32-bit architectures or only > as an opt-in for those that expect to s

Re: All free space eaten during defragmenting (3.14)

2014-06-02 Thread Peter Chant
On 06/01/2014 11:47 PM, Duncan wrote: >>> Here's the deal. Due to scaling issues the original snapshot aware >>> defrag code was recently disabled, so defrag now doesn't worry about >>> snapshots, only defragging whatever is currently mounted. If you have >>> a lot of fragmentation and are using

Re: [RFC 00/32] making inode time stamps y2038 ready

2014-06-02 Thread Arnd Bergmann
On Monday 02 June 2014 12:26:22 H. Peter Anvin wrote: > On 06/02/2014 12:19 PM, Arnd Bergmann wrote: > > On Monday 02 June 2014 13:52:19 Joseph S. Myers wrote: > >> On Fri, 30 May 2014, Arnd Bergmann wrote: > >> > >>> a) is this the right approach in general? The previous discussion > >>>pointe

Re: superblock corruption, cannot obtain data

2014-06-02 Thread Shaun Reich
Tl;dr tried nearly everything, couldn't get it to recover, gave up and restored my old backup. I was running the newest Archlinux kernel release. .. Extracting data with Btrfs restore was quite useless, Btrfs find root didn't list any object id's either, which I was unsure why. I guess I was just

Re: [RFC 00/32] making inode time stamps y2038 ready

2014-06-02 Thread H. Peter Anvin
On 06/02/2014 12:19 PM, Arnd Bergmann wrote: > On Monday 02 June 2014 13:52:19 Joseph S. Myers wrote: >> On Fri, 30 May 2014, Arnd Bergmann wrote: >> >>> a) is this the right approach in general? The previous discussion >>>pointed this way, but there may be other opinions. >> >> The syscall cha

Re: [RFC 00/32] making inode time stamps y2038 ready

2014-06-02 Thread Arnd Bergmann
On Monday 02 June 2014 13:52:19 Joseph S. Myers wrote: > On Fri, 30 May 2014, Arnd Bergmann wrote: > > > a) is this the right approach in general? The previous discussion > >pointed this way, but there may be other opinions. > > The syscall changes seem like the sort of thing I'd expect, alth

some project ideas: NFS4 ACLs, resilience on the same device, allowing to specify which devices are "distinct" in a RAID

2014-06-02 Thread Christoph Anton Mitterer
Hi. Christian Kujau suggested in the wiki[] to post project ideas to the list to give them some possible wider discussion. So far I've had these ideas: 1) NFS 4 ACLs[1] Not sure whether it has been proposed and/or rejected before),... but it would be nice if it was a goal for btrfs to support NF

Re: [PATCH] btrfs-progs: Add dev uuid output for print_dev_item().

2014-06-02 Thread David Sterba
On Thu, May 29, 2014 at 08:52:04PM +0100, Mike Fleetwood wrote: > On 29 May 2014 02:02, Qu Wenruo wrote: > > The original print_dev_item() only prints device id,total bytes and > > bytes used. > > When it comes to debug things related to duplicated device id, dev uuid > > is needed to distinguish

Re: [PATCH v2 3/4] Btrfs-progs: fsck: deal with corrupted csum root

2014-06-02 Thread David Sterba
On Thu, May 29, 2014 at 05:59:57PM +0800, Wang Shilong wrote: > If checksum root is corrupted, fsck will get segmentation. This > is because if we fail to load checksum root, root's node is NULL which > cause NULL pointer deferences later. > > To fix this problem, we just did something like extent

Re: [PATCH v2 1/4] Btrfs-progs: fsck: only allow partial opening under repair mode

2014-06-02 Thread David Sterba
On Thu, May 29, 2014 at 05:59:56PM +0800, Wang Shilong wrote: > The reason that we allow partial opening is that sometimes, > we may have some corrupted trees.(for example extent tree), for > fsck repair case, the broken tree may be rebuilt later. > > So if users only want to do check but not repa

Re: btrfs-receive rename error

2014-06-02 Thread Filipe David Manana
On Thu, May 29, 2014 at 4:32 PM, Rasmus Eskola wrote: > Hi, > > I'm trying to send an incremental backup of a btrfs subvolume to > another host using the command: > > sudo btrfs send -v /home/backup/2014-05-29_02:26:38 | ssh "root@s" > "btrfs receive -v /btrfs/backup_bulky/home" > > Eventually it

Re: [PATCH 1/4] Btrfs-progs: fsck: only allow partial opening under repair mode

2014-06-02 Thread David Sterba
On Wed, May 28, 2014 at 07:20:38PM +0800, Wang Shilong wrote: > --- a/cmds-check.c > +++ b/cmds-check.c > @@ -6810,8 +6810,7 @@ int cmd_check(int argc, char **argv) > int option_index = 0; > int init_csum_tree = 0; > int qgroup_report = 0; > - enum btrfs_open_ctree_flags ctree

Re: [PATCH 4/4] btrfs: create sprout should rename fsid on the sysfs as well

2014-06-02 Thread David Sterba
On Mon, Jun 02, 2014 at 04:22:20PM +0800, Anand Jain wrote: > >>--- a/fs/btrfs/volumes.c > >>+++ b/fs/btrfs/volumes.c > >>@@ -2084,6 +2084,7 @@ int btrfs_init_new_device(struct btrfs_root *root, > >>char *device_path) > >>mutex_unlock(&root->fs_info->fs_devices->device_list_mutex); > >> > >>

Re: [RFC 00/32] making inode time stamps y2038 ready

2014-06-02 Thread Joseph S. Myers
On Fri, 30 May 2014, Arnd Bergmann wrote: > a) is this the right approach in general? The previous discussion >pointed this way, but there may be other opinions. The syscall changes seem like the sort of thing I'd expect, although patches adding new syscalls or otherwise affecting the kernel

Re: What to do about snapshot-aware defrag

2014-06-02 Thread Josef Bacik
On 05/30/2014 06:00 PM, Martin wrote: OK... I'll jump in... On 30/05/14 21:43, Josef Bacik wrote: Hello, TL;DR: I want to only do snapshot-aware defrag on inodes in snapshots that haven't changed since the snapshot was taken. Yay or nay (with a reason why for nay) [...] === Summary and wh

Re: What to do about snapshot-aware defrag

2014-06-02 Thread Josef Bacik
On 06/01/2014 11:07 PM, Mitch Harder wrote: On Sat, May 31, 2014 at 6:51 PM, Brendan Hide wrote: On 2014/05/31 12:00 AM, Martin wrote: OK... I'll jump in... On 30/05/14 21:43, Josef Bacik wrote: [snip] Option 1: Only relink inodes that haven't changed since the snapshot was taken. Pros:

Re: [PATCH 4/4] btrfs: create sprout should rename fsid on the sysfs as well

2014-06-02 Thread Anand Jain
On 29/05/14 20:54, David Sterba wrote: On Mon, May 26, 2014 at 05:30:26PM +0800, Anand Jain wrote: --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2084,6 +2084,7 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) mutex_unlock(&root->fs_info->fs_devices->d

Re: 3.15-rc6 - btrfs-transacti:4157 blocked for more than 120 seconds.

2014-06-02 Thread Torbjørn
On 01. juni 2014 23:29, Marc MERLIN wrote: On Wed, May 28, 2014 at 04:56:56PM +0200, Torbjørn wrote: On 05/28/2014 03:41 PM, Chris Mason wrote: On 05/28/2014 01:53 AM, Torbjørn wrote: It's actually a raid10 array of 11 dm-crypt devices. I'm able to read data from the array (accessing files),