/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2012, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
CFS_MODULE_PARM(ping_srv_workitems, "i", int, 0644, "# PING server workitems");
typedef struct {
- cfs_spinlock_t pnd_lock; /* serialize */
- int pnd_counter; /* sequence counter */
+ spinlock_t pnd_lock; /* serialize */
+ int pnd_counter; /* sequence counter */
} lst_ping_data_t;
static lst_ping_data_t lst_ping_data;
LASSERT(tsi->tsi_is_client);
LASSERT(sn != NULL && (sn->sn_features & ~LST_FEATS_MASK) == 0);
- cfs_spin_lock_init(&lst_ping_data.pnd_lock);
- lst_ping_data.pnd_counter = 0;
+ spin_lock_init(&lst_ping_data.pnd_lock);
+ lst_ping_data.pnd_counter = 0;
- return 0;
+ return 0;
}
static void
req->pnr_magic = LST_PING_TEST_MAGIC;
- cfs_spin_lock(&lst_ping_data.pnd_lock);
- req->pnr_seq = lst_ping_data.pnd_counter ++;
- cfs_spin_unlock(&lst_ping_data.pnd_lock);
+ spin_lock(&lst_ping_data.pnd_lock);
+ req->pnr_seq = lst_ping_data.pnd_counter++;
+ spin_unlock(&lst_ping_data.pnd_lock);
- cfs_fs_timeval(&tv);
- req->pnr_time_sec = tv.tv_sec;
- req->pnr_time_usec = tv.tv_usec;
+ cfs_fs_timeval(&tv);
+ req->pnr_time_sec = tv.tv_sec;
+ req->pnr_time_usec = tv.tv_usec;
- return rc;
+ return rc;
}
static void