From: Junio C Hamano Date: Mon, 1 Mar 2021 22:02:56 +0000 (-0800) Subject: Merge branch 'jh/fsmonitor-prework' X-Git-Tag: v2.31.0-rc1~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=700696bcfc8dc0bbb763ba8a0c91688ad6c1fa7b;p=thirdparty%2Fgit.git Merge branch 'jh/fsmonitor-prework' Preliminary changes to fsmonitor integration. * jh/fsmonitor-prework: fsmonitor: refactor initialization of fsmonitor_last_update token fsmonitor: allow all entries for a folder to be invalidated fsmonitor: log FSMN token when reading and writing the index fsmonitor: log invocation of FSMonitor hook to trace2 read-cache: log the number of scanned files to trace2 read-cache: log the number of lstat calls to trace2 preload-index: log the number of lstat calls to trace2 p7519: add trace logging during perf test p7519: move watchman cleanup earlier in the test p7519: fix watchman watch-list test on Windows p7519: do not rely on "xargs -d" in test --- 700696bcfc8dc0bbb763ba8a0c91688ad6c1fa7b diff --cc fsmonitor.c index fe9e9d7baf,e12214b300..23f8a0c97e --- a/fsmonitor.c +++ b/fsmonitor.c @@@ -87,10 -82,16 +87,14 @@@ int read_fsmonitor_extension(struct ind } istate->fsmonitor_dirty = fsmonitor_dirty; - if (!istate->split_index && - istate->fsmonitor_dirty->bit_size > istate->cache_nr) - BUG("fsmonitor_dirty has more entries than the index (%"PRIuMAX" > %u)", - (uintmax_t)istate->fsmonitor_dirty->bit_size, istate->cache_nr); + if (!istate->split_index) + assert_index_minimum(istate, istate->fsmonitor_dirty->bit_size); - trace_printf_key(&trace_fsmonitor, "read fsmonitor extension successful"); + trace2_data_string("index", NULL, "extension/fsmn/read/token", + istate->fsmonitor_last_update); + trace_printf_key(&trace_fsmonitor, + "read fsmonitor extension successful '%s'", + istate->fsmonitor_last_update); return 0; }