Re: [PATCH 05/25] vfs: avoid problematic remapping requests into partial EOF block

2018-11-02 Thread Filipe Manana
On Mon, Oct 15, 2018 at 1:31 AM Dave Chinner wrote: > > On Fri, Oct 12, 2018 at 09:22:18PM +0100, Filipe Manana wrote: > > On Thu, Oct 11, 2018 at 5:13 AM Darrick J. Wong > > wrote: > > > > > > From: Darrick J. Wong > > > > > > A deduplication data corruption is exposed by fstests generic/505 o

Re: [PATCH 05/25] vfs: avoid problematic remapping requests into partial EOF block

2018-11-02 Thread Darrick J. Wong
On Fri, Nov 02, 2018 at 12:04:39PM +, Filipe Manana wrote: > On Mon, Oct 15, 2018 at 1:31 AM Dave Chinner wrote: > > > > On Fri, Oct 12, 2018 at 09:22:18PM +0100, Filipe Manana wrote: > > > On Thu, Oct 11, 2018 at 5:13 AM Darrick J. Wong > > > wrote: > > > > > > > > From: Darrick J. Wong >

Re: [PATCH 05/25] vfs: avoid problematic remapping requests into partial EOF block

2018-11-02 Thread Filipe Manana
On Fri, Nov 2, 2018 at 5:42 PM Darrick J. Wong wrote: > > On Fri, Nov 02, 2018 at 12:04:39PM +, Filipe Manana wrote: > > On Mon, Oct 15, 2018 at 1:31 AM Dave Chinner wrote: > > > > > > On Fri, Oct 12, 2018 at 09:22:18PM +0100, Filipe Manana wrote: > > > > On Thu, Oct 11, 2018 at 5:13 AM Darri

Re: [PATCH 05/25] vfs: avoid problematic remapping requests into partial EOF block

2018-11-02 Thread Filipe Manana
On Fri, Nov 2, 2018 at 6:18 PM Filipe Manana wrote: > > On Fri, Nov 2, 2018 at 5:42 PM Darrick J. Wong > wrote: > > > > On Fri, Nov 02, 2018 at 12:04:39PM +, Filipe Manana wrote: > > > On Mon, Oct 15, 2018 at 1:31 AM Dave Chinner wrote: > > > > > > > > On Fri, Oct 12, 2018 at 09:22:18PM +01

Re: [PATCH] btrfs: use tagged writepage to mitigate livelock of snapshot

2018-11-02 Thread ethanlien
Nikolay Borisov 於 2018-11-01 19:57 寫到: On 1.11.18 г. 8:49 ч., Ethan Lien wrote: Snapshot is expected to be fast. But if there are writers steadily create dirty pages in our subvolume, the snapshot may take a very long time to complete. To fix the problem, we use tagged writepage for snapshot fl

Re: [PATCH] btrfs: use tagged writepage to mitigate livelock of snapshot

2018-11-02 Thread ethanlien
David Sterba 於 2018-11-02 02:02 寫到: On Thu, Nov 01, 2018 at 02:49:03PM +0800, Ethan Lien wrote: Snapshot is expected to be fast. But if there are writers steadily create dirty pages in our subvolume, the snapshot may take a very long time to complete. To fix the problem, we use tagged writepage

Re: [PATCH] btrfs: use tagged writepage to mitigate livelock of snapshot

2018-11-02 Thread Nikolay Borisov
On 2.11.18 г. 9:13 ч., ethanlien wrote: > David Sterba 於 2018-11-02 02:02 寫到: >> On Thu, Nov 01, 2018 at 02:49:03PM +0800, Ethan Lien wrote: >>> Snapshot is expected to be fast. But if there are writers steadily >>> create dirty pages in our subvolume, the snapshot may take a very long >>> time

[PATCH v2] btrfs: use tagged writepage to mitigate livelock of snapshot

2018-11-02 Thread Ethan Lien
Snapshot is expected to be fast. But if there are writers steadily create dirty pages in our subvolume, the snapshot may take a very long time to complete. To fix the problem, we use tagged writepage for snapshot flusher as we do in generic write_cache_pages(): we quickly tag all dirty pages with a

Re: [PATCH v2] btrfs: use tagged writepage to mitigate livelock of snapshot

2018-11-02 Thread Nikolay Borisov
On 2.11.18 г. 11:06 ч., Ethan Lien wrote: > Snapshot is expected to be fast. But if there are writers steadily > create dirty pages in our subvolume, the snapshot may take a very long > time to complete. To fix the problem, we use tagged writepage for > snapshot flusher as we do in generic write

Re: fsck lowmem mode only: ERROR: errors found in fs roots

2018-11-02 Thread Christoph Anton Mitterer
Hey Su. Anything further I need to do in this matter or can I consider it "solved" and you won't need further testing by my side, but just PR the patches of that branch? :-) Thanks, Chris. On Sat, 2018-10-27 at 14:15 +0200, Christoph Anton Mitterer wrote: > Hey. > > > Without the last patches

Re: Salvage files from broken btrfs

2018-11-02 Thread M. Klingmann
On 31.10.2018 at 05:56 Chris Murphy wrote: > On Tue, Oct 30, 2018 at 4:11 PM, Mirko Klingmann wrote: >> Hi all, >> >> my btrfs root file system on a SD card broke down and did not mount anymore. > It might mount with -o ro,nologreplay > > Typically an SD card will break in a way that it can't writ

Re: Salvage files from broken btrfs

2018-11-02 Thread M. Klingmann
On 31.10.2018 at 01:03 Qu Wenruo wrote: > My plan for such recovery is: > > 1) btrfs ins dump-super to make sure system chunk array is valid > 2) btrfs-find-root to find any valid chunk tree blocks > 3) pass that chunk tree bytenr to btrfs-restore >Unfortunately, btrfs-restore doesn't support

Re: Salvage files from broken btrfs

2018-11-02 Thread Qu Wenruo
On 2018/11/2 下午10:30, M. Klingmann wrote: > > On 31.10.2018 at 01:03 Qu Wenruo wrote: >> My plan for such recovery is: >> >> 1) btrfs ins dump-super to make sure system chunk array is valid >> 2) btrfs-find-root to find any valid chunk tree blocks >> 3) pass that chunk tree bytenr to btrfs-resto

Re: Salvage files from broken btrfs

2018-11-02 Thread M. Klingmann
On 02.11.2018 at 15:45 Qu Wenruo wrote: > On 2018/11/2 下午10:30, M. Klingmann wrote: >> On 31.10.2018 at 01:03 Qu Wenruo wrote: >>> My plan for such recovery is: >>> >>> 1) btrfs ins dump-super to make sure system chunk array is valid >>> 2) btrfs-find-root to find any valid chunk tree blocks >>> 3)

Big amount of snapshots and disk full

2018-11-02 Thread linux-btrfs
Hi, I am doing backups with rsync and do versioning with btrfs snapshots. And last week I got file system full. I googled some and noticed that there might be bug in space_cache so I cleared cache and mounted it with nospace_cache and system worked about week (managed to delete & create te

BTRFS did it's job nicely (thanks!)

2018-11-02 Thread waxhead
Hi, my main computer runs on a 7x SSD BTRFS as rootfs with data:RAID1 and metadata:RAID10. One SSD is probably about to fail, and it seems that BTRFS fixed it nicely (thanks everyone!) I decided to just post the ugly details in case someone just wants to have a look. Note that I tend to inte

[PATCH 1/7] generic/{472,496,497}: fix $seeqres typo

2018-11-02 Thread Omar Sandoval
From: Omar Sandoval Signed-off-by: Omar Sandoval --- tests/generic/472 | 2 +- tests/generic/496 | 2 +- tests/generic/497 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/generic/472 b/tests/generic/472 index c74d6c70..04ed3e73 100755 --- a/tests/generic/472 +++ b/t

[PATCH 2/7] generic/{472,496}: fix swap file creation on Btrfs

2018-11-02 Thread Omar Sandoval
From: Omar Sandoval The swap file must be set nocow before it is written to, otherwise it is ignored and Btrfs refuses to activate it as swap. Fixes: 25ce9740065e ("generic: test swapfile creation, activation, and deactivation") Signed-off-by: Omar Sandoval --- tests/generic/472 | 14 ++--

[PATCH 7/7] btrfs: test balance and resize with an active swap file

2018-11-02 Thread Omar Sandoval
From: Omar Sandoval Make sure we don't shrink the device past an active swap file, but allow shrinking otherwise, as well as growing and balance. Signed-off-by: Omar Sandoval --- tests/btrfs/177 | 64 + tests/btrfs/177.out | 6 + tests/btrfs

[PATCH 3/7] btrfs: test swap file activation restrictions

2018-11-02 Thread Omar Sandoval
From: Omar Sandoval Swap files on Btrfs have some restrictions not applicable to other filesystems. Signed-off-by: Omar Sandoval --- tests/btrfs/173 | 55 + tests/btrfs/173.out | 5 + tests/btrfs/group | 1 + 3 files changed, 61 insertion

[PATCH 6/7] btrfs: test device add/remove/replace with an active swap file

2018-11-02 Thread Omar Sandoval
From: Omar Sandoval Make sure that we don't remove or replace a device with an active swap file but can add, remove, and replace other devices. Signed-off-by: Omar Sandoval --- tests/btrfs/176 | 82 + tests/btrfs/176.out | 5 +++ tests/btrfs/gro

[PATCH 0/7] fstests: test Btrfs swapfile support

2018-11-02 Thread Omar Sandoval
From: Omar Sandoval This series fixes a couple of generic swapfile tests and adds some Btrfs-specific swapfile tests. Btrfs swapfile support is scheduled for 4.21 [1]. 1: https://www.spinics.net/lists/linux-btrfs/msg83454.html Thanks! Omar Sandoval (7): generic/{472,496,497}: fix $seeqres ty

[PATCH 4/7] btrfs: test invalid operations on a swap file

2018-11-02 Thread Omar Sandoval
From: Omar Sandoval Btrfs forbids some operations which should not be done on a swap file. Signed-off-by: Omar Sandoval --- tests/btrfs/174 | 66 + tests/btrfs/174.out | 10 +++ tests/btrfs/group | 1 + 3 files changed, 77 insertions(+) c

[PATCH 5/7] btrfs: test swap files on multiple devices

2018-11-02 Thread Omar Sandoval
From: Omar Sandoval Swap files currently need to exist on exactly one device in exactly one place. Signed-off-by: Omar Sandoval --- tests/btrfs/175 | 73 + tests/btrfs/175.out | 8 + tests/btrfs/group | 1 + 3 files changed, 82 insertions

Re: Salvage files from broken btrfs

2018-11-02 Thread Qu Wenruo
On 2018/11/3 上午1:18, M. Klingmann wrote: > On 02.11.2018 at 15:45 Qu Wenruo wrote: >> On 2018/11/2 下午10:30, M. Klingmann wrote: >>> On 31.10.2018 at 01:03 Qu Wenruo wrote: My plan for such recovery is: 1) btrfs ins dump-super to make sure system chunk array is valid 2) btrfs-f

Re: fsck lowmem mode only: ERROR: errors found in fs roots

2018-11-02 Thread Su Yue
On 2018/11/2 10:10 PM, Christoph Anton Mitterer wrote: Hey Su. Sorry for the late reply cause I'm busy at other things. Anything further I need to do in this matter or can I consider it "solved" and you won't need further testing by my side, but just PR the patches of that branch? :-)

Re: fsck lowmem mode only: ERROR: errors found in fs roots

2018-11-02 Thread Christoph Anton Mitterer
On Sat, 2018-11-03 at 09:34 +0800, Su Yue wrote: > Sorry for the late reply cause I'm busy at other things. No worries :-) > I just looked through related codes and found the bug. > The patches can fix it. So no need to do more tests. > Thanks to your tests and patience. :) Thanks for fixing :-)