On Fri, 2016-09-09 at 07:55 -0600, Jens Axboe wrote:
On 09/08/2016 07:20 PM, Joe Perches wrote:
On Thu, 2016-09-08 at 17:12 -0400, Josef Bacik wrote:
In preparation for some future changes, change a few of the state bools over to[]
normal bits to set/clear properly.
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c[]
@@ -41,8 +41,12 @@+ unsigned long runtime_flags;
#include <linux/nbd.h>
+#define NBD_TIMEDOUT 0
+#define NBD_DISCONNECT_REQUESTED 1
+
struct nbd_device {
u32 flags;
Better to use DECLARE_BITMAP
It's a few flags, we know it fits in a long. There's no point to using
anything but that, and set/test/clear_bit().
It lets the reader know how it's used.