Re: [PATCH] generic: add test for fsync after shrinking truncate and rename

2019-03-04 Thread Amir Goldstein
On Tue, Mar 5, 2019 at 12:31 AM Filipe Manana wrote: > > On Mon, Mar 4, 2019 at 5:59 PM Amir Goldstein wrote: > > > > On Mon, Mar 4, 2019 at 5:23 PM Filipe Manana wrote: > > > > > > On Mon, Mar 4, 2019 at 3:04 PM Amir Goldstein wrote: > > > > > > > > On Mon, Mar 4, 2019 at 4:44 PM wrote: > > >

Re: [PATCH] generic: add test for fsync after shrinking truncate and rename

2019-03-04 Thread Amir Goldstein
On Tue, Mar 5, 2019 at 2:50 AM Dave Chinner wrote: > > On Mon, Mar 04, 2019 at 05:04:23PM +0200, Amir Goldstein wrote: > > On Mon, Mar 4, 2019 at 4:44 PM wrote: > > > > > > From: Filipe Manana > > > > > > Test that if we truncate a file to reduce its size, rename it and then > > > fsync it, afte

Re: [PATCH] generic: add test for fsync after shrinking truncate and rename

2019-03-04 Thread Vijay Chidambaram
On Mon, Mar 4, 2019 at 7:00 PM Dave Chinner wrote: > > On Tue, Mar 05, 2019 at 11:50:20AM +1100, Dave Chinner wrote: > > On Mon, Mar 04, 2019 at 05:04:23PM +0200, Amir Goldstein wrote: > > > On Mon, Mar 4, 2019 at 4:44 PM wrote: > > > > > > > > From: Filipe Manana > > > > > > > > Test that if we

Re: [PATCH] generic: add test for fsync after shrinking truncate and rename

2019-03-04 Thread Dave Chinner
On Tue, Mar 05, 2019 at 11:50:20AM +1100, Dave Chinner wrote: > On Mon, Mar 04, 2019 at 05:04:23PM +0200, Amir Goldstein wrote: > > On Mon, Mar 4, 2019 at 4:44 PM wrote: > > > > > > From: Filipe Manana > > > > > > Test that if we truncate a file to reduce its size, rename it and then > > > fsync

Re: [PATCH] generic: add test for fsync after shrinking truncate and rename

2019-03-04 Thread Dave Chinner
On Mon, Mar 04, 2019 at 05:04:23PM +0200, Amir Goldstein wrote: > On Mon, Mar 4, 2019 at 4:44 PM wrote: > > > > From: Filipe Manana > > > > Test that if we truncate a file to reduce its size, rename it and then > > fsync it, after a power failure the file has a correct size and name. > > > > I a

Re: [PATCH] generic: add test for fsync after shrinking truncate and rename

2019-03-04 Thread Filipe Manana
On Mon, Mar 4, 2019 at 5:59 PM Amir Goldstein wrote: > > On Mon, Mar 4, 2019 at 5:23 PM Filipe Manana wrote: > > > > On Mon, Mar 4, 2019 at 3:04 PM Amir Goldstein wrote: > > > > > > On Mon, Mar 4, 2019 at 4:44 PM wrote: > > > > > > > > From: Filipe Manana > > > > > > > > Test that if we trunca

Re: btrfs seriouse design issue

2019-03-04 Thread Jeff Mahoney
On 3/4/19 9:46 AM, Tomasz Kłoczko wrote: Hi, I just added new disk with btrfs and my intention was to use space of this new disk in multiple mountpoints of existing tree. So after create new btrfs pool on tol of new device I've created two subvolumes srv an lxc then after adding necessary entrie

[GIT PULL] Btrfs updates for 5.1, part 1

2019-03-04 Thread David Sterba
Hi, the branch contains usual mix of new features, core changes and fixes; full list below. I'm planning 2nd pull request, with a few more fixes that arrived recently but too close to merge window, will send it next week. Please pull, thanks. New features: - support zstd compression levels -

Re: [PATCH] generic: add test for fsync after shrinking truncate and rename

2019-03-04 Thread Amir Goldstein
On Mon, Mar 4, 2019 at 5:23 PM Filipe Manana wrote: > > On Mon, Mar 4, 2019 at 3:04 PM Amir Goldstein wrote: > > > > On Mon, Mar 4, 2019 at 4:44 PM wrote: > > > > > > From: Filipe Manana > > > > > > Test that if we truncate a file to reduce its size, rename it and then > > > fsync it, after a p

Re: Reproducer for "compressed data + hole data corruption bug, 2018 edition" still works on 4.20.7

2019-03-04 Thread Christoph Anton Mitterer
On Fri, 2019-02-15 at 12:02 +, Filipe Manana wrote: > Upgrade to a kernel with the patch (none yet) or build it from > source? > Not sure what kind of advice you are looking for. Well more something of the kind that Zygo wrote in his mail, i.e some explanation of the whole issue in order to fi

Re: Reproducer for "compressed data + hole data corruption bug, 2018 edition" still works on 4.20.7

2019-03-04 Thread Christoph Anton Mitterer
Hey. Thanks for your elaborate explanations :-) On Fri, 2019-02-15 at 00:40 -0500, Zygo Blaxell wrote: > The problem occurs only on reads. Data that is written to disk will > be OK, and can be read correctly by a fixed kernel. > > A kernel without the fix will give corrupt data on reads with

Re: [PATCH] generic: add test for fsync after shrinking truncate and rename

2019-03-04 Thread Filipe Manana
On Mon, Mar 4, 2019 at 3:04 PM Amir Goldstein wrote: > > On Mon, Mar 4, 2019 at 4:44 PM wrote: > > > > From: Filipe Manana > > > > Test that if we truncate a file to reduce its size, rename it and then > > fsync it, after a power failure the file has a correct size and name. > > > > I am not sur

Re: [PATCH] generic: add test for fsync after shrinking truncate and rename

2019-03-04 Thread Amir Goldstein
On Mon, Mar 4, 2019 at 4:44 PM wrote: > > From: Filipe Manana > > Test that if we truncate a file to reduce its size, rename it and then > fsync it, after a power failure the file has a correct size and name. > I am not sure that ext4/xfs semantics guaranty anything about persisting file name af

btrfs seriouse design issue

2019-03-04 Thread Tomasz Kłoczko
Hi, I just added new disk with btrfs and my intention was to use space of this new disk in multiple mountpoints of existing tree. So after create new btrfs pool on tol of new device I've created two subvolumes srv an lxc then after adding necessary entries in fstab to mount in /srv and /var/lib/lx

[PATCH] generic: add test for fsync after shrinking truncate and rename

2019-03-04 Thread fdmanana
From: Filipe Manana Test that if we truncate a file to reduce its size, rename it and then fsync it, after a power failure the file has a correct size and name. This test is motivated by a bug found in btrfs, which is fixed by a patch for the linux kernel titled: "Btrfs: fix incorrect file si

[PATCH] Btrfs: fix incorrect file size after shrinking truncate and fsync

2019-03-04 Thread fdmanana
From: Filipe Manana If we do a shrinking truncate against an inode which is already present in the respective log tree and then rename it, as part of logging the new name we end up logging an inode item that reflects the old size of the file (the one which we previously logged) and not the new sm

Btrfs balance convert does not balance reads+dealloc evenly across disks, any proper fix?

2019-03-04 Thread Richard Sanger
Hi, Firstly, thanks for all the development on btrfs, I've been using it on quite a few systems without any significant issues and have found features like snapshots very useful. I recently decided that raid6 was stable enough for data with raid1 metadata, and went about converting a raid1 array.