Re: [PATCH v8 00/27][For 4.7] Btrfs: Add inband (write time) de-duplication framework

2016-04-05 Thread Qu Wenruo
Nicholas D Steeves wrote on 2016/04/05 23:47 -0400: On 4 April 2016 at 12:55, David Sterba wrote: Not exactly. If we are using unsafe hash, e.g MD5, we will use MD5 only for both in-memory and on-disk backend. No SHA256 again. I'm proposing unsafe but fast, which MD5 is

Re: [PATCH 2/2] btrfs: do not write corrupted metadata blocks to disk

2016-04-05 Thread Nicholas D Steeves
Hi Alex, On 13 March 2016 at 05:51, Alex Lyakas wrote: > Nicholas, > > On Sat, Mar 12, 2016 at 12:19 AM, Nicholas D Steeves > wrote: >> On 10 March 2016 at 06:10, Alex Lyakas wrote: >> Does this mean there is a good chance

Re: dstat shows unexpected result for two disk RAID1

2016-04-05 Thread Nicholas D Steeves
On 11 March 2016 at 20:20, Chris Murphy wrote: > On Fri, Mar 11, 2016 at 5:10 PM, Nicholas D Steeves > wrote: >> P.S. Rather than parity, I mean instead of distributing into stripes, do a >> copy! > > raid56 by definition are parity based, so I'd

Re: btrfs-progs4.4 with linux-3.16.7 (with truncation of extends patch)

2016-04-05 Thread Nicholas D Steeves
Dear Duncan, Gmail seems to have mangled the draft of my reply :-/ It's at the bottom. On 06/02/16 12:57 AM, Duncan wrote: Most of the rest of the userspace tools, in particular, btrfs scrub, subvolume, balance, device, filesystem, send, receive, etc, work by making kernel calls to do the

Re: [PATCH v8 00/27][For 4.7] Btrfs: Add inband (write time) de-duplication framework

2016-04-05 Thread Nicholas D Steeves
On 4 April 2016 at 12:55, David Sterba wrote: >> >> Not exactly. If we are using unsafe hash, e.g MD5, we will use MD5 only >> >> for both in-memory and on-disk backend. No SHA256 again. >> > >> > I'm proposing unsafe but fast, which MD5 is not. Look for xxhash or >> > murmur. As

Possible Double Freeing of dentry in check_parent_dirs_for_sync

2016-04-05 Thread Bastien Philbert
Greetings All, After some tracing I am not certain if this is correct due to being newer to the btrfs codebase. However if someone more experience can show me if I am missing something in my traces please let me known:) Firstly here is the bug trace or the part that matters: [ 7195.792492]

Re: [PATCH] [RFC] fix potential access after free: return value of blk_check_plugged() must be used schedule() safe

2016-04-05 Thread NeilBrown
On Wed, Apr 06 2016, Shaohua Li wrote: > On Tue, Apr 05, 2016 at 03:36:57PM +0200, Lars Ellenberg wrote: >> blk_check_plugged() will return a pointer >> to an object linked on current->plug->cb_list. >> >> That list may "at any time" be implicitly cleared by >> blk_flush_plug_list() >>

[PATCH] btrfs: qgroup: Fix qgroup accounting when creating snapshot

2016-04-05 Thread Qu Wenruo
Current btrfs qgroup design implies a requirement that after calling btrfs_qgroup_account_extents() there must be a commit root switch. Normally this is OK, as btrfs_qgroup_accounting_extents() is only called inside btrfs_commit_transaction() just be commit_cowonly_roots(). However there is a

Re: [PATCH] [RFC] fix potential access after free: return value of blk_check_plugged() must be used schedule() safe

2016-04-05 Thread Shaohua Li
On Tue, Apr 05, 2016 at 03:36:57PM +0200, Lars Ellenberg wrote: > blk_check_plugged() will return a pointer > to an object linked on current->plug->cb_list. > > That list may "at any time" be implicitly cleared by > blk_flush_plug_list() > flush_plug_callbacks() > either as a result of

Re: [PATCH] [RFC] fix potential access after free: return value of blk_check_plugged() must be used schedule() safe

2016-04-05 Thread Chris Mason
On Tue, Apr 05, 2016 at 03:36:57PM +0200, Lars Ellenberg wrote: > blk_check_plugged() will return a pointer > to an object linked on current->plug->cb_list. > > That list may "at any time" be implicitly cleared by > blk_flush_plug_list() > flush_plug_callbacks() > either as a result of

Re: Scrub priority, am I using it wrong?

2016-04-05 Thread Gareth Pye
Yeah, RAID5. I'm now doing pause and resume on it to let it take multiple nights, the idle should let other processes complete in reasonable time. On Wed, Apr 6, 2016 at 3:34 AM, Henk Slager wrote: > On Tue, Apr 5, 2016 at 4:37 AM, Duncan <1i5t5.dun...@cox.net> wrote: >> Gareth

Re: [PATCH] Btrfs: fix missing s_id setting

2016-04-05 Thread Tsutomu Itoh
On 2016/04/05 17:52, Tsutomu Itoh wrote: On 2016/04/05 16:56, Anand Jain wrote: On 04/05/2016 08:08 AM, Tsutomu Itoh wrote: When fs_devices->latest_bdev is deleted or is replaced, sb->s_id has not been updated. As a result, the deleted device name is displayed by btrfs_printk. [before fix]

Re: [PATCH] [RFC] fix potential access after free: return value of blk_check_plugged() must be used schedule() safe

2016-04-05 Thread NeilBrown
On Tue, Apr 05 2016, Lars Ellenberg wrote: > blk_check_plugged() will return a pointer > to an object linked on current->plug->cb_list. > > That list may "at any time" be implicitly cleared by > blk_flush_plug_list() > flush_plug_callbacks() > either as a result of blk_finish_plug(), > or

Re: Qgroups wrong after snapshot create

2016-04-05 Thread Mark Fasheh
On Tue, Apr 05, 2016 at 03:16:54PM -0700, Mark Fasheh wrote: > On Tue, Apr 05, 2016 at 09:27:01AM +0800, Qu Wenruo wrote: > > Mark Fasheh wrote on 2016/04/04 16:06 -0700: > > >Hi, > > > > > >Making a snapshot gets us the wrong qgroup numbers. This is very easy to > > >reproduce. From a fresh btrfs

Re: Qgroups wrong after snapshot create

2016-04-05 Thread Mark Fasheh
On Tue, Apr 05, 2016 at 09:27:01AM +0800, Qu Wenruo wrote: > Mark Fasheh wrote on 2016/04/04 16:06 -0700: > >Hi, > > > >Making a snapshot gets us the wrong qgroup numbers. This is very easy to > >reproduce. From a fresh btrfs filesystem, simply enable qgroups and create a > >snapshot. In this

Re: good documentation on btrfs internals and on disk layout

2016-04-05 Thread Yauhen Kharuzhy
2016-04-05 11:56 GMT-07:00 Austin S. Hemmelgarn : > On 2016-04-05 14:36, Yauhen Kharuzhy wrote: >> >> 2016-04-05 11:15 GMT-07:00 Austin S. Hemmelgarn : >>> >>> On 2016-04-05 13:53, Yauhen Kharuzhy wrote: >>> In general, it isn't allowed, but we don't

Re: good documentation on btrfs internals and on disk layout

2016-04-05 Thread Austin S. Hemmelgarn
On 2016-04-05 14:36, Yauhen Kharuzhy wrote: 2016-04-05 11:15 GMT-07:00 Austin S. Hemmelgarn : On 2016-04-05 13:53, Yauhen Kharuzhy wrote: Hello, I try to understand btrfs logic in mounting of multi-device filesystem when device generations are different. All my

Re: good documentation on btrfs internals and on disk layout

2016-04-05 Thread Yauhen Kharuzhy
2016-04-05 11:15 GMT-07:00 Austin S. Hemmelgarn : > On 2016-04-05 13:53, Yauhen Kharuzhy wrote: >> >> Hello, >> >> I try to understand btrfs logic in mounting of multi-device filesystem >> when device generations are different. All my questions are related to >> RAID5/6 for

Re: good documentation on btrfs internals and on disk layout

2016-04-05 Thread Austin S. Hemmelgarn
On 2016-04-05 13:53, Yauhen Kharuzhy wrote: Hello, I try to understand btrfs logic in mounting of multi-device filesystem when device generations are different. All my questions are related to RAID5/6 for system, metadata, and data case. Kernel can mount FS with different device generations

Re: good documentation on btrfs internals and on disk layout

2016-04-05 Thread Yauhen Kharuzhy
Hello, I try to understand btrfs logic in mounting of multi-device filesystem when device generations are different. All my questions are related to RAID5/6 for system, metadata, and data case. Kernel can mount FS with different device generations (if drive was physically removed before last

Re: Scrub priority, am I using it wrong?

2016-04-05 Thread Henk Slager
On Tue, Apr 5, 2016 at 4:37 AM, Duncan <1i5t5.dun...@cox.net> wrote: > Gareth Pye posted on Tue, 05 Apr 2016 09:36:48 +1000 as excerpted: > >> I've got a btrfs file system set up on 6 drbd disks running on 2Tb >> spinning disks. The server is moderately loaded with various regular >> tasks that

[PATCH] btrfs-progs: device stats: Print devid instead of null

2016-04-05 Thread Patrik Lundquist
Print e.g. "[devid:4].write_io_errs   6" instead of "[(null)].write_io_errs   6" when device is missing. Signed-off-by: Patrik Lundquist --- cmds-device.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/cmds-device.c b/cmds-device.c index b17b6c6..7616c43

[PATCH] [RFC] fix potential access after free: return value of blk_check_plugged() must be used schedule() safe

2016-04-05 Thread Lars Ellenberg
blk_check_plugged() will return a pointer to an object linked on current->plug->cb_list. That list may "at any time" be implicitly cleared by blk_flush_plug_list() flush_plug_callbacks() either as a result of blk_finish_plug(), or implicitly by schedule() [and maybe other implicit mechanisms?]

Re: Another ENOSPC situation

2016-04-05 Thread Austin S. Hemmelgarn
On 2016-04-02 01:43, Chris Murphy wrote: On Fri, Apr 1, 2016 at 10:55 PM, Duncan <1i5t5.dun...@cox.net> wrote: Marc Haber posted on Fri, 01 Apr 2016 15:40:29 +0200 as excerpted: [4/502]mh@swivel:~$ sudo btrfs fi usage / Overall: Device size: 600.00GiB Device

Re: Qgroups wrong after snapshot create

2016-04-05 Thread Qu Wenruo
On 04/05/2016 07:06 AM, Mark Fasheh wrote: Hi, Making a snapshot gets us the wrong qgroup numbers. This is very easy to reproduce. From a fresh btrfs filesystem, simply enable qgroups and create a snapshot. In this example we have mounted a newly created fresh filesystem and mounted it at

Re: Scrub priority, am I using it wrong?

2016-04-05 Thread Austin S. Hemmelgarn
On 2016-04-05 00:19, Duncan wrote: Gareth Pye posted on Tue, 05 Apr 2016 13:44:05 +1000 as excerpted: On Tue, Apr 5, 2016 at 12:37 PM, Duncan <1i5t5.dun...@cox.net> wrote: 1) It appears btrfs scrub start's -c option only takes numeric class, so try -c3 instead of -c idle. Does it count as

Re: [PATCH] Btrfs: fix missing s_id setting

2016-04-05 Thread Tsutomu Itoh
On 2016/04/05 16:56, Anand Jain wrote: On 04/05/2016 08:08 AM, Tsutomu Itoh wrote: When fs_devices->latest_bdev is deleted or is replaced, sb->s_id has not been updated. As a result, the deleted device name is displayed by btrfs_printk. [before fix] # btrfs dev del /dev/sdc4 /mnt2 # btrfs

Re: [PATCH] btrfs-progs: fsck: Fix a false metadata extent warning

2016-04-05 Thread David Sterba
On Tue, Apr 05, 2016 at 09:28:31AM +0800, Qu Wenruo wrote: > > > David Sterba wrote on 2016/04/04 13:18 +0200: > > On Fri, Apr 01, 2016 at 04:50:06PM +0800, Qu Wenruo wrote: > >>> After another look, why don't we use nodesize directly? Or stripesize > >>> where applies. With max_size == 0 the

Re: [PATCH] btrfs-progs: fix re-declared get_device_info()

2016-04-05 Thread David Sterba
On Tue, Apr 05, 2016 at 03:36:01PM +0800, Anand Jain wrote: > The other get_device_info() is in the same file, 4 lines above. > > Signed-off-by: Anand Jain Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message

Re: [PATCH] Btrfs: fix missing s_id setting

2016-04-05 Thread Anand Jain
On 04/05/2016 08:08 AM, Tsutomu Itoh wrote: When fs_devices->latest_bdev is deleted or is replaced, sb->s_id has not been updated. As a result, the deleted device name is displayed by btrfs_printk. [before fix] # btrfs dev del /dev/sdc4 /mnt2 # btrfs dev add /dev/sdb6 /mnt2 [

BTRFS warnings in dmesg / scrub errors - Transaction aborted ( error -95 )

2016-04-05 Thread Robert Munteanu
Hi, I have a btrfs partition which exhibits some strange behaviours: - btrfs scrub seems to force the filesystem in read-only mode - transactions aborted with error -95 For context, this is a partition converted from ext4 which 'survived' through the issues described at

[PATCH] btrfs-progs: fix re-declared get_device_info()

2016-04-05 Thread Anand Jain
The other get_device_info() is in the same file, 4 lines above. Signed-off-by: Anand Jain --- utils.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/utils.h b/utils.h index ea54692aca86..e2ff41ad4ec1 100644 --- a/utils.h +++ b/utils.h @@ -187,8 +187,6 @@ int

Re: btrfsck: backpointer mismatch (and multiple other errors)

2016-04-05 Thread Kai Krakow
Am Mon, 4 Apr 2016 17:09:14 -0600 schrieb Chris Murphy : > > Why couldn't/shouldn't I remove snapshots before detaching the seed > > device? I want to keep them on the seed but they are useless to me > > on the sprout. > > You can remove snapshots before or after