On Tue, Sep 14, 2021 at 12:10 PM Nick Desaulniers <ndesaulniers@xxxxxxxxxx> wrote: > > Isn't the parameter `blksize` of `nbd_set_size` declared as `loff_t`? So? I'm not seeing your point. We've checked the range of it - in loff_t. So the *value* is already checked, and most definitely fits in 'unsigned long'. So __ffs() is perfectly fine. It will truncate that loff_t to a sane type. What is the problem you're trying to solve? Linus