Re: [PATCH v19 3/7] xbitmap: add more operations
From: Matthew Wilcox
Date: Fri Dec 15 2017 - 13:43:40 EST
On Tue, Dec 12, 2017 at 07:55:55PM +0800, Wei Wang wrote:
> +int xb_preload_and_set_bit(struct xb *xb, unsigned long bit, gfp_t gfp);
I'm struggling to understand when one would use this. The xb_ API
requires you to handle your own locking. But specifying GFP flags
here implies you can sleep. So ... um ... there's no locking?
> +void xb_clear_bit_range(struct xb *xb, unsigned long start, unsigned long end);
That's xb_zero() which you deleted with the previous patch ... remember,
keep things as close as possible to the bitmap API.