atomic_t mds_real_clients;
struct obd_uuid mds_lmv_uuid;
struct dentry *mds_fids_dir;
+ struct dentry *mds_unnamed_dir; /* for mdt_obd_create only */
};
struct echo_obd {
DEBUG_REQ(D_HA, req, "create remote object");
- parent_inode = mds->mds_objects_dir->d_inode;
+ parent_inode = mds->mds_unnamed_dir->d_inode;
body = lustre_swab_reqbuf(req, 0, sizeof(*body), lustre_swab_ost_body);
if (body == NULL)
repeat:
rc = sprintf(fidname, "%u.%u", ll_insecure_random_int(), current->pid);
- new = lookup_one_len(fidname, mds->mds_objects_dir, rc);
+ new = lookup_one_len(fidname, mds->mds_unnamed_dir, rc);
if (IS_ERR(new)) {
CERROR("%s: can't lookup new inode (%s) for mkdir: %d\n",
obd->obd_name, fidname, (int) PTR_ERR(new));
}
mds->mds_fids_dir = dentry;
+ dentry = simple_mkdir(current->fs->pwd, "UNNAMED", 0777, 1);
+ if (IS_ERR(dentry)) {
+ rc = PTR_ERR(dentry);
+ CERROR("cannot create UNNAMED directory: rc = %d\n", rc);
+ GOTO(err_unnamed, rc);
+ }
+ mds->mds_unnamed_dir = dentry;
+
/* open and test the last rcvd file */
file = filp_open(LAST_RCVD, O_RDWR | O_CREAT, 0644);
if (IS_ERR(file)) {
err_last_rcvd:
if (mds->mds_rcvd_filp && filp_close(mds->mds_rcvd_filp, 0))
CERROR("can't close %s after error\n", LAST_RCVD);
+err_unnamed:
+ dput(mds->mds_unnamed_dir);
err_fids:
dput(mds->mds_fids_dir);
err_objects:
if (rc)
CERROR("%s file won't close, rc=%d\n", LOV_OBJID, rc);
}
+ if (mds->mds_unnamed_dir != NULL) {
+ l_dput(mds->mds_unnamed_dir);
+ mds->mds_unnamed_dir = NULL;
+ }
if (mds->mds_fids_dir != NULL) {
l_dput(mds->mds_fids_dir);
mds->mds_fids_dir = NULL;