Whamcloud - gitweb
bz-13289 and bz-13315
authorwalter <walter>
Tue, 25 Sep 2007 15:36:58 +0000 (15:36 +0000)
committerwalter <walter>
Tue, 25 Sep 2007 15:36:58 +0000 (15:36 +0000)
lustre/include/lustre_cfg.h
lustre/lov/lov_offset.c
lustre/ptlrpc/pinger.c

index 13fa4e5..89c5447 100644 (file)
@@ -63,24 +63,24 @@ enum lcfg_command_type {
 
 struct lustre_cfg_bufs {
         void    *lcfg_buf[LUSTRE_CFG_MAX_BUFCOUNT];
 
 struct lustre_cfg_bufs {
         void    *lcfg_buf[LUSTRE_CFG_MAX_BUFCOUNT];
-        uint32_t lcfg_buflen[LUSTRE_CFG_MAX_BUFCOUNT];
-        uint32_t lcfg_bufcount;
+        __u32    lcfg_buflen[LUSTRE_CFG_MAX_BUFCOUNT];
+        __u32    lcfg_bufcount;
 };
 
 /* Mountconf transitional hack, should go away after 1.6 */
 #define LCFG_FLG_MOUNTCONF 0x400
 
 struct lustre_cfg {
 };
 
 /* Mountconf transitional hack, should go away after 1.6 */
 #define LCFG_FLG_MOUNTCONF 0x400
 
 struct lustre_cfg {
-        uint32_t lcfg_version;
-        uint32_t lcfg_command;
+        __u32 lcfg_version;
+        __u32 lcfg_command;
 
 
-        uint32_t lcfg_num; 
-        uint32_t lcfg_flags;
-        uint64_t lcfg_nid;
-        uint32_t lcfg_nal;                      /* not used any more */
+        __u32 lcfg_num; 
+        __u32 lcfg_flags;
+        __u64 lcfg_nid;
+        __u32 lcfg_nal;                      /* not used any more */
 
 
-        uint32_t lcfg_bufcount;
-        uint32_t lcfg_buflens[0];
+        __u32 lcfg_bufcount;
+        __u32 lcfg_buflens[0];
 };
 
 #define LUSTRE_CFG_BUFLEN(lcfg, idx)            \
 };
 
 #define LUSTRE_CFG_BUFLEN(lcfg, idx)            \
@@ -89,9 +89,9 @@ struct lustre_cfg {
          : (lcfg)->lcfg_buflens[(idx)])
 
 static inline void lustre_cfg_bufs_set(struct lustre_cfg_bufs *bufs,
          : (lcfg)->lcfg_buflens[(idx)])
 
 static inline void lustre_cfg_bufs_set(struct lustre_cfg_bufs *bufs,
-                                       uint32_t                index,
+                                       __u32                   index,
                                        void                   *buf,
                                        void                   *buf,
-                                       uint32_t                buflen)
+                                       __u32                   buflen)
 {
         if (index >= LUSTRE_CFG_MAX_BUFCOUNT)
                 return;
 {
         if (index >= LUSTRE_CFG_MAX_BUFCOUNT)
                 return;
@@ -106,7 +106,7 @@ static inline void lustre_cfg_bufs_set(struct lustre_cfg_bufs *bufs,
 }
 
 static inline void lustre_cfg_bufs_set_string(struct lustre_cfg_bufs *bufs,
 }
 
 static inline void lustre_cfg_bufs_set_string(struct lustre_cfg_bufs *bufs,
-                                              uint32_t index,
+                                              __u32 index,
                                               char *str)
 {
         lustre_cfg_bufs_set(bufs, index, str, str ? strlen(str) + 1 : 0);
                                               char *str)
 {
         lustre_cfg_bufs_set(bufs, index, str, str ? strlen(str) + 1 : 0);
@@ -175,7 +175,7 @@ static inline char *lustre_cfg_string(struct lustre_cfg *lcfg, int index)
         return s;
 }
 
         return s;
 }
 
-static inline int lustre_cfg_len(uint32_t bufcount, uint32_t *buflens)
+static inline int lustre_cfg_len(__u32 bufcount, __u32 *buflens)
 {
         int i;
         int len;
 {
         int i;
         int len;
index 87597b2..4717882 100644 (file)
@@ -119,7 +119,7 @@ int lov_stripe_offset(struct lov_stripe_md *lsm, obd_off lov_off,
 {
         unsigned long ssize  = lsm->lsm_stripe_size;
         unsigned long swidth, stripe_off, this_stripe;
 {
         unsigned long ssize  = lsm->lsm_stripe_size;
         unsigned long swidth, stripe_off, this_stripe;
-        uint64_t l_off, s_off;
+        __u64 l_off, s_off;
         int magic = lsm->lsm_magic;
         int ret = 0;
 
         int magic = lsm->lsm_magic;
         int ret = 0;
 
index b1995e6..ba7aa39 100644 (file)
@@ -64,11 +64,13 @@ int ptlrpc_ping(struct obd_import *imp)
         RETURN(rc);
 }
 
         RETURN(rc);
 }
 
-static void ptlrpc_update_next_ping(struct obd_import *imp)
+void ptlrpc_update_next_ping(struct obd_import *imp)
 {
 {
+#ifdef ENABLE_PINGER
         imp->imp_next_ping = cfs_time_shift(
                                 (imp->imp_state == LUSTRE_IMP_DISCON ?
                                  RECONNECT_INTERVAL : PING_INTERVAL));
         imp->imp_next_ping = cfs_time_shift(
                                 (imp->imp_state == LUSTRE_IMP_DISCON ?
                                  RECONNECT_INTERVAL : PING_INTERVAL));
+#endif /* ENABLE_PINGER */
 }
 
 void ptlrpc_ping_import_soon(struct obd_import *imp)
 }
 
 void ptlrpc_ping_import_soon(struct obd_import *imp)