}
inode = dentry->d_inode;
- if (S_ISDIR(id_type(id))) {
- LASSERT(S_ISDIR(inode->i_mode));
+ if (S_ISDIR(inode->i_mode)) {
+ //LASSERT(S_ISDIR(id_type(id)));
rc = mds_md_get_attr(obd, inode, &mea, &mea_size);
if (rc)
GOTO(out, rc);
}
} else {
- LASSERT(!S_ISDIR(inode->i_mode));
+ //LASSERT(!S_ISDIR(id_type(id)));
*type = PP_FILE;
read_pid:
rc = mds_read_inode_pid(obd, inode, pid);
/* pp_id2 is present, which indicating we want to scan parent
* dir(pp_id2) to find the cross-ref entry(pp_id1) */
if (id_fid(&pkg->pp_id2)) {
+ /*
LASSERT(S_ISDIR(id_type(&pkg->pp_id1)));
LASSERT(S_ISDIR(id_type(&pkg->pp_id2)));
-
+ */
pkg->pp_type = PP_DIR;
goto scan;
}
struct lmv_obd *lmv = &obd->u.mds.mds_md_obd->u.lmv;
struct parseid_pkg *body;
int size = sizeof(*body);
- struct obd_export *exp = lmv->tgts[mds_num].ltd_exp;
+ struct obd_export *exp;
+ /* make sure connection established */
+ rc = obd_set_info(obd->u.mds.mds_md_exp, strlen("chkconnect"),
+ "chkconnect", 0, NULL);
+ if (rc)
+ RETURN(rc);
+
+ exp = lmv->tgts[mds_num].ltd_exp;
+ LASSERT(exp);
+
req = ptlrpc_prep_req(class_exp2cliimp(exp),
LUSTRE_MDS_VERSION, MDS_PARSE_ID, 1,
&size, NULL);
RETURN(rc);
}
-#define ROOT_FID 1
+#define ROOT_FID 2
struct name_item {
struct list_head link;
char name[NAME_MAX + 1];
struct lmv_obd *lmv = &obd->u.mds.mds_md_obd->u.lmv;
struct parseid_pkg *body;
int size = sizeof(*body);
- struct obd_export *exp = lmv->tgts[mds_num].ltd_exp;
+ struct obd_export *exp;
+ /* make sure connection established */
+ rc = obd_set_info(obd->u.mds.mds_md_exp, strlen("chkconnect"),
+ "chkconnect", 0, NULL);
+ if (rc)
+ RETURN(rc);
+
+ exp = lmv->tgts[mds_num].ltd_exp;
+ LASSERT(exp);
+
req = ptlrpc_prep_req(class_exp2cliimp(exp),
LUSTRE_MDS_VERSION, MDS_PARSE_ID, 1,
&size, NULL);