Hi Dongsheng, ---- On Thu, 04 Dec 2025 09:38:17 +0800 Dongsheng Yang <[email protected]> wrote --- > > 在 12/4/2025 7:38 AM, Dongsheng Yang 写道: > > > > 在 12/3/2025 1:56 PM, Dongsheng Yang 写道: > >> Hi, > >> > >> Thanx for your patches, there are some comments inline. > >> > >> According to these comments, I propose an update base on your patch > >> as [1]. > >> > >> BTW, I added a test case for this problem in dtg-tests: > >> > >> https://github.com/DataTravelGuide/dtg-tests/blob/main/pcache.py.data/pcache_misc_tests/case21_gc_percent_persistence_after_recreate.sh > >> > >> > >> > >> It update gc_percent online and recreate pcache device and check > >> gc_percen > >> > >> > >> [1]: > > > > > > ->info_index means next slot to write, so advancing it at init stage > > is correct > > > We need to think more thoroughly about the usage of the slot index. In > my original design, all slot indices represent the “current slot”. So at > initialization it is 0; if loading, we simply point it to the loaded > slot; and on write we advance afterwards. However, the problem now is > that in all write functions, they first write to the current slot, then > advance. > > Therefore I believe we should clarify that the meaning of the slot index > is “the current slot,” and stick to the original design. We only need to > modify the write functions: first perform the advance, and then write > into the correct slot. Sounds good, thanks.
Regards, Li
