#define DEBUG_SUBSYSTEM S_LDLM
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-#else
-# include <liblustre.h>
-#endif
+#include <libcfs/libcfs.h>
#include <obd.h>
#include <obd_class.h>
#include <lustre_dlm.h>
}
EXPORT_SYMBOL(target_client_add_cb);
-#ifdef __KERNEL__
static void
check_and_start_recovery_timer(struct obd_device *obd,
struct ptlrpc_request *req, int new_client);
-#else
-static inline void
-check_and_start_recovery_timer(struct obd_device *obd,
- struct ptlrpc_request *req, int new_client)
-{
-}
-#endif
int target_handle_connect(struct ptlrpc_request *req)
{
if (rc)
GOTO(out, rc);
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 52, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 53, 0)
/* 2.2.0 clients always swab nidtbl entries due to a bug, so server
* will do the swabbing for if the client is using the same endianness.
*
* will never do MNE swabbing, let the client handle that. LU-1644 */
export->exp_need_mne_swab = !ptlrpc_req_need_swab(req) &&
!(data->ocd_connect_flags & OBD_CONNECT_MNE_SWAB);
-#else
-#warning "LU-1644: Remove old OBD_CONNECT_MNE_SWAB fixup and exp_need_mne_swab"
#endif
LASSERT(target->u.obt.obt_magic == OBT_MAGIC);
spin_unlock(&req->rq_export->exp_lock);
}
-#ifdef __KERNEL__
static void target_finish_recovery(struct obd_device *obd)
{
ENTRY;
libcfs_nid2str(req->rq_peer.nid));
handle_recovery_req(thread, req,
trd->trd_recovery_handler);
- target_request_copy_put(req);
+ /* Because the waiting client can not send ping to server,
+ * so we need refresh the last_request_time, to avoid the
+ * export is being evicted */
+ ptlrpc_update_export_timer(req->rq_export, 0);
+ target_request_copy_put(req);
}
delta = (jiffies - delta) / HZ;
}
EXPORT_SYMBOL(target_recovery_init);
-#endif /* __KERNEL__ */
static int target_process_req_flags(struct obd_device *obd,
struct ptlrpc_request *req)