Re: [PATCH] null_blk: reset cache state before device setup

From: Jens Axboe

Date: Tue Nov 03 2026 - 10:12:54 EST



On Mon, 26 Oct 2026 01:11:33 +0900, Baek Kyu, Kim wrote:
> The CACHE flag belongs to nullb_device, which outlives each powered-on
> nullb instance. Power-off discards the runtime cache but leaves the flag
> set. If cache_size changes from 1 to 0 before the next power-on, the
> queue advertises write-through while new page writes still go into the
> cache tree. A completed write can then disappear at the next power-off.
>
> Clear CACHE before creating the new instance. The existing cache_size
> setup sets it again when the new instance needs a cache.
>
> [...]

Applied, thanks!

[1/1] null_blk: reset cache state before device setup
commit: 5a4236bf22622c291a96c139bfe54117f4cf1af6

Best regards,
--
Jens Axboe