Re: [PATCH v8] sbitmap: fix io hung due to race on sbitmap_word::cleared

From: Bart Van Assche
Date: Tue Jul 16 2024 - 17:01:45 EST


On 7/16/24 1:26 AM, Yang Yang wrote:
This patch achieves two purposes:
1. Check on ->cleared and update on both ->cleared and ->word need to
be done atomically, and using spinlock could be the simplest solution.
2. Add extra check in sbitmap_deferred_clear(), to identify whether
->word has free bits.

Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>