[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5dd45085-1135-4897-91b1-986b72a99376@linux.dev>
Date: Thu, 4 Dec 2025 07:38:46 +0800
From: Dongsheng Yang <dongsheng.yang@...ux.dev>
To: Li Chen <me@...ux.beauty>, dm-devel@...ts.linux.dev,
linux-kernel@...r.kernel.org, Zheng Gu <cengku@...il.com>
Subject: Re: [PATCH 1/2] dm pcache: fix cache info indexing
在 12/3/2025 1:56 PM, Dongsheng Yang 写道:
>
> 在 12/2/2025 8:11 PM, Li Chen 写道:
>> From: Li Chen <chenl311@...natelecom.cn>
>>
>
>> + int index = ((char *)cache_info_addr - (char
>> *)cache->cache_info_addr) /
>> + PCACHE_CACHE_INFO_SIZE;
>> +
>> + cache->info_index = (index + 1) % PCACHE_META_INDEX_MAX;
>
>
> Don't advance info_index at init stage, cache->info_index means the
> current index, not the next index.
>
> It will be advanced in cache_info_write() after write cache_info into
> next slot.
My bad, ->info_index means next slot, so advance it is correct.
>
> In addition, cache->info_index initialization should be after the
> data_crc checking.
>
> Thanx
>
>> +
>> if (opts->data_crc !=
>> (cache->cache_info.flags &
>> PCACHE_CACHE_FLAGS_DATA_CRC)) {
>> pcache_dev_err(pcache, "invalid option for data_crc:
>> %s, expected: %s",
>
Powered by blists - more mailing lists