Whamcloud - gitweb
LU-831 header: struct bit field should be unsigned type
authorBobi Jam <bobijam@whamcloud.com>
Thu, 10 Nov 2011 07:43:44 +0000 (15:43 +0800)
committerOleg Drokin <green@whamcloud.com>
Sun, 13 Nov 2011 23:09:16 +0000 (18:09 -0500)
Make sure struct bit fields be unsigned type, or else if they are read
from proc interface, they would showes as a big number equivalent to
-1.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ib252b4e89ce6b3f898e2da11a60de9aa9201119c
Reviewed-on: http://review.whamcloud.com/1685
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/include/linux/lustre_intent.h
lustre/include/lustre_dlm.h
lustre/include/obd.h

index 6014a19..0c3e325 100644 (file)
 
 /* intent IT_XXX are defined in lustre/include/obd.h */
 struct lustre_intent_data {
-        int       it_disposition;
-        int       it_status;
-        __u64     it_lock_handle;
-        __u64     it_lock_bits;
-        void     *it_data;
-        int       it_lock_mode;
-        int       it_lock_set:1;
+        int             it_disposition;
+        int             it_status;
+        __u64           it_lock_handle;
+        __u64           it_lock_bits;
+        void           *it_data;
+        int             it_lock_mode;
+        unsigned int    it_lock_set:1;
 };
 
 struct lookup_intent {
index b54e656..91c715c 100644 (file)
@@ -880,7 +880,6 @@ struct ldlm_enqueue_info {
         void *ei_cb_gl;  /* lock glimpse callback */
         void *ei_cb_wg;  /* lock weigh callback */
         void *ei_cbdata; /* Data to be passed into callbacks. */
-        short ei_async:1; /* async request */
 };
 
 extern struct obd_ops ldlm_obd_ops;
index 45e473f..f32d5ca 100644 (file)
@@ -307,7 +307,7 @@ struct filter_obd {
 
         obd_size             fo_readcache_max_filesize;
         cfs_spinlock_t       fo_flags_lock;
-        int                  fo_read_cache:1,   /**< enable read-only cache */
+        unsigned int         fo_read_cache:1,   /**< enable read-only cache */
                              fo_writethrough_cache:1,/**< read cache writes */
                              fo_mds_ost_sync:1, /**< MDS-OST orphan recovery*/
                              fo_raid_degraded:1;/**< RAID device degraded */