Re: [PATCH 1/5] btrfs-progs: check: return value of check_extent_refs()

2017-10-05 Thread Su Yue
On 10/06/2017 01:46 AM, David Sterba wrote: On Wed, Sep 27, 2017 at 02:34:36PM +0800, Su Yue wrote: In original check mode(without option "--repair"), check_extent_refs() always returns 0. Add a variable @error to record status while checking extents. At the end of check_extent_refs(), let it

Re: [PATCH 1/5] btrfs-progs: check: return value of check_extent_refs()

2017-10-05 Thread Su Yue
On 10/06/2017 01:46 AM, David Sterba wrote: On Wed, Sep 27, 2017 at 02:34:36PM +0800, Su Yue wrote: In original check mode(without option "--repair"), check_extent_refs() always returns 0. Add a variable @error to record status while checking extents. At the end of check_extent_refs(), let it

[PATCH v3] btrfs-progs: change subvol set-default to also accept subvol path

2017-10-05 Thread Misono, Tomohiro
This patch changes "subvol set-default" to also accept the subvolume path for convenience. This is the one of the issue on github: https://github.com/kdave/btrfs-progs/issues/35 If there are two args, they are assumed as subvol id and path to the fs (the same as current behavior), and if there i

Re: [PATCH] btrfs: avoid overflow when sector_t is 32 bit

2017-10-05 Thread Liu Bo
On Wed, Oct 04, 2017 at 08:23:05PM +0200, David Sterba wrote: > On Wed, Oct 04, 2017 at 11:13:51AM -0600, Liu Bo wrote: > > On Wed, Oct 04, 2017 at 04:22:28PM +0200, David Sterba wrote: > > > On Tue, Oct 03, 2017 at 07:31:10PM +0200, Goffredo Baroncelli wrote: > > > > From: Goffredo Baroncelli > >

Re: [PATCH 1/5] btrfs-progs: check: return value of check_extent_refs()

2017-10-05 Thread David Sterba
On Wed, Sep 27, 2017 at 02:34:36PM +0800, Su Yue wrote: > In original check mode(without option "--repair"), check_extent_refs() > always returns 0. > > Add a variable @error to record status while checking extents. > At the end of check_extent_refs(), let it return -EIO if @error is > nonzero. >

Re: [PATCH] btrfs-progs: tests: arg override in command line

2017-10-05 Thread David Sterba
On Thu, Sep 28, 2017 at 03:29:19PM +0800, Su Yue wrote: > Lowmem mode only repairs few cases which has a beacon file > ".lowmem_repairable" in the case' directory. > > However, defining TEST_ENABLE_OVERRIDE=true in command line does work > in above strategy. > Because _skip_spec() in tests/common.

btrfs HDD vs SSD

2017-10-05 Thread Fuhrmann, Carsten
Hello, i compared btrfs raid with mdadm raid. The mdadm raid was used with ext4 filesystem. I used 4 SSDs and 4 HDDs in RAID0, RAID1 and RAID5. In the test I compiled the linux kernel and took the time how long it compiled + pagecache drop. The interesting result is that btrfs is always better o

Re: [PATCH] btrfs-progs: subvol: change subvol set-default to also accept subvol path

2017-10-05 Thread David Sterba
On Mon, Oct 02, 2017 at 03:25:40PM +0900, Misono, Tomohiro wrote: > This patch changes "subvol set-default" to also accept the subvolume path > for convenience. > > This is the one of the issue on github: > https://github.com/kdave/btrfs-progs/issues/35 > > If there are two args, they are assumed

Re: [PATCH v2] btrfs-progs: subvol: change subvol set-default to also accept subvol path

2017-10-05 Thread David Sterba
On Thu, Oct 05, 2017 at 09:57:25AM +0900, Misono, Tomohiro wrote: > > I agree with Andrei and Hugo. We need to check that the subvolume path > > belongs to the filesystem anyway. I don't see that in the first version, > > so please fix it. > > > > I'm a bit confusing, but what is the meaning of "

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

2017-10-05 Thread Anand Jain
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 which the device fd must be closed and marked as failed. Can we defer the job of closing device to umount? Originally I th

[PATCH v8.1 2/2] btrfs: mark device failed for write and flush errors

2017-10-05 Thread Anand Jain
This patch marks device as failed for the write/flush errors so that it can be brought out of the RW device list. However if the chunk render is incomplete due to missing of a device then the volume/raid fails, so this situation is handled by calling btrfs_handle_fs_error() which puts the whole FS

Mounting bad btrfs img file

2017-10-05 Thread Eric Wolf
My OS drive had issues with metadata (disk full even though it wasn't etc), and so I reinstalled my OS and now I'm learning that my backup img is bad. What steps should I go through to fix it? $ sudo mount -o offset=827808,loop,recovery,ro,nospace_cache,nospace_cache /data/Backup/Nephele.img

How to get Super_num_devices in sync with num_devices again?!

2017-10-05 Thread g6094199
He Guys!I have an ubuntu 16.04 machine (K4.4 and K4.11, btrfs-progs v4.5.2) running / on btrfs raid1 and for somemonth (after i had to replace a / disk) super_numdevices and num_devices are out of sync peventing me to bootKernels newer than around 4.7 (ifaik), where the kernels began the be more

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

2017-10-05 Thread Austin S. Hemmelgarn
On 2017-10-04 16:11, 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 which the device fd must be closed and marked as failed. Can we defer the job of closing device to umount? We can go mark the dev

[PATCH 1/1] Btrfs: heuristic add shannon entropy calculation

2017-10-05 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, i precalculate ta

[PATCH 0/1] Btrfs: populate heuristic with logic

2017-10-05 Thread Timofey Titovets
As core part of heuristic merged to for-next tree, I send another patch with shannon entropy calculation, as that metric will cover another part of cases. That also will cover most of silesia corpus data. P.S. i reverse ported it, so: https://github.com/Nefelim4ag/companalyze For now that only f

Re: [PATCH v4] btrfs: Remove received_uuid during received snapshot ro->rw switch

2017-10-05 Thread Anand Jain
On 10/05/2017 04:22 PM, Nikolay Borisov wrote: Currently when a read-only snapshot is received and subsequently its ro property is set to false i.e. switched to rw-mode the received_uuid of that subvol remains intact. However, once the received volume is switched to RW mode we cannot guarantee

[PATCH v4] btrfs: Remove received_uuid during received snapshot ro->rw switch

2017-10-05 Thread Nikolay Borisov
Currently when a read-only snapshot is received and subsequently its ro property is set to false i.e. switched to rw-mode the received_uuid of that subvol remains intact. However, once the received volume is switched to RW mode we cannot guaranteee that it contains the same data, so it makes sense