From: Dongsheng Yang <dongsheng.yang@linux.dev>
To: Li Chen <me@linux.beauty>,
dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
Zheng Gu <cengku@gmail.com>
Subject: Re: [PATCH 1/2] dm pcache: fix cache info indexing
Date: Thu, 4 Dec 2025 07:38:46 +0800 [thread overview]
Message-ID: <5dd45085-1135-4897-91b1-986b72a99376@linux.dev> (raw)
In-Reply-To: <3222d76f-3710-4238-b90e-cd1deb0d0912@linux.dev>
在 12/3/2025 1:56 PM, Dongsheng Yang 写道:
>
> 在 12/2/2025 8:11 PM, Li Chen 写道:
>> From: Li Chen <chenl311@chinatelecom.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",
>
next prev parent reply other threads:[~2025-12-03 23:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 12:11 [PATCH 0/2] dm-pcache: fix metadata indexing and persistence issues Li Chen
2025-12-02 12:11 ` [PATCH 1/2] dm pcache: fix cache info indexing Li Chen
2025-12-03 5:56 ` Dongsheng Yang
2025-12-03 23:38 ` Dongsheng Yang [this message]
2025-12-02 12:11 ` [PATCH 2/2] dm pcache: fix segment " Li Chen
2025-12-03 5:57 ` Dongsheng Yang
2025-12-03 23:38 ` Dongsheng Yang
2025-12-02 19:09 ` [PATCH 0/2] dm-pcache: fix metadata indexing and persistence issues Mikulas Patocka
2025-12-03 5:56 ` Dongsheng Yang
2025-12-03 23:38 ` Dongsheng Yang
2025-12-04 1:38 ` Dongsheng Yang
2025-12-05 9:12 ` Li Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5dd45085-1135-4897-91b1-986b72a99376@linux.dev \
--to=dongsheng.yang@linux.dev \
--cc=cengku@gmail.com \
--cc=dm-devel@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=me@linux.beauty \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox