USB upgrade fun

2017-10-08 Thread Kai Hendry
Hi there, My /mnt/raid1 suddenly became full somewhat expectedly, so I bought 2 new USB 4TB hard drives (one WD, one Seagate) to upgrade to. After adding sde and sdd I started to see errors in dmesg [2]. https://s.natalian.org/2017-10-07/raid1-newdisks.txt [2]

[PATCH v2] Btrfs: heuristic add shannon entropy calculation

2017-10-08 Thread Timofey Titovets
Byte distribution check in heuristic will filter edge data cases and some time fail to classificate input data Let's fix that by adding Shannon entropy calculation, that will cover classification of most other data types. As Shannon entropy need log2 with some precision to work, let's use

Re: [PATCH v8 2/2] btrfs: check device for critical errors and mark failed

2017-10-08 Thread Anand Jain
On 10/07/2017 07:56 AM, Liu Bo wrote: On Thu, Oct 05, 2017 at 09:56:59PM +0800, Anand Jain wrote: On 10/05/2017 04:11 AM, Liu Bo wrote: On Tue, Oct 03, 2017 at 11:59:20PM +0800, Anand Jain wrote: From: Anand Jain Write and flush errors are critical errors, upon

Re: "BTRFS error (device vda1): couldn't get super buffer head for bytenr x"

2017-10-08 Thread Nick Gilmour
Thanks for the reply! For conversion I used this command: $ vboxmanage internalcommands converttoraw mydisk.vdi mydisk.img and for resizing this one: $ qemu-img resize mydisk.img 150G Is there something I can do to fix this or another way to do the resizing without getting an error? Regards,

[PATCH] btrfs: prefix sysfs attribute struct names

2017-10-08 Thread Hans van Kranenburg
Currently struct names for sysfs are generated only based on the attribute names. This means that attribute names cannot be reused in multiple places throughout the complete btrfs sysfs hierarchy. E.g. allocation/data/total_bytes and allocation/data/single/total_bytes result in the same struct

Re: "BTRFS error (device vda1): couldn't get super buffer head for bytenr x"

2017-10-08 Thread Chris Murphy
On Sun, Oct 8, 2017 at 4:39 PM, Nick Gilmour wrote: > Thanks for the reply! > > For conversion I used this command: > $ vboxmanage internalcommands converttoraw mydisk.vdi mydisk.img > > and for resizing this one: > $ qemu-img resize mydisk.img 150G > > Is there something I

Re: "BTRFS error (device vda1): couldn't get super buffer head for bytenr x"

2017-10-08 Thread Nick Gilmour
> I don't see a 'btrfs filesystem resize' command in your sequence. Did > you actually resize the file system before you resized the underlying > (virtual) block device? OK. I guess, this is it. I didn't do any 'btrfs filesystem resize' . The guides I was following didn't mention something like

RE: [PATCH] btrfs: Use bd_dev to generate index when dev_state_hashtable add items.

2017-10-08 Thread Gu, Jinxiang
Hi, sorry for reply too late. This patch fix for the bug descriped below. Use MOUNT_OPTIONS="-o check_int" when run xfstest, device Can not be mount successfully. So xfstest can not run. > -Original Message- > From: David Sterba [mailto:dste...@suse.cz] > Sent: Saturday, September 30,

Re: [ANNOUNCE] fsperf: a simple fs/block performance testing framework

2017-10-08 Thread Josef Bacik
On Mon, Oct 09, 2017 at 11:51:37AM +1100, Dave Chinner wrote: > On Fri, Oct 06, 2017 at 05:09:57PM -0400, Josef Bacik wrote: > > Hello, > > > > One thing that comes up a lot every LSF is the fact that we have no general > > way > > that we do performance testing. Every fs developer has a set of

[PATCH v4 2/5] btrfs: tree-checker: Enhance btrfs_check_node output

2017-10-08 Thread Qu Wenruo
Use inline function to replace macro since we don't need stringification. (Macro still exist until all caller get updated) And add more info about the error, and replace EIO with EUCLEAN. For nr_items error, report if it's too large or too small, and output valid value range. For node block

[PATCH v4 3/5] btrfs: tree-checker: Enhance output for btrfs_check_leaf

2017-10-08 Thread Qu Wenruo
Enhance the output to print: 1) Reason 2) Bad value If reason can't explain enough 3) Good value (range) Signed-off-by: Qu Wenruo --- fs/btrfs/tree-checker.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git

[PATCH v2 4/4] btrfs: fix use of error or warning for missing device

2017-10-08 Thread Anand Jain
When device is missing without the -o degraded option then its an error so report it as an error instead of warning. And when -o degraded option is provided, log the missing device as warning. Signed-off-by: Anand Jain --- v2: Rename from [PATCH 2/2] btrfs: clean up

[PATCH v2 1/4] btrfs: add_missing_dev() should return the actual error

2017-10-08 Thread Anand Jain
add_missing_dev() can return device pointer so that IS_ERR/ PTR_ERR can be used to check for the actual error occurred in the function. Signed-off-by: Anand Jain --- v2: This patch is a split from [PATCH 1/2] btrfs: fix read_one_chunk() return error code

[PATCH v2 2/4] btrfs: fix EIO misuse to report missing degraded option

2017-10-08 Thread Anand Jain
EIO is only for the IO failure to the device, avoid it. Signed-off-by: Anand Jain --- v2: This patch is renamed from [PATCH 1/2] btrfs: fix read_one_chunk() return error code fs/btrfs/volumes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v2 3/4] btrfs: declare btrfs_report_missing_device() static

2017-10-08 Thread Anand Jain
Signed-off-by: Anand Jain --- v2: This patch is a split from [PATCH 2/2] btrfs: clean up btrfs_report_missing_device() usage fs/btrfs/volumes.c | 12 ++-- fs/btrfs/volumes.h | 2 -- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git

Re: [ANNOUNCE] fsperf: a simple fs/block performance testing framework

2017-10-08 Thread Theodore Ts'o
On Sun, Oct 08, 2017 at 10:25:10PM -0400, Josef Bacik wrote: > > Probably should have led with that shouldn't I have? There's nothing keeping > me > from doing it, but I didn't want to try and shoehorn in a python thing into > fstests. I need python to do the sqlite and the json parsing to

Re: [ANNOUNCE] fsperf: a simple fs/block performance testing framework

2017-10-08 Thread Dave Chinner
On Fri, Oct 06, 2017 at 05:09:57PM -0400, Josef Bacik wrote: > Hello, > > One thing that comes up a lot every LSF is the fact that we have no general > way > that we do performance testing. Every fs developer has a set of scripts or > things that they run with varying degrees of consistency,

[PATCH v4 5/5] btrfs: tree-checker: Enhance output for check_extent_data_item

2017-10-08 Thread Qu Wenruo
Output the invalid member name and its bad value, along with its expected value range or alignment. Signed-off-by: Qu Wenruo --- fs/btrfs/tree-checker.c | 98 +++-- 1 file changed, 70 insertions(+), 28 deletions(-) diff --git

[PATCH v4 1/5] btrfs: Move leaf and node validation checker to tree-checker.ch

2017-10-08 Thread Qu Wenruo
It's no doubt the comprehensive tree block checker will become larger and larger, so moving them into their own files is quite reasonable. Signed-off-by: Qu Wenruo --- fs/btrfs/Makefile | 2 +- fs/btrfs/disk-io.c | 285

[PATCH v4 4/5] btrfs: tree-checker: Enhance output for check_csum_item

2017-10-08 Thread Qu Wenruo
Output the bad value and expected good value (or its alignment). Signed-off-by: Qu Wenruo --- fs/btrfs/tree-checker.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c index

[PATCH v4 0/5] Enhance tree block validation checker

2017-10-08 Thread Qu Wenruo
The patchset can be fetched from github: https://github.com/adam900710/linux/tree/checker_enhance It's based on David's misc-next branch, with following commit as base: a5e50b4b444c ("btrfs: Add checker for EXTENT_CSUM") According to David's suggestion, enhance the output format of tree block

Re: [ANNOUNCE] fsperf: a simple fs/block performance testing framework

2017-10-08 Thread Dave Chinner
On Sun, Oct 08, 2017 at 10:25:10PM -0400, Josef Bacik wrote: > On Mon, Oct 09, 2017 at 11:51:37AM +1100, Dave Chinner wrote: > > On Fri, Oct 06, 2017 at 05:09:57PM -0400, Josef Bacik wrote: > > > Hello, > > > > > > One thing that comes up a lot every LSF is the fact that we have no > > > general