Whamcloud - gitweb
LU-18231 obd: Add a bitmap for the flags 12/56412/5
authorRonnie Sahlberg <rsahlberg@whamcloud.com>
Thu, 19 Sep 2024 02:24:42 +0000 (22:24 -0400)
committerOleg Drokin <green@whamcloud.com>
Mon, 9 Dec 2024 06:10:46 +0000 (06:10 +0000)
We will use this bitmap and convert the current bitfields
into bits that are set/cleared/tested using atomic bit operations.

Signed-off-by: Ronnie Sahlberg <rsahlberg@whamcloud.com>
Change-Id: I59ee4621926d0bd79ed0187f6058b888e40315f4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56412
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/obd.h

index 1e60378..d12a0ae 100644 (file)
@@ -593,6 +593,11 @@ struct obd_llog_group {
        spinlock_t         olg_lock;
 };
 
+/* Obd flag bits */
+enum {
+      OBDF_NUM_FLAGS,
+};
+
 /* corresponds to one of the obd's */
 #define OBD_DEVICE_MAGIC        0XAB5CD6EF
 
@@ -607,6 +612,7 @@ struct obd_device {
        char                             obd_name[MAX_OBD_NAME];
 
        /* bitfield modification is protected by obd_dev_lock */
+       DECLARE_BITMAP(obd_flags, OBDF_NUM_FLAGS);
        unsigned long
                obd_attached:1,         /* finished attach */
                obd_set_up:1,           /* finished setup */