Re: [PATCH 4/8] read-cache: add invalidate parameter to remove_marked_cache_entries

2018-12-11 Thread Thomas Gummerer
On 12/10, Elijah Newren wrote: > On Mon, Dec 10, 2018 at 8:09 AM Duy Nguyen wrote: > > > > On Sun, Dec 9, 2018 at 9:05 PM Thomas Gummerer wrote: > > > > > > When marking cache entries for removal, and later removing them all at > > > once using 'remove_marked_cache_entries()', cache entries curre

Re: [PATCH 4/8] read-cache: add invalidate parameter to remove_marked_cache_entries

2018-12-10 Thread Junio C Hamano
Duy Nguyen writes: > I'm still a bit scared of this invalidation business in unpack-trees. I too was (and I suspect that I would realize that I still am, if I take another fresh look at the current code) afraid when I did the cache-tree work and decided to invalidate it as a whole upfront. > Th

Re: [PATCH 4/8] read-cache: add invalidate parameter to remove_marked_cache_entries

2018-12-10 Thread Elijah Newren
On Mon, Dec 10, 2018 at 10:34 AM Duy Nguyen wrote: > > On Mon, Dec 10, 2018 at 7:25 PM Elijah Newren wrote: > > > I'm not the unpack-trees man (I think that would still be Junio). And > > > I'm not saying it's sane either. I think it's just some leftover > > > things since Linus split "the index"

Re: [PATCH 4/8] read-cache: add invalidate parameter to remove_marked_cache_entries

2018-12-10 Thread Duy Nguyen
On Mon, Dec 10, 2018 at 7:25 PM Elijah Newren wrote: > > I'm not the unpack-trees man (I think that would still be Junio). And > > I'm not saying it's sane either. I think it's just some leftover > > things since Linus split "the index" in unpack-tree operation to > > 'src', 'result' and 'dst' man

Re: [PATCH 4/8] read-cache: add invalidate parameter to remove_marked_cache_entries

2018-12-10 Thread Elijah Newren
On Mon, Dec 10, 2018 at 10:19 AM Duy Nguyen wrote: > > On Mon, Dec 10, 2018 at 7:09 PM Elijah Newren wrote: > > > > For the two current callsites, unpack-trees seems to do this > > > > invalidation itself internally. > > > > > > I'm still a bit scared of this invalidation business in unpack-trees

Re: [PATCH 4/8] read-cache: add invalidate parameter to remove_marked_cache_entries

2018-12-10 Thread Duy Nguyen
On Mon, Dec 10, 2018 at 7:09 PM Elijah Newren wrote: > > > For the two current callsites, unpack-trees seems to do this > > > invalidation itself internally. > > > > I'm still a bit scared of this invalidation business in unpack-trees. > > The thing is, we handle two separate index_state there, sr

Re: [PATCH 4/8] read-cache: add invalidate parameter to remove_marked_cache_entries

2018-12-10 Thread Elijah Newren
On Mon, Dec 10, 2018 at 8:09 AM Duy Nguyen wrote: > > On Sun, Dec 9, 2018 at 9:05 PM Thomas Gummerer wrote: > > > > When marking cache entries for removal, and later removing them all at > > once using 'remove_marked_cache_entries()', cache entries currently > > have to be invalidated manually in

Re: [PATCH 4/8] read-cache: add invalidate parameter to remove_marked_cache_entries

2018-12-10 Thread Duy Nguyen
On Sun, Dec 9, 2018 at 9:05 PM Thomas Gummerer wrote: > > When marking cache entries for removal, and later removing them all at > once using 'remove_marked_cache_entries()', cache entries currently > have to be invalidated manually in the cache tree and in the untracked > cache. > > Add an invali

[PATCH 4/8] read-cache: add invalidate parameter to remove_marked_cache_entries

2018-12-09 Thread Thomas Gummerer
When marking cache entries for removal, and later removing them all at once using 'remove_marked_cache_entries()', cache entries currently have to be invalidated manually in the cache tree and in the untracked cache. Add an invalidate flag to the function. With the flag set, the function will tak