Re: [PATCH 0/3] introduce type based delalloc metadata reserve to fix some false enospc issues

2017-02-26 Thread Qu Wenruo
At 02/25/2017 04:23 PM, Stefan Priebe - Profihost AG wrote: Dear Qu, any news on your branch? I still don't see it merged anywhere. Greets, Stefan I just remember that Liu Bo has commented one of the patches, I'm afraid I can only push these patches until I addressed his concern. I'll

[PATCH 8/9] btrfs: qgroup: Introduce extent changeset for qgroup reserve functions

2017-02-26 Thread Qu Wenruo
Introduce a new parameter, struct extent_changeset for btrfs_qgroup_reserved_data() and its callers. Such extent_changeset was used in btrfs_qgroup_reserve_data() to record which range it reserved in current reserve, so it can free it at error path. The reason we need to export it to callers is,

[PATCH 5/9] btrfs: qgroup: Cleanup btrfs_qgroup_prepare_account_extents function

2017-02-26 Thread Qu Wenruo
Quite a lot of qgroup corruption happens due to wrong timing of calling btrfs_qgroup_prepare_account_extents(). Since the safest timing is calling it just before btrfs_qgroup_account_extents(), there is no need to separate these 2 function. Merging them will make code cleaner and less bug prone.

[PATCH 9/9] btrfs: qgroup: Fix qgroup reserved space underflow by only freeing reserved ranges

2017-02-26 Thread Qu Wenruo
[BUG] For the following case, btrfs can underflow qgroup reserved space at error path: (Page size 4K, function name without "btrfs_" prefix) Task A | Task B -- Buffered_write [0, 2K)

[PATCH 0/9 PULL REQUEST] Qgroup fixes for 4.11

2017-02-26 Thread Qu Wenruo
Pull request can be fetched from my github: https://github.com/adam900710/linux.git qgroup_fixes_for_4.11 The base is 6288d6eabc7505f42dda34a2c2962f91914be3a4. Author: Liu Bo Date: Tue Feb 21 12:12:58 2017 -0800 Btrfs: use the correct type when creating cow dio

[PATCH 3/9] btrfs: qgroup: Fix qgroup corruption caused by inode_cache mount option

2017-02-26 Thread Qu Wenruo
[BUG] The easist way to reproduce the bug is: -- # mkfs.btrfs -f $dev -n 16K # mount $dev $mnt -o inode_cache # btrfs quota enable $mnt # btrfs quota rescan -w $mnt # btrfs qgroup show $mnt qgroupid rfer excl 0/5 32.00KiB

[PATCH 7/9] btrfs: qgroup: Fix qgroup reserved space underflow caused by buffered write and quota enable

2017-02-26 Thread Qu Wenruo
[BUG] Under the following case, we can underflow qgroup reserved space. Task A|Task B --- Quota disabled | Buffered write | |- btrfs_check_data_free_space() |

[PATCH 2/9] btrfs: qgroup: Re-arrange tracepoint timing to co-operate with reserved space tracepoint

2017-02-26 Thread Qu Wenruo
Newly introduced qgroup reserved space trace points are normally nested into several common qgroup operations. While some other trace points are not well placed to co-operate with them, causing confusing output. This patch re-arrange trace_btrfs_qgroup_release_data() and

[PATCH 1/9] btrfs: qgroup: Add trace point for qgroup reserved space

2017-02-26 Thread Qu Wenruo
Introduce the following trace points: qgroup_update_reserve qgroup_meta_reserve These trace points are handy to trace qgroup reserve space related problems. Signed-off-by: Qu Wenruo --- fs/btrfs/qgroup.c| 15 +++ include/trace/events/btrfs.h |

[PATCH 4/9] btrfs: qgroup: Add quick exit for non-fs extents

2017-02-26 Thread Qu Wenruo
For btrfs_qgroup_account_extent(), modify make it exit quicker for non-fs extents. This will also reduce the noise in trace_btrfs_qgroup_account_extent event. Signed-off-by: Qu Wenruo --- fs/btrfs/qgroup.c | 41 +++-- 1 file changed,

[PATCH 6/9] btrfs: qgroup: Return actually freed bytes for qgroup release or free data

2017-02-26 Thread Qu Wenruo
btrfs_qgroup_release/free_data() only returns 0 or minus error number(ENOMEM is the only possible error). This is normally good enough, but sometimes we need the accurate byte number it freed/released. Change it to return actually released/freed bytenr number instead of 0 for success. And

Re: linux 4.8 kernel OOM

2017-02-26 Thread Janos Toth F.
So far 4.10.0 seems to be flawless for me. All the strange OOMs (which may or may not were related to Btrfs but it looked that way), random unexplained Btrfs mount failures (as well as some various other things totally unrelated to filesystems like sdhc card reader driver problems) which were

Re: [PATCH 0/3] introduce type based delalloc metadata reserve to fix some false enospc issues

2017-02-26 Thread Qu Wenruo
I sent mail to David asking about these unmerged patchset, but no reply yet. And to my surprise, the patch even disappeared from david's for-next branch. Not sure what's wrong with all these unmerged patches. Thanks, Qu At 02/25/2017 04:23 PM, Stefan Priebe - Profihost AG wrote: Dear Qu,

assertion failed: last_size == new_size, file: fs/btrfs/inode.c

2017-02-26 Thread Dave Jones
Hitting this fairly frequently.. I'm not sure if this is the same bug I've been hitting occasionally since 4.9. The assertion looks new to me at least. Dave assertion failed: last_size == new_size, file: fs/btrfs/inode.c, line: 4619 [ cut here ] kernel BUG at

Re: List of corruption cases for scrub

2017-02-26 Thread Lakshmipathi.G
On Fri, Feb 24, 2017 at 06:39:20PM +0100, Goffredo Baroncelli wrote: > Hi, > On 2017-02-24 03:32, Lakshmipathi.G wrote: > > Hi. > > > > I tried to a create list of corruption test scenarios for scrubbing process > > with RAID5. > > Here's the list: > >