Re: [PATCH] btrfs-progs: receive explicit parent support

2015-04-27 Thread Stefan Behrens
On Sun, 26 Apr 2015 12:12:45 +0200, Lauri Võsandi wrote: > This patch adds command-line flag -p to btrfs receive > which makes it possible to disable automatic parent > search for incremental snapshots and use explicitly > specified path instead. > > Signed-off-by: Lauri Võsandi > --- > cmds-rec

[PATCH 3/8] Btrfs: rename btrfs_dev_replace_find_srcdev()

2015-04-27 Thread Anand Jain
The patch renames btrfs_dev_replace_find_srcdev() to btrfs_find_device_by_user_input() so that it can be used by btrfs_rm_device() as well in the next patches. Signed-off-by: Anand Jain --- fs/btrfs/dev-replace.c | 24 +--- fs/btrfs/volumes.c | 19 +++ fs/

[PATCH 0/8 v2] device delete by devid

2015-04-27 Thread Anand Jain
Kernel patch of device delete by devid. Now also includes possible code optimization. Some of the codes are common between delete device and replace device. This patch will use functions to reuse those codes, mainly the get btrfs_device structure of the source device, and scratch the source device

[PATCH 7/8] Btrfs: fix btrfs_scratch_superblock() with fixes from device delete

2015-04-27 Thread Anand Jain
This patch updates the btrfs_scratch_superblock(), (which is used by the replace device thread), with those fixes from the scratch superblock code section of btrfs_rm_device(). The fixes are: Scratch all copies of superblock Notify kobject that superblock has been changed Update time on the d

[PATCH 5/8] Btrfs: use btrfs_find_device_by_user_input()

2015-04-27 Thread Anand Jain
btrfs_rm_device() has a section of the code which can be replaced btrfs_find_device_by_user_input() Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 84 -- 1 file changed, 19 insertions(+), 65 deletions(-) diff --git a/fs/btrfs/volumes.c b/f

[PATCH 2/8] Btrfs: move check for min number of devices to a function

2015-04-27 Thread Anand Jain
btrfs_rm_device() has a section of the code to check for min number of the devices required by various group profile. This patch move that part of the code in the function __check_raid_min_devices() Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 78 ++-

[PATCH V2 1/8] Btrfs: device delete by devid

2015-04-27 Thread Anand Jain
This introduces BTRFS_IOC_RM_DEV_V2, which can accept devid as an argument to delete the device. Current only choice to is to pass device path for the device delete cli, but if btrfs is unable to read device SB, then cli fails. And user won't be able to delete the device. With this patch now the

[PATCH 6/8] Btrfs: add btrfs_read_dev_one_super() to read one specific SB

2015-04-27 Thread Anand Jain
This uses a chunk of code from btrfs_read_dev_super() and creates a function called btrfs_read_dev_one_super() so that next patch can use it for scratch superblock. Signed-off-by: Anand Jain --- fs/btrfs/disk-io.c | 54 ++ fs/btrfs/disk-io.h |

[PATCH 4/8] Btrfs: use BTRFS_ERROR_DEV_MISSING_NOT_FOUND when missing device is not found

2015-04-27 Thread Anand Jain
use btrfs specific error code BTRFS_ERROR_DEV_MISSING_NOT_FOUND instead of -ENOENT. Next this removes the logging when user specifies "missing" and we don't find it in the kernel device list. logging are for system events not for user input errors. Signed-off-by: Anand Jain --- fs/btrfs/volume

[PATCH 8/8] Btrfs: use btrfs_scratch_superblock() in btrfs_rm_device()

2015-04-27 Thread Anand Jain
With the previous patches now the btrfs_scratch_superblock() is ready to be used in btrfs_rm_device() so use it. Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 69 -- 1 file changed, 5 insertions(+), 64 deletions(-) diff --git a/fs/btrfs/v

Re: How to get the devid of a missing device

2015-04-27 Thread Wolfgang Mader
On Monday, April 27, 2015 02:11:05 AM Duncan wrote: > Wolfgang Mader posted on Sun, 26 Apr 2015 20:39:34 +0200 as excerpted: > > Hello, > > > > I have a raid10 with one device missing. I would like to use btrfs > > replace to replace it. However, I am unsure on how to obtain the devid > > of the m

Re: How to get the devid of a missing device

2015-04-27 Thread Wolfgang Mader
On Monday, April 27, 2015 12:48:07 PM Anand Jain wrote: > On 04/27/2015 02:39 AM, Wolfgang Mader wrote: > > Hello, > > > > I have a raid10 with one device missing. I would like to use btrfs replace > > to replace it. However, I am unsure on how to obtain the devid of the > > missing device. Having

Re: [PATCH] btrfs-progs: receive explicit parent support

2015-04-27 Thread lauri
Hi, > This won't work if you receive more than one snapshot, each one derived > from the previous one ("btrfs send -e snap1 snap2 snap3 snap4"). You > would always use the first one as the parent, not the predecessor. > That's implemented differently for the -p option in > git://git.kernel.org/pub

Re: rollback of a snapshot is just read-only

2015-04-27 Thread Juergen Sauer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 24.04.2015 um 16:08 schrieb Lentes, Bernd: > Hi, > > it should be just a small problem, but it is one. How can I rollback t o a snapshot of my root filesystem ? > Googeling, I found a lot of solutions, each different. > I finally choosed this one:

Re: [PATCH v2 1/2] btrfs: Fix superblock csum type check.

2015-04-27 Thread David Sterba
On Mon, Apr 27, 2015 at 08:25:58AM +0800, Qu Wenruo wrote: > > > Original Message > Subject: Re: [PATCH v2 1/2] btrfs: Fix superblock csum type check. > From: David Sterba > To: Qu Wenruo > Date: 2015年04月24日 23:05 > > > On Fri, Apr 24, 2015 at 09:12:40AM +0800, Qu Wenruo wro

Re: rollback of a snapshot is just read-only

2015-04-27 Thread Austin S Hemmelgarn
On 2015-04-24 10:26, Lentes, Bernd wrote: Hi, it should be just a small problem, but it is one. How can I rollback to a snapshot of my root filesystem ? Googeling, I found a lot of solutions, each different. I finally choosed this one: https://btrfs.wiki.kernel.org/index.php/UseCases#I_want_to

btrfs freeze/thaw when using with LVM2

2015-04-27 Thread sri
Hi, I would like to know if btrfs file system is created on LVM2 logical volumes, does freeze and thaw operations takes place for btrfs to make file system consistent?? If not is there a way (ioctl etc..) to run btrfs freeze/thaw before and after creating LVM2 snapshot of a btrfs file system?

Re: btrfs freeze/thaw when using with LVM2

2015-04-27 Thread Hugo Mills
On Mon, Apr 27, 2015 at 12:05:28PM +, sri wrote: > Hi, > > I would like to know if btrfs file system is created on LVM2 logical > volumes, does freeze and thaw operations takes place for btrfs to make > file system consistent?? No, because the filesystem is *always* consistent, because o

btrfs-progs SCRUB reporting aborted but still running - minor

2015-04-27 Thread Anthony Plack
I have a BTRFS which has errors. After starting a scrub, and checking status once, scrub will report it was aborted but still runs to completion. fatdrive ~ # btrfs scrub status /mnt/data scrub status for f591ac13-1a69-476d-bd30-346f87a491da scrub started at Mon Apr 27 06:48:44 2015, runn

btrfs-progs BTRFS mounted with -o recovery showing no errors on scrub - minor

2015-04-27 Thread Anthony Plack
This may be by design since the driver is handling the errors. When the drive is mounted with -o recovery, and then a scrub is performed, scrub will show no errors. fatdrive ~ # dmesg | tail [35348.694291] repair_io_failure: 4 callbacks suppressed [35348.694297] BTRFS: read error corrected: ino

help on broken file system

2015-04-27 Thread Ermanno Baschiera
Hello, I have a 3 disks file system configured in RAID1, created with Ubuntu 13.10 (if I recall correctly). Last friday I upgraded my system from Ubuntu 14.10 (kernel 3.16.0) to 15.04 (kernel 3.19.0). Then I started to notice some malfunctions (errors on cron scripts, my time machine asking to perf

Re: [PATCH 3/3] btrfs: set FS_SUPPORTS_SEEK_HOLE flag.

2015-04-27 Thread Christoph Hellwig
On Mon, Apr 27, 2015 at 03:41:33PM +1000, NeilBrown wrote: > Are you sure about NFSv4.2? > > I see that it *can* report holes, but is there any guarantee that if you > create a new file and write only the 5th block, then READ_PLUS will reliably > report that the first 4 block are holes?? FYI, I'm

Re: installation of a nspwan-container on btrfs subvolumes

2015-04-27 Thread arnaud gaboury
On Fri, Apr 24, 2015 at 7:22 PM, arnaud gaboury wrote: > Archlinux host > > 1- created 3 btrfs subvol on /dev/sdb1 (SSD). The goal is to manage > snapshots easily. > no nested subvol. > -- > # btrfs subvolume list . > ID 266 gen 39 top level 5 path rootvol >

Re: btrfs freeze/thaw when using with LVM2

2015-04-27 Thread sri
Hugo Mills carfax.org.uk> writes: > > On Mon, Apr 27, 2015 at 12:05:28PM +, sri wrote: > > Hi, > > > > I would like to know if btrfs file system is created on LVM2 logical > > volumes, does freeze and thaw operations takes place for btrfs to make > > file system consistent?? > >No,

Re: btrfs freeze/thaw when using with LVM2

2015-04-27 Thread Hugo Mills
On Mon, Apr 27, 2015 at 02:41:41PM +, sri wrote: > Hugo Mills carfax.org.uk> writes: > > > > > On Mon, Apr 27, 2015 at 12:05:28PM +, sri wrote: > > > Hi, > > > > > > I would like to know if btrfs file system is created on LVM2 logical > > > volumes, does freeze and thaw operations take

Re: btrfs freeze/thaw when using with LVM2

2015-04-27 Thread Piotr Pawłow
On 27.04.2015 o 14:15, Hugo Mills wrote: HOWEVER, you shouldn't take LVM snapshots of a btrfs filesystem AT ALL I'd like to add, that generally when working with LVM and BTRFS, it's probably a good idea to always use "device=" mount option to make it scan only specified devices instead of all

Re: btrfs freeze/thaw when using with LVM2

2015-04-27 Thread Roman Mamedov
On Mon, 27 Apr 2015 14:55:49 + Hugo Mills wrote: > > This is strange considering that I wanted a consistent snapshot of > > entire btrfs filesystem at volume level. > > > > Is there a way to achive this? or btrfs just cannot provide? > >No, there's no way to manage it with the current

Re: btrfs freeze/thaw when using with LVM2

2015-04-27 Thread Hugo Mills
On Mon, Apr 27, 2015 at 10:34:42PM +0500, Roman Mamedov wrote: > On Mon, 27 Apr 2015 14:55:49 + > Hugo Mills wrote: > > > > This is strange considering that I wanted a consistent snapshot of > > > entire btrfs filesystem at volume level. > > > > > > Is there a way to achive this? or btrfs j

Re: btrfs freeze/thaw when using with LVM2

2015-04-27 Thread sri
Hugo Mills carfax.org.uk> writes: > > On Mon, Apr 27, 2015 at 10:34:42PM +0500, Roman Mamedov wrote: > > On Mon, 27 Apr 2015 14:55:49 + > > Hugo Mills carfax.org.uk> wrote: > > > > > > This is strange considering that I wanted a consistent snapshot of > > > > entire btrfs filesystem at v

Re: help on broken file system

2015-04-27 Thread Bob Williams
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 27/04/15 14:39, Ermanno Baschiera wrote: > Hello, I have a 3 disks file system configured in RAID1, created > with Ubuntu 13.10 (if I recall correctly). Last friday I upgraded > my system from Ubuntu 14.10 (kernel 3.16.0) to 15.04 (kernel > 3.19.0).

Re: [PATCH v3] Btrfs: btrfs_release_extent_buffer_page didn't free pages of dummy extent

2015-04-27 Thread Filipe David Manana
On Mon, Feb 9, 2015 at 9:31 AM, Forrest Liu wrote: > btrfs_release_extent_buffer_page() can't handle dummy extent that > allocated by btrfs_clone_extent_buffer() properly. That is because > reference count of pages that allocated by btrfs_clone_extent_buffer() > was 2, 1 by alloc_page(), and anoth

Re: [PATCH] btrfs-progs: receive explicit parent support

2015-04-27 Thread Stefan Behrens
On 4/27/2015 11:23 AM, lauri wrote: Hi, This won't work if you receive more than one snapshot, each one derived from the previous one ("btrfs send -e snap1 snap2 snap3 snap4"). You would always use the first one as the parent, not the predecessor. That's implemented differently for the -p optio

Re: [PATCH v2 1/2] btrfs: Fix superblock csum type check.

2015-04-27 Thread Qu Wenruo
Original Message Subject: Re: [PATCH v2 1/2] btrfs: Fix superblock csum type check. From: David Sterba To: Qu Wenruo Date: 2015年04月27日 18:59 On Mon, Apr 27, 2015 at 08:25:58AM +0800, Qu Wenruo wrote: Original Message Subject: Re: [PATCH v2 1/2] btrfs:

[PATCH] btrfs: Fix superblock csum type check.

2015-04-27 Thread Qu Wenruo
Old csum type check is wrong and can't catch csum_type 1(not supported). Fix it to avoid hostile 0 division. Reported-by: Lukas Lueg Signed-off-by: Qu Wenruo --- Changelog: v2: Fix existing codes other than adding new one. v3: Just remove the tailing in btrfs_csum_sizes array. --- fs/btr

Re: btrfs-progs BTRFS mounted with -o recovery showing no errors on scrub - minor

2015-04-27 Thread Duncan
Anthony Plack posted on Mon, 27 Apr 2015 07:51:14 -0500 as excerpted: > This may be by design since the driver is handling the errors. When the > drive is mounted with -o recovery, and then a scrub is performed, scrub > will show no errors. > > fatdrive ~ # dmesg | tail > [35348.694291] repair_i

Filesystem with Errors, Unusual behavior

2015-04-27 Thread Joshua Schmidlkofer
I have a large-ish filesystem, and it's starting to cause problems after some SATA errors. After scrubs stalled, and reading of people with similar errors, I downloaded the latest btrfs-progs and attempted a btrfsck - is segfaults. This is ubuntu 14.04, running the mainline kernel 3.19.5. I down

Re: Filesystem with Errors, Unusual behavior

2015-04-27 Thread Qu Wenruo
Original Message Subject: Filesystem with Errors, Unusual behavior From: Joshua Schmidlkofer To: Date: 2015年04月28日 14:11 I have a large-ish filesystem, and it's starting to cause problems after some SATA errors. After scrubs stalled, and reading of people with similar err

Re: help on broken file system

2015-04-27 Thread Duncan
Ermanno Baschiera posted on Mon, 27 Apr 2015 15:39:14 +0200 as excerpted: > I have a 3 disks file system configured in RAID1, created with Ubuntu > 13.10 (if I recall correctly). Last friday I upgraded my system from > Ubuntu 14.10 (kernel 3.16.0) to 15.04 (kernel 3.19.0). Then I started to > noti

[PATCH 05/10] btrfs: remove bio splitting and merge_bvec_fn() calls

2015-04-27 Thread Ming Lin
From: Kent Overstreet Btrfs has been doing bio splitting from btrfs_map_bio(), by checking device limits as well as calling ->merge_bvec_fn() etc. That is not necessary any more, because generic_make_request() is now able to handle arbitrarily sized bios. So clean up unnecessary code paths. Cc: