Re: [PATCH V2 12/12] badblocks: use sector_t instead of int to avoid truncation of badblocks length

From: Yu Kuai
Date: Tue Mar 04 2025 - 20:30:09 EST


Hi,

在 2025/02/27 23:27, Ira Weiny 写道:
__add_badblock_range() in drivers/nvdimm/badrange.c limits the number of
badblocks which can be set in each call to badblocks_set().

After this change can that algorithm be eliminated? I'm not familiar with
the badblocks code to know for certain.

This is another story, badblocks records are at most 512, and each
record is at most 512 sectors, so pass in INT_MAX will fail 100%.

Thanks,
Kuai