Whamcloud - gitweb
Branch b1_6
authorjohann <johann>
Thu, 30 Aug 2007 16:16:33 +0000 (16:16 +0000)
committerjohann <johann>
Thu, 30 Aug 2007 16:16:33 +0000 (16:16 +0000)
b=12459
i=adilger,tianzy
i=scjody

Severity   : normal
Bugzilla   : 12459
Description: Client eviction due to failover config
Details    : after a connection loss, the lustre client should attempt to
     reconnect to the last active server first before trying the
     other potential connections.

lnet/include/libcfs/darwin/darwin-time.h
lnet/include/libcfs/linux/linux-time.h
lnet/include/libcfs/user-time.h
lnet/include/libcfs/winnt/winnt-time.h

index 43ad274..35862a6 100644 (file)
@@ -213,6 +213,7 @@ static inline void cfs_duration_nsec(cfs_duration_t d, struct timespec *s)
 #define cfs_time_add_64     cfs_time_add
 #define cfs_time_shift_64   cfs_time_shift
 #define cfs_time_before_64  cfs_time_before
+#define cfs_time_beforeq_64 cfs_time_beforeq
 
 /* 
  * One jiffy (in nanoseconds)
index 1b31dd8..626defd 100644 (file)
@@ -281,12 +281,17 @@ static inline int cfs_time_before_64(__u64 t1, __u64 t2)
         return (__s64)t2 - (__s64)t1 > 0;
 }
 
+static inline int cfs_time_beforeq_64(__u64 t1, __u64 t2)
+{
+        return (__s64)t2 - (__s64)t1 >= 0;
+}
+
 #else
 #define cfs_time_current_64 cfs_time_current
 #define cfs_time_add_64     cfs_time_add
 #define cfs_time_shift_64   cfs_time_shift
 #define cfs_time_before_64  cfs_time_before
-
+#define cfs_time_beforeq_64 cfs_time_beforeq
 #endif
 
 /*
index 86cbc2d..3fb801d 100644 (file)
@@ -181,6 +181,7 @@ static inline cfs_duration_t cfs_time_sub(cfs_time_t t1, cfs_time_t t2)
 #define cfs_time_add_64     cfs_time_add
 #define cfs_time_shift_64   cfs_time_shift
 #define cfs_time_before_64  cfs_time_before
+#define cfs_time_beforeq_64 cfs_time_beforeq
 
 #define CFS_TIME_T              "%lu"
 #define CFS_DURATION_T          "%ld"
index d31f854..a7a570c 100644 (file)
@@ -221,6 +221,7 @@ static inline void cfs_fs_time_nsec(cfs_fs_time_t *t, struct timespec *s)
 #define cfs_time_add_64     cfs_time_add
 #define cfs_time_shift_64   cfs_time_shift
 #define cfs_time_before_64  cfs_time_before
+#define cfs_time_beforeq_64 cfs_time_beforeq
 
 /*
  * One jiffy