removed cwd "./" (refer to Bugzilla 14399).
* File join has been disabled in this release, refer to Bugzilla 16929.
+Severity : enhancement
+Bugzilla : 19955
+Description: provide server to client comms path
+Details : server to client communications path via new LDLM_SET_INFO rpc
+
Severity : normal
Bugzilla : 20008
Description: truncate starts GFP_FS allocation under transaction causing deadlock
LDLM_BL_CALLBACK = 104,
LDLM_CP_CALLBACK = 105,
LDLM_GL_CALLBACK = 106,
+ LDLM_SET_INFO = 107,
LDLM_LAST_OPC
} ldlm_cmd_t;
#define LDLM_FIRST_OPC LDLM_ENQUEUE
int target_pack_pool_reply(struct ptlrpc_request *req);
int target_handle_ping(struct ptlrpc_request *req);
void target_committed_to_req(struct ptlrpc_request *req);
+int target_set_info_rpc(struct obd_import *imp, int opcode,
+ obd_count keylen, void *key,
+ obd_count vallen, void *val,
+ struct ptlrpc_request_set *set);
/* quotacheck callback, dqacq/dqrel callback handler */
int target_handle_qc_callback(struct ptlrpc_request *req);
#endif
extern const struct req_format RQF_OBD_PING;
+extern const struct req_format RQF_OBD_SET_INFO;
extern const struct req_format RQF_SEC_CTX;
/* MGS req_format */
extern const struct req_format RQF_MGS_TARGET_REG;
extern const struct req_format RQF_MDS_UNPIN;
extern const struct req_format RQF_MDS_CONNECT;
extern const struct req_format RQF_MDS_DISCONNECT;
-extern const struct req_format RQF_MDS_SET_INFO;
extern const struct req_format RQF_MDS_GET_INFO;
extern const struct req_format RQF_MDS_READPAGE;
extern const struct req_format RQF_MDS_WRITEPAGE;
extern const struct req_format RQF_OST_DESTROY;
extern const struct req_format RQF_OST_BRW;
extern const struct req_format RQF_OST_STATFS;
-extern const struct req_format RQF_OST_SET_INFO;
extern const struct req_format RQF_OST_SET_GRANT_INFO;
extern const struct req_format RQF_OST_GET_INFO_GENERIC;
extern const struct req_format RQF_OST_GET_INFO_LAST_ID;
};
/* get/set_info keys */
+#define KEY_ASYNC "async"
#define KEY_BLOCKSIZE_BITS "blocksize_bits"
#define KEY_BLOCKSIZE "blocksize"
#define KEY_CAPA_KEY "capa_key"
#define KEY_EVICT_BY_NID "evict_by_nid"
#define KEY_FIEMAP "fiemap"
#define KEY_FLUSH_CTX "flush_ctx"
+#define KEY_GRANT_SHRINK "grant_shrink"
+#define KEY_HSM_COPYTOOL_SEND "hsm_send"
#define KEY_INIT_RECOV_BACKUP "init_recov_bk"
#define KEY_INIT_RECOV "initial_recov"
+#define KEY_INTERMDS "inter_mds"
#define KEY_LAST_ID "last_id"
#define KEY_LOCK_TO_STRIPE "lock_to_stripe"
#define KEY_LOVDESC "lovdesc"
#define KEY_REGISTER_TARGET "register_target"
#define KEY_REVIMP_UPD "revimp_update"
#define KEY_SET_FS "set_fs"
+/* KEY_SET_INFO in lustre_idl.h */
#define KEY_SPTLRPC_CONF "sptlrpc_conf"
#define KEY_UNLINKED "unlinked"
-/* XXX unused ?*/
-#define KEY_INTERMDS "inter_mds"
-#define KEY_ASYNC "async"
-#define KEY_GRANT_SHRINK "grant_shrink"
+
struct lu_context;
}
#endif /* HAVE_QUOTA_SUPPORT */
+/* Send a remote set_info_async.
+ * This may go from client to server or server to client
+ */
+int target_set_info_rpc(struct obd_import *imp, int opcode,
+ obd_count keylen, void *key,
+ obd_count vallen, void *val,
+ struct ptlrpc_request_set *set)
+{
+ struct ptlrpc_request *req;
+ char *tmp;
+ int rc;
+ ENTRY;
+
+ req = ptlrpc_request_alloc(imp, &RQF_OBD_SET_INFO);
+ if (req == NULL)
+ RETURN(-ENOMEM);
+
+ req_capsule_set_size(&req->rq_pill, &RMF_SETINFO_KEY,
+ RCL_CLIENT, keylen);
+ req_capsule_set_size(&req->rq_pill, &RMF_SETINFO_VAL,
+ RCL_CLIENT, vallen);
+ rc = ptlrpc_request_pack(req, LUSTRE_OBD_VERSION, opcode);
+ if (rc) {
+ ptlrpc_request_free(req);
+ RETURN(rc);
+ }
+
+ tmp = req_capsule_client_get(&req->rq_pill, &RMF_SETINFO_KEY);
+ memcpy(tmp, key, keylen);
+ tmp = req_capsule_client_get(&req->rq_pill, &RMF_SETINFO_VAL);
+ memcpy(tmp, val, vallen);
+
+ ptlrpc_request_set_replen(req);
+
+ if (set) {
+ ptlrpc_set_add_req(set, req);
+ ptlrpc_check_set(NULL, set);
+ } else {
+ rc = ptlrpc_queue_wait(req);
+ ptlrpc_req_finished(req);
+ }
+
+ RETURN(rc);
+}
+EXPORT_SYMBOL(target_set_info_rpc);
+
+
ldlm_mode_t lck_compat_array[] = {
[LCK_EX] LCK_COMPAT_EX,
[LCK_PW] LCK_COMPAT_PW,
#endif
}
+/* Setinfo coming from Server (eg MDT) to Client (eg MDC)! */
+static int ldlm_handle_setinfo(struct ptlrpc_request *req)
+{
+ struct obd_device *obd = req->rq_export->exp_obd;
+ char *key;
+ void *val;
+ int keylen, vallen;
+ int rc = -ENOSYS;
+ ENTRY;
+
+ DEBUG_REQ(D_ERROR, req, "%s: handle setinfo\n", obd->obd_name);
+
+ req_capsule_set(&req->rq_pill, &RQF_OBD_SET_INFO);
+
+ key = req_capsule_client_get(&req->rq_pill, &RMF_SETINFO_KEY);
+ if (key == NULL) {
+ DEBUG_REQ(D_IOCTL, req, "no set_info key");
+ RETURN(-EFAULT);
+ }
+ keylen = req_capsule_get_size(&req->rq_pill, &RMF_SETINFO_KEY,
+ RCL_CLIENT);
+ val = req_capsule_client_get(&req->rq_pill, &RMF_SETINFO_VAL);
+ if (val == NULL) {
+ DEBUG_REQ(D_IOCTL, req, "no set_info val");
+ RETURN(-EFAULT);
+ }
+ vallen = req_capsule_get_size(&req->rq_pill, &RMF_SETINFO_VAL,
+ RCL_CLIENT);
+
+ /* We are responsible for swabbing contents of val */
+
+ if (KEY_IS(KEY_HSM_COPYTOOL_SEND))
+ /* Pass it on to mdc (the "export" in this case) */
+ rc = obd_set_info_async(req->rq_export,
+ sizeof(KEY_HSM_COPYTOOL_SEND),
+ KEY_HSM_COPYTOOL_SEND,
+ vallen, val, NULL);
+ else
+ DEBUG_REQ(D_WARNING, req, "ignoring unknown key %s", key);
+
+ return rc;
+}
+
/* TODO: handle requests in a similar way as MDT: see mdt_handle_common() */
static int ldlm_callback_handler(struct ptlrpc_request *req)
{
if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_GL_CALLBACK))
RETURN(0);
break;
+ case LDLM_SET_INFO:
+ rc = ldlm_handle_setinfo(req);
+ ldlm_callback_reply(req, rc);
+ RETURN(0);
case OBD_LOG_CANCEL: /* remove this eventually - for 1.4.0 compat */
CERROR("shouldn't be handling OBD_LOG_CANCEL on DLM thread\n");
req_capsule_set(&req->rq_pill, &RQF_LOG_CANCEL);
.release = mdc_changelog_seq_release,
};
-/* temporary for testing */
-static int mdc_wr_netlink(struct file *file, const char *buffer,
- unsigned long count, void *data)
-{
- struct obd_device *obd = data;
- struct lnl_hdr *lh;
- struct hsm_action_list *hal;
- struct hsm_action_item *hai;
- int len;
- int pid, rc;
-
- rc = lprocfs_write_helper(buffer, count, &pid);
- if (rc)
- return rc;
-
- if (pid < 0)
- return -ERANGE;
- CWARN("message to pid %d\n", pid);
-
- len = sizeof(*lh) + sizeof(*hal) + MTI_NAME_MAXLEN +
- /* for mockup below */ 2 * size_round(sizeof(*hai));
-
- OBD_ALLOC(lh, len);
-
- lh->lnl_magic = LNL_MAGIC;
- lh->lnl_transport = LNL_TRANSPORT_HSM;
- lh->lnl_msgtype = HMT_ACTION_LIST;
- lh->lnl_msglen = len;
-
- hal = (struct hsm_action_list *)(lh + 1);
- hal->hal_version = HAL_VERSION;
- hal->hal_archive_num = 1;
- obd_uuid2fsname(hal->hal_fsname, obd->obd_name, MTI_NAME_MAXLEN);
-
- /* mock up an action list */
- hal->hal_count = 2;
- hai = hai_zero(hal);
- hai->hai_action = HSMA_ARCHIVE;
- hai->hai_fid.f_oid = 5;
- hai->hai_len = sizeof(*hai);
- hai = hai_next(hai);
- hai->hai_action = HSMA_RESTORE;
- hai->hai_fid.f_oid = 10;
- hai->hai_len = sizeof(*hai);
-
- /* This works for either broadcast or unicast to a single pid */
- rc = libcfs_klnl_msg_put(pid, pid == 0 ? LNL_GRP_HSM : 0, lh);
-
- OBD_FREE(lh, len);
- if (rc < 0)
- return rc;
- return count;
-}
static struct lprocfs_vars lprocfs_mdc_obd_vars[] = {
{ "uuid", lprocfs_rd_uuid, 0, 0 },
{ "import", lprocfs_rd_import, 0, 0 },
{ "state", lprocfs_rd_state, 0, 0 },
{ "changelog", 0, 0, 0, &mdc_changelog_fops, 0400 },
- { "netlink", 0, mdc_wr_netlink, 0, 0, 0222 },
{ 0 }
};
return rc;
}
-static int do_set_info_async(struct obd_export *exp,
- obd_count keylen, void *key,
- obd_count vallen, void *val,
- struct ptlrpc_request_set *set)
-{
- struct obd_import *imp = class_exp2cliimp(exp);
- struct ptlrpc_request *req;
- char *tmp;
- int rc;
- ENTRY;
-
- req = ptlrpc_request_alloc(imp, &RQF_MDS_SET_INFO);
- if (req == NULL)
- RETURN(-ENOMEM);
-
- req_capsule_set_size(&req->rq_pill, &RMF_SETINFO_KEY,
- RCL_CLIENT, keylen);
- req_capsule_set_size(&req->rq_pill, &RMF_SETINFO_VAL,
- RCL_CLIENT, vallen);
- rc = ptlrpc_request_pack(req, LUSTRE_MDS_VERSION, MDS_SET_INFO);
- if (rc) {
- ptlrpc_request_free(req);
- RETURN(rc);
- }
-
- tmp = req_capsule_client_get(&req->rq_pill, &RMF_SETINFO_KEY);
- memcpy(tmp, key, keylen);
- tmp = req_capsule_client_get(&req->rq_pill, &RMF_SETINFO_VAL);
- memcpy(tmp, val, vallen);
-
- ptlrpc_request_set_replen(req);
-
- if (set) {
- ptlrpc_set_add_req(set, req);
- ptlrpc_check_set(NULL, set);
- } else {
- rc = ptlrpc_queue_wait(req);
- ptlrpc_req_finished(req);
- }
-
- RETURN(rc);
-}
-
int mdc_get_info_rpc(struct obd_export *exp,
obd_count keylen, void *key,
int vallen, void *val)
RETURN(rc);
}
+static void lustre_swab_hai(struct hsm_action_item *h)
+{
+ __swab32s(&h->hai_len);
+ __swab32s(&h->hai_action);
+ lustre_swab_lu_fid(&h->hai_fid);
+ __swab64s(&h->hai_cookie);
+ __swab64s(&h->hai_extent_start);
+ __swab64s(&h->hai_extent_end);
+ __swab64s(&h->hai_gid);
+}
+
+static void lustre_swab_hal(struct hsm_action_list *h)
+{
+ struct hsm_action_item *hai;
+ int i;
+
+ __swab32s(&h->hal_version);
+ __swab32s(&h->hal_count);
+ __swab32s(&h->hal_archive_num);
+ hai = hai_zero(h);
+ for (i = 0; i < h->hal_count; i++) {
+ lustre_swab_hai(hai);
+ hai = hai_next(hai);
+ }
+}
+
+/**
+ * Send a message to any listening copytools, nonblocking
+ * @param val LNL message (lnl_hdr + hsm_action_list)
+ * @param len total length of message
+ */
+static int mdc_hsm_copytool_send(int len, void *val)
+{
+ struct lnl_hdr *lh = (struct lnl_hdr *)val;
+ struct hsm_action_list *hal = (struct hsm_action_list *)(lh + 1);
+ int rc;
+ ENTRY;
+
+ if (len < sizeof(*lh) + sizeof(*hal)) {
+ CERROR("Short HSM message %d < %d\n", len,
+ sizeof(*lh) + sizeof(*hal));
+ RETURN(-EPROTO);
+ }
+ if (lh->lnl_magic == __swab16(LNL_MAGIC)) {
+ lustre_swab_lnlh(lh);
+ lustre_swab_hal(hal);
+ } else if (lh->lnl_magic != LNL_MAGIC) {
+ CERROR("Bad magic %x!=%x\n", lh->lnl_magic, LNL_MAGIC);
+ RETURN(-EPROTO);
+ }
+
+ CDEBUG(D_IOCTL, " Received message mg=%x t=%d m=%d l=%d actions=%d\n",
+ lh->lnl_magic, lh->lnl_transport, lh->lnl_msgtype,
+ lh->lnl_msglen, hal->hal_count);
+
+ /* Broadcast to HSM listeners */
+ rc = libcfs_klnl_msg_put(0, LNL_GRP_HSM, lh);
+
+ RETURN(rc);
+}
+
int mdc_set_info_async(struct obd_export *exp,
obd_count keylen, void *key,
obd_count vallen, void *val,
}
spin_unlock(&imp->imp_lock);
- rc = do_set_info_async(exp, keylen, key, vallen, val, set);
+ rc = target_set_info_rpc(imp, MDS_SET_INFO,
+ keylen, key, vallen, val, set);
RETURN(rc);
}
if (KEY_IS(KEY_SPTLRPC_CONF)) {
RETURN(0);
}
if (KEY_IS(KEY_MDS_CONN)) {
- struct obd_import *imp = class_exp2cliimp(exp);
-
/* mds-mds import */
spin_lock(&imp->imp_lock);
imp->imp_server_timeout = 1;
RETURN(0);
}
if (KEY_IS(KEY_CHANGELOG_CLEAR)) {
- rc = do_set_info_async(exp, keylen, key, vallen, val, set);
+ rc = target_set_info_rpc(imp, MDS_SET_INFO,
+ keylen, key, vallen, val, set);
+ RETURN(rc);
+ }
+ if (KEY_IS(KEY_HSM_COPYTOOL_SEND)) {
+ rc = mdc_hsm_copytool_send(vallen, val);
RETURN(rc);
}
vallen = req_capsule_get_size(info->mti_pill, &RMF_SETINFO_VAL,
RCL_CLIENT);
+ /* Swab any part of val you need to here */
if (KEY_IS(KEY_READ_ONLY)) {
req->rq_status = 0;
lustre_msg_set_status(req->rq_repmsg, 0);
switch (lustre_msg_get_opc(msg)) {
case MDS_CONNECT:
case MDS_DISCONNECT:
+ case MDS_SET_INFO:
case OBD_PING:
case SEC_CTX_INIT:
case SEC_CTX_INIT_CONT:
case MDS_SYNC:
case MDS_GETXATTR:
case MDS_SETXATTR:
- case MDS_SET_INFO:
case MDS_GET_INFO:
case MDS_QUOTACHECK:
case MDS_QUOTACTL:
if (!mdt->mdt_som_conf)
data->ocd_connect_flags &= ~OBD_CONNECT_SOM;
-
+
spin_lock(&exp->exp_lock);
exp->exp_connect_flags = data->ocd_connect_flags;
spin_unlock(&exp->exp_lock);
return rc;
}
+/**
+ * Send a copytool req to a client
+ * Note this sends a request RPC from a server (MDT) to a client (MDC),
+ * backwards of normal comms.
+ */
+int mdt_hsm_copytool_send(struct obd_export *exp)
+{
+ struct lnl_hdr *lh;
+ struct hsm_action_list *hal;
+ struct hsm_action_item *hai;
+ int rc, len;
+ ENTRY;
+
+ CWARN("%s: writing to mdc at %s\n", exp->exp_obd->obd_name,
+ libcfs_nid2str(exp->exp_connection->c_peer.nid));
+
+ len = sizeof(*lh) + sizeof(*hal) + MTI_NAME_MAXLEN +
+ /* for mockup below */ 2 * size_round(sizeof(*hai));
+ OBD_ALLOC(lh, len);
+ if (lh == NULL)
+ RETURN(-ENOMEM);
+
+ lh->lnl_magic = LNL_MAGIC;
+ lh->lnl_transport = LNL_TRANSPORT_HSM;
+ lh->lnl_msgtype = HMT_ACTION_LIST;
+ lh->lnl_msglen = len;
+
+ hal = (struct hsm_action_list *)(lh + 1);
+ hal->hal_version = HAL_VERSION;
+ hal->hal_archive_num = 1;
+ obd_uuid2fsname(hal->hal_fsname, exp->exp_obd->obd_name,
+ MTI_NAME_MAXLEN);
+
+ /* mock up an action list */
+ hal->hal_count = 2;
+ hai = hai_zero(hal);
+ hai->hai_action = HSMA_ARCHIVE;
+ hai->hai_fid.f_oid = 0xA00A;
+ hai->hai_len = sizeof(*hai);
+ hai = hai_next(hai);
+ hai->hai_action = HSMA_RESTORE;
+ hai->hai_fid.f_oid = 0xB00B;
+ hai->hai_len = sizeof(*hai);
+
+ /* Uses the ldlm reverse import; this rpc will be seen by
+ the ldlm_callback_handler */
+ rc = target_set_info_rpc(exp->exp_imp_reverse, LDLM_SET_INFO,
+ sizeof(KEY_HSM_COPYTOOL_SEND),
+ KEY_HSM_COPYTOOL_SEND,
+ len, lh, NULL);
+
+ OBD_FREE(lh, len);
+
+ RETURN(rc);
+}
+
static struct obd_ops mdt_obd_device_ops = {
.o_owner = THIS_MODULE,
.o_set_info_async = mdt_obd_set_info_async,
static struct mdt_handler mdt_mds_ops[] = {
DEF_MDT_HNDL_F(0, CONNECT, mdt_connect),
DEF_MDT_HNDL_F(0, DISCONNECT, mdt_disconnect),
-DEF_MDT_HNDL_F(0, SET_INFO, mdt_set_info),
+DEF_MDT_HNDL (0, SET_INFO, mdt_set_info,
+ &RQF_OBD_SET_INFO),
DEF_MDT_HNDL_F(0, GET_INFO, mdt_get_info),
DEF_MDT_HNDL_F(0 |HABEO_REFERO, GETSTATUS, mdt_getstatus),
DEF_MDT_HNDL_F(HABEO_CORPUS, GETATTR, mdt_getattr),
void mdt_enable_cos(struct mdt_device *, int);
int mdt_cos_is_enabled(struct mdt_device *);
+int mdt_hsm_copytool_send(struct obd_export *exp);
/* lprocfs stuff */
void lprocfs_mdt_init_vars(struct lprocfs_static_vars *lvars);
GOTO(failed, rc = -EFAULT);
}
kernbuf[count] = '\0';
-
+
if (!strcmp(kernbuf, "NONE") || !strcmp(kernbuf, "clear")) {
/* empty string is special case */
down_write(&mdt->mdt_squash_sem);
return count;
}
+/* Temporary; for testing purposes only */
+static int lprocfs_mdt_wr_mdc(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ struct obd_device *obd = data;
+ struct obd_export *exp = NULL;
+ struct obd_uuid uuid;
+ char tmpbuf[sizeof(struct obd_uuid)];
+
+ sscanf(buffer, "%40s", tmpbuf);
+
+ obd_str2uuid(&uuid, tmpbuf);
+ exp = lustre_hash_lookup(obd->obd_uuid_hash, &uuid);
+ if (exp == NULL) {
+ CERROR("%s: no export %s found\n",
+ obd->obd_name, obd_uuid2str(&uuid));
+ } else {
+ mdt_hsm_copytool_send(exp);
+ class_export_put(exp);
+ }
+
+ return count;
+}
+
static struct lprocfs_vars lprocfs_mdt_obd_vars[] = {
{ "uuid", lprocfs_rd_uuid, 0, 0 },
{ "recovery_status", lprocfs_obd_rd_recovery_status, 0, 0 },
{ "root_squash", lprocfs_rd_root_squash,
lprocfs_wr_root_squash, 0 },
{ "nosquash_nids", lprocfs_rd_nosquash_nids,
- lprocfs_wr_nosquash_nids, 0 },
+ lprocfs_wr_nosquash_nids, 0 },
{ "som", lprocfs_rd_mdt_som,
lprocfs_wr_mdt_som, 0 },
+ { "mdccomm", 0, lprocfs_mdt_wr_mdc, 0 },
{ 0 }
};
int i;
for (i = 0; i < aa->aa_page_count; i++)
osc_release_write_grant(aa->aa_cli, aa->aa_ppga[i], 1);
-
+
if (aa->aa_oa->o_flags & OBD_FL_TEMPORARY)
OBDO_FREE(aa->aa_oa);
}
cli->cl_oscc.oscc_flags &= ~(OSCC_FLAG_RDONLY | OSCC_FLAG_DEGRADED);
if (msfs->os_state & OS_STATE_DEGRADED)
cli->cl_oscc.oscc_flags |= OSCC_FLAG_DEGRADED;
-
+
if (msfs->os_state & OS_STATE_READONLY)
cli->cl_oscc.oscc_flags |= OSCC_FLAG_RDONLY;
spin_unlock(&cli->cl_oscc.oscc_lock);
-
+
*aa->aa_oi->oi_osfs = *msfs;
out:
rc = aa->aa_oi->oi_cb_up(aa->aa_oi, rc);
if (KEY_IS(KEY_GRANT_SHRINK))
req = ptlrpc_request_alloc(imp, &RQF_OST_SET_GRANT_INFO);
else
- req = ptlrpc_request_alloc(imp, &RQF_OST_SET_INFO);
+ req = ptlrpc_request_alloc(imp, &RQF_OBD_SET_INFO);
if (req == NULL)
RETURN(-ENOMEM);
sizeof(*repbody));
memcpy(&repbody->oa, &body->oa, sizeof(body->oa));
oti->oti_logcookies = &repbody->oa.o_lcookie;
-
+
req->rq_status = obd_create(exp, &repbody->oa, NULL, oti);
//obd_log_cancel(conn, NULL, 1, oti->oti_logcookies, 0);
RETURN(0);
break;
case OST_SET_INFO:
DEBUG_REQ(D_INODE, req, "set_info");
- req_capsule_set(&req->rq_pill, &RQF_OST_SET_INFO);
+ req_capsule_set(&req->rq_pill, &RQF_OBD_SET_INFO);
rc = ost_set_info(req->rq_export, req);
break;
case OST_GET_INFO:
&RMF_CONNECT_DATA
};
-static const struct req_msg_field *mds_set_info_client[] = {
+static const struct req_msg_field *obd_set_info_client[] = {
&RMF_PTLRPC_BODY,
&RMF_SETINFO_KEY,
&RMF_SETINFO_VAL
&RMF_NIOBUF_REMOTE
};
-static const struct req_msg_field *ost_set_info_client[] = {
- &RMF_PTLRPC_BODY,
- &RMF_SETINFO_KEY,
- &RMF_SETINFO_VAL
-};
-
static const struct req_msg_field *ost_get_info_generic_server[] = {
&RMF_PTLRPC_BODY,
&RMF_GENERIC_DATA,
static const struct req_format *req_formats[] = {
&RQF_OBD_PING,
+ &RQF_OBD_SET_INFO,
&RQF_SEC_CTX,
&RQF_MGS_TARGET_REG,
&RQF_MGS_SET_INFO,
&RQF_FLD_QUERY,
&RQF_MDS_CONNECT,
&RQF_MDS_DISCONNECT,
- &RQF_MDS_SET_INFO,
&RQF_MDS_GET_INFO,
&RQF_MDS_GETSTATUS,
&RQF_MDS_STATFS,
&RQF_OST_DESTROY,
&RQF_OST_BRW,
&RQF_OST_STATFS,
- &RQF_OST_SET_INFO,
&RQF_OST_SET_GRANT_INFO,
&RQF_OST_GET_INFO_GENERIC,
&RQF_OST_GET_INFO_LAST_ID,
DEFINE_REQ_FMT0("OBD_PING", empty, empty);
EXPORT_SYMBOL(RQF_OBD_PING);
+const struct req_format RQF_OBD_SET_INFO =
+ DEFINE_REQ_FMT0("OBD_SET_INFO", obd_set_info_client, empty);
+EXPORT_SYMBOL(RQF_OBD_SET_INFO);
+
const struct req_format RQF_SEC_CTX =
DEFINE_REQ_FMT0("SEC_CTX", empty, empty);
EXPORT_SYMBOL(RQF_SEC_CTX);
DEFINE_REQ_FMT0("MDS_DISCONNECT", empty, empty);
EXPORT_SYMBOL(RQF_MDS_DISCONNECT);
-const struct req_format RQF_MDS_SET_INFO =
- DEFINE_REQ_FMT0("MDS_SET_INFO", mds_set_info_client, empty);
-EXPORT_SYMBOL(RQF_MDS_SET_INFO);
-
const struct req_format RQF_MDS_GET_INFO =
DEFINE_REQ_FMT0("MDS_GET_INFO", mds_getinfo_client,
mds_getinfo_server);
DEFINE_REQ_FMT0("OST_STATFS", empty, obd_statfs_server);
EXPORT_SYMBOL(RQF_OST_STATFS);
-const struct req_format RQF_OST_SET_INFO =
- DEFINE_REQ_FMT0("OST_SET_INFO", ost_set_info_client, empty);
-EXPORT_SYMBOL(RQF_OST_SET_INFO);
-
const struct req_format RQF_OST_SET_GRANT_INFO =
- DEFINE_REQ_FMT0("OST_SET_GRANT_INFO", ost_set_info_client,
+ DEFINE_REQ_FMT0("OST_SET_GRANT_INFO", obd_set_info_client,
ost_body_only);
EXPORT_SYMBOL(RQF_OST_SET_GRANT_INFO);
{ LDLM_BL_CALLBACK, "ldlm_bl_callback" },
{ LDLM_CP_CALLBACK, "ldlm_cp_callback" },
{ LDLM_GL_CALLBACK, "ldlm_gl_callback" },
+ { LDLM_SET_INFO, "ldlm_set_info" },
{ MGS_CONNECT, "mgs_connect" },
{ MGS_DISCONNECT, "mgs_disconnect" },
{ MGS_EXCEPTION, "mgs_exception" },
{
/* Wire protocol assertions generated by 'wirecheck'
* (make -C lustre/utils newwiretest)
- * running on Linux lin3 2.6.18-128.1.1-prep #1 SMP Wed Mar 4 23:08:37 MST 2009 i686 i686 i38
+ * running on Linux cfs21 2.6.18-92.el5xen #1 SMP Tue Jun 10 19:55:54 EDT 2008 i686 i686 i386
* with gcc version 4.1.2 20071124 (Red Hat 4.1.2-42) */
(long long)LDLM_CP_CALLBACK);
LASSERTF(LDLM_GL_CALLBACK == 106, " found %lld\n",
(long long)LDLM_GL_CALLBACK);
- LASSERTF(LDLM_LAST_OPC == 107, " found %lld\n",
+ LASSERTF(LDLM_SET_INFO == 107, " found %lld\n",
+ (long long)LDLM_SET_INFO);
+ LASSERTF(LDLM_LAST_OPC == 108, " found %lld\n",
(long long)LDLM_LAST_OPC);
LASSERTF(LCK_EX == 1, " found %lld\n",
(long long)LCK_EX);
CLASSERT(OBD_MD_FLXATTRLS == (0x0000002000000000ULL));
CLASSERT(OBD_MD_FLXATTRRM == (0x0000004000000000ULL));
CLASSERT(OBD_MD_FLACL == (0x0000008000000000ULL));
- CLASSERT(OBD_FL_INLINEDATA == (0x00000001));
- CLASSERT(OBD_FL_OBDMDEXISTS == (0x00000002));
- CLASSERT(OBD_FL_DELORPHAN == (0x00000004));
- CLASSERT(OBD_FL_NORPC == (0x00000008));
- CLASSERT(OBD_FL_IDONLY == (0x00000010));
- CLASSERT(OBD_FL_RECREATE_OBJS == (0x00000020));
- CLASSERT(OBD_FL_DEBUG_CHECK == (0x00000040));
- CLASSERT(OBD_FL_NO_USRQUOTA == (0x00000100));
- CLASSERT(OBD_FL_NO_GRPQUOTA == (0x00000200));
- CLASSERT(OBD_FL_TRUNCLOCK == (0x00000800));
- CLASSERT(OBD_FL_CKSUM_CRC32 == (0x00001000));
- CLASSERT(OBD_FL_CKSUM_ADLER == (0x00002000));
- CLASSERT(OBD_FL_SHRINK_GRANT == (0x00020000));
+ CLASSERT(OBD_FL_INLINEDATA == 1);
+ CLASSERT(OBD_FL_OBDMDEXISTS == 2);
+ CLASSERT(OBD_FL_DELORPHAN == 4);
+ CLASSERT(OBD_FL_NORPC == 8);
+ CLASSERT(OBD_FL_IDONLY == 16);
+ CLASSERT(OBD_FL_RECREATE_OBJS == 32);
+ CLASSERT(OBD_FL_DEBUG_CHECK == 64);
+ CLASSERT(OBD_FL_NO_USRQUOTA == 256);
+ CLASSERT(OBD_FL_NO_GRPQUOTA == 512);
+ CLASSERT(OBD_FL_TRUNCLOCK == 2048);
+ CLASSERT(OBD_FL_CKSUM_CRC32 == 4096);
+ CLASSERT(OBD_FL_CKSUM_ADLER == 8192);
+ CLASSERT(OBD_FL_SHRINK_GRANT == 131072);
CLASSERT(OBD_CKSUM_CRC32 == 1);
CLASSERT(OBD_CKSUM_ADLER == 2);
/* Checks for struct link_ea_entry */
LASSERTF((int)sizeof(struct link_ea_entry) == 20, " found %lld\n",
(long long)(int)sizeof(struct link_ea_entry));
- LASSERTF((int)offsetof(struct link_ea_entry, lee_parent_fid) == 0, " found %lld\n",
- (long long)(int)offsetof(struct link_ea_entry, lee_parent_fid));
- LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid) == 16, " found %lld\n",
- (long long)(int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid));
LASSERTF((int)offsetof(struct link_ea_entry, lee_reclen) == 16, " found %lld\n",
(long long)(int)offsetof(struct link_ea_entry, lee_reclen));
LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_reclen) == 2, " found %lld\n",
(long long)(int)sizeof(((struct link_ea_entry *)0)->lee_reclen));
+ LASSERTF((int)offsetof(struct link_ea_entry, lee_parent_fid) == 0, " found %lld\n",
+ (long long)(int)offsetof(struct link_ea_entry, lee_parent_fid));
+ LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid) == 16, " found %lld\n",
+ (long long)(int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid));
LASSERTF((int)offsetof(struct link_ea_entry, lee_name) == 20, " found %lld\n",
(long long)(int)offsetof(struct link_ea_entry, lee_name));
LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_name) == 0, " found %lld\n",
(long long)(int)sizeof(((struct link_ea_entry *)0)->lee_name));
}
+
run_test 162 "path lookup sanity"
test_163() {
- copytool --test || { skip "copytool test: $? 38=enosys" && return; }
+ remote_mds_nodsh && skip "remote MDS with nodsh" && return
+ copytool --test || { skip "copytool not runnable: $?" && return; }
copytool &
sleep 1
+ local uuid=$($LCTL get_param -n mdc.lustre-MDT0000-mdc-*.uuid)
# this proc file is temporary and linux-only
- $LCTL set_param mdc.lustre-MDT0000-mdc-*.netlink=0 || error "lnl send failed"
+ do_facet mds lctl set_param mdt.lustre-MDT0000.mdccomm=$uuid || error "lnl send failed"
kill $!
}
run_test 163 "LustreNetLink kernelcomms"
CHECK_CDEFINE(OBD_MD_FLXATTRRM);
CHECK_CDEFINE(OBD_MD_FLACL);
- CHECK_CDEFINE(OBD_FL_INLINEDATA);
- CHECK_CDEFINE(OBD_FL_OBDMDEXISTS);
- CHECK_CDEFINE(OBD_FL_DELORPHAN);
- CHECK_CDEFINE(OBD_FL_NORPC);
- CHECK_CDEFINE(OBD_FL_IDONLY);
- CHECK_CDEFINE(OBD_FL_RECREATE_OBJS);
- CHECK_CDEFINE(OBD_FL_DEBUG_CHECK);
- CHECK_CDEFINE(OBD_FL_NO_USRQUOTA);
- CHECK_CDEFINE(OBD_FL_NO_GRPQUOTA);
- CHECK_CDEFINE(OBD_FL_TRUNCLOCK);
- CHECK_CDEFINE(OBD_FL_CKSUM_CRC32);
- CHECK_CDEFINE(OBD_FL_CKSUM_ADLER);
- CHECK_CDEFINE(OBD_FL_SHRINK_GRANT);
+ CHECK_CVALUE(OBD_FL_INLINEDATA);
+ CHECK_CVALUE(OBD_FL_OBDMDEXISTS);
+ CHECK_CVALUE(OBD_FL_DELORPHAN);
+ CHECK_CVALUE(OBD_FL_NORPC);
+ CHECK_CVALUE(OBD_FL_IDONLY);
+ CHECK_CVALUE(OBD_FL_RECREATE_OBJS);
+ CHECK_CVALUE(OBD_FL_DEBUG_CHECK);
+ CHECK_CVALUE(OBD_FL_NO_USRQUOTA);
+ CHECK_CVALUE(OBD_FL_NO_GRPQUOTA);
+ CHECK_CVALUE(OBD_FL_TRUNCLOCK);
+ CHECK_CVALUE(OBD_FL_CKSUM_CRC32);
+ CHECK_CVALUE(OBD_FL_CKSUM_ADLER);
+ CHECK_CVALUE(OBD_FL_SHRINK_GRANT);
CHECK_CVALUE(OBD_CKSUM_CRC32);
CHECK_CVALUE(OBD_CKSUM_ADLER);
}
}
static void
-check_lu_fid_pack(void)
-{
- BLANK_LINE();
- CHECK_STRUCT(lu_fid_pack);
- CHECK_MEMBER(lu_fid_pack, fp_len);
- CHECK_MEMBER(lu_fid_pack, fp_area);
-}
-
-static void
check_mds_status_req(void)
{
BLANK_LINE();
CHECK_VALUE(LDLM_BL_CALLBACK);
CHECK_VALUE(LDLM_CP_CALLBACK);
CHECK_VALUE(LDLM_GL_CALLBACK);
+ CHECK_VALUE(LDLM_SET_INFO);
CHECK_VALUE(LDLM_LAST_OPC);
CHECK_VALUE(LCK_EX);
check_niobuf_remote();
check_ost_body();
check_ll_fid();
- check_lu_fid_pack();
check_mds_status_req();
check_mds_body();
check_mds_rec_setattr();
{
/* Wire protocol assertions generated by 'wirecheck'
* (make -C lustre/utils newwiretest)
- * running on Linux lin3 2.6.18-128.1.1-prep #1 SMP Wed Mar 4 23:08:37 MST 2009 i686 i686 i38
+ * running on Linux cfs21 2.6.18-92.el5xen #1 SMP Tue Jun 10 19:55:54 EDT 2008 i686 i686 i386
* with gcc version 4.1.2 20071124 (Red Hat 4.1.2-42) */
(long long)LDLM_CP_CALLBACK);
LASSERTF(LDLM_GL_CALLBACK == 106, " found %lld\n",
(long long)LDLM_GL_CALLBACK);
- LASSERTF(LDLM_LAST_OPC == 107, " found %lld\n",
+ LASSERTF(LDLM_SET_INFO == 107, " found %lld\n",
+ (long long)LDLM_SET_INFO);
+ LASSERTF(LDLM_LAST_OPC == 108, " found %lld\n",
(long long)LDLM_LAST_OPC);
LASSERTF(LCK_EX == 1, " found %lld\n",
(long long)LCK_EX);
CLASSERT(OBD_MD_FLXATTRLS == (0x0000002000000000ULL));
CLASSERT(OBD_MD_FLXATTRRM == (0x0000004000000000ULL));
CLASSERT(OBD_MD_FLACL == (0x0000008000000000ULL));
- CLASSERT(OBD_FL_INLINEDATA == (0x00000001));
- CLASSERT(OBD_FL_OBDMDEXISTS == (0x00000002));
- CLASSERT(OBD_FL_DELORPHAN == (0x00000004));
- CLASSERT(OBD_FL_NORPC == (0x00000008));
- CLASSERT(OBD_FL_IDONLY == (0x00000010));
- CLASSERT(OBD_FL_RECREATE_OBJS == (0x00000020));
- CLASSERT(OBD_FL_DEBUG_CHECK == (0x00000040));
- CLASSERT(OBD_FL_NO_USRQUOTA == (0x00000100));
- CLASSERT(OBD_FL_NO_GRPQUOTA == (0x00000200));
- CLASSERT(OBD_FL_TRUNCLOCK == (0x00000800));
- CLASSERT(OBD_FL_CKSUM_CRC32 == (0x00001000));
- CLASSERT(OBD_FL_CKSUM_ADLER == (0x00002000));
- CLASSERT(OBD_FL_SHRINK_GRANT == (0x00020000));
+ CLASSERT(OBD_FL_INLINEDATA == 1);
+ CLASSERT(OBD_FL_OBDMDEXISTS == 2);
+ CLASSERT(OBD_FL_DELORPHAN == 4);
+ CLASSERT(OBD_FL_NORPC == 8);
+ CLASSERT(OBD_FL_IDONLY == 16);
+ CLASSERT(OBD_FL_RECREATE_OBJS == 32);
+ CLASSERT(OBD_FL_DEBUG_CHECK == 64);
+ CLASSERT(OBD_FL_NO_USRQUOTA == 256);
+ CLASSERT(OBD_FL_NO_GRPQUOTA == 512);
+ CLASSERT(OBD_FL_TRUNCLOCK == 2048);
+ CLASSERT(OBD_FL_CKSUM_CRC32 == 4096);
+ CLASSERT(OBD_FL_CKSUM_ADLER == 8192);
+ CLASSERT(OBD_FL_SHRINK_GRANT == 131072);
CLASSERT(OBD_CKSUM_CRC32 == 1);
CLASSERT(OBD_CKSUM_ADLER == 2);
/* Checks for struct link_ea_entry */
LASSERTF((int)sizeof(struct link_ea_entry) == 20, " found %lld\n",
(long long)(int)sizeof(struct link_ea_entry));
- LASSERTF((int)offsetof(struct link_ea_entry, lee_parent_fid) == 0, " found %lld\n",
- (long long)(int)offsetof(struct link_ea_entry, lee_parent_fid));
- LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid) == 16, " found %lld\n",
- (long long)(int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid));
LASSERTF((int)offsetof(struct link_ea_entry, lee_reclen) == 16, " found %lld\n",
(long long)(int)offsetof(struct link_ea_entry, lee_reclen));
LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_reclen) == 2, " found %lld\n",
(long long)(int)sizeof(((struct link_ea_entry *)0)->lee_reclen));
+ LASSERTF((int)offsetof(struct link_ea_entry, lee_parent_fid) == 0, " found %lld\n",
+ (long long)(int)offsetof(struct link_ea_entry, lee_parent_fid));
+ LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid) == 16, " found %lld\n",
+ (long long)(int)sizeof(((struct link_ea_entry *)0)->lee_parent_fid));
LASSERTF((int)offsetof(struct link_ea_entry, lee_name) == 20, " found %lld\n",
(long long)(int)offsetof(struct link_ea_entry, lee_name));
LASSERTF((int)sizeof(((struct link_ea_entry *)0)->lee_name) == 0, " found %lld\n",