Re: [PATCH 03/19] btrfs: keep track of which extents have been discarded

2019-10-15 Thread Dennis Zhou
On Tue, Oct 15, 2019 at 02:17:55PM +0200, David Sterba wrote: > On Mon, Oct 07, 2019 at 04:17:34PM -0400, Dennis Zhou wrote: > > @@ -2165,6 +2173,7 @@ static bool try_merge_free_space(struct > > btrfs_free_space_ctl *ctl, > > bool merged = false; > > u64 offset = info->offset; > > u64

Re: [PATCH 03/19] btrfs: keep track of which extents have been discarded

2019-10-15 Thread David Sterba
On Mon, Oct 07, 2019 at 04:17:34PM -0400, Dennis Zhou wrote: > @@ -2165,6 +2173,7 @@ static bool try_merge_free_space(struct > btrfs_free_space_ctl *ctl, > bool merged = false; > u64 offset = info->offset; > u64 bytes = info->bytes; > + bool is_trimmed = btrfs_free_space_trim

Re: [PATCH 03/19] btrfs: keep track of which extents have been discarded

2019-10-11 Thread Dennis Zhou
On Thu, Oct 10, 2019 at 09:40:37AM -0400, Josef Bacik wrote: > On Mon, Oct 07, 2019 at 06:38:10PM -0400, Dennis Zhou wrote: > > On Mon, Oct 07, 2019 at 04:37:28PM -0400, Josef Bacik wrote: > > > On Mon, Oct 07, 2019 at 04:17:34PM -0400, Dennis Zhou wrote: > > > > Async discard will use the free spa

Re: [PATCH 03/19] btrfs: keep track of which extents have been discarded

2019-10-11 Thread Dennis Zhou
On Tue, Oct 08, 2019 at 03:46:18PM +0300, Nikolay Borisov wrote: > > > On 7.10.19 г. 23:17 ч., Dennis Zhou wrote: > > Async discard will use the free space cache as backing knowledge for > > which extents to discard. This patch plumbs knowledge about which > > extents need to be discarded into th

Re: [PATCH 03/19] btrfs: keep track of which extents have been discarded

2019-10-10 Thread Josef Bacik
On Mon, Oct 07, 2019 at 06:38:10PM -0400, Dennis Zhou wrote: > On Mon, Oct 07, 2019 at 04:37:28PM -0400, Josef Bacik wrote: > > On Mon, Oct 07, 2019 at 04:17:34PM -0400, Dennis Zhou wrote: > > > Async discard will use the free space cache as backing knowledge for > > > which extents to discard. Thi

Re: [PATCH 03/19] btrfs: keep track of which extents have been discarded

2019-10-08 Thread Nikolay Borisov
On 7.10.19 г. 23:17 ч., Dennis Zhou wrote: > Async discard will use the free space cache as backing knowledge for > which extents to discard. This patch plumbs knowledge about which > extents need to be discarded into the free space cache from > unpin_extent_range(). > > An untrimmed extent can

Re: [PATCH 03/19] btrfs: keep track of which extents have been discarded

2019-10-07 Thread Dennis Zhou
On Mon, Oct 07, 2019 at 04:37:28PM -0400, Josef Bacik wrote: > On Mon, Oct 07, 2019 at 04:17:34PM -0400, Dennis Zhou wrote: > > Async discard will use the free space cache as backing knowledge for > > which extents to discard. This patch plumbs knowledge about which > > extents need to be discarded

Re: [PATCH 03/19] btrfs: keep track of which extents have been discarded

2019-10-07 Thread Josef Bacik
On Mon, Oct 07, 2019 at 04:17:34PM -0400, Dennis Zhou wrote: > Async discard will use the free space cache as backing knowledge for > which extents to discard. This patch plumbs knowledge about which > extents need to be discarded into the free space cache from > unpin_extent_range(). > > An untri

[PATCH 03/19] btrfs: keep track of which extents have been discarded

2019-10-07 Thread Dennis Zhou
Async discard will use the free space cache as backing knowledge for which extents to discard. This patch plumbs knowledge about which extents need to be discarded into the free space cache from unpin_extent_range(). An untrimmed extent can merge with everything as this is a new region. Absorbing