From: Bobi Jam Date: Thu, 10 Nov 2011 07:43:44 +0000 (+0800) Subject: LU-831 header: struct bit field should be unsigned type X-Git-Tag: 2.1.53~68 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=a296e9433919a6d709ae7826ecc5310d9e2d1365 LU-831 header: struct bit field should be unsigned type 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 Change-Id: Ib252b4e89ce6b3f898e2da11a60de9aa9201119c Reviewed-on: http://review.whamcloud.com/1685 Reviewed-by: Fan Yong Tested-by: Hudson Reviewed-by: Andreas Dilger Tested-by: Maloo --- diff --git a/lustre/include/linux/lustre_intent.h b/lustre/include/linux/lustre_intent.h index 6014a19..0c3e325 100644 --- a/lustre/include/linux/lustre_intent.h +++ b/lustre/include/linux/lustre_intent.h @@ -44,13 +44,13 @@ /* 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 { diff --git a/lustre/include/lustre_dlm.h b/lustre/include/lustre_dlm.h index b54e656..91c715c 100644 --- a/lustre/include/lustre_dlm.h +++ b/lustre/include/lustre_dlm.h @@ -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; diff --git a/lustre/include/obd.h b/lustre/include/obd.h index 45e473f..f32d5ca 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -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 */