-static int create_dot_lustre_dir(const struct lu_env *env, struct mdd_device *m)
-{
- struct lu_fid *fid = &mdd_env_info(env)->mti_fid;
- struct md_object *mdo;
- int rc;
-
- memcpy(fid, &LU_DOT_LUSTRE_FID, sizeof(struct lu_fid));
- mdo = llo_store_create_index(env, &m->mdd_md_dev, m->mdd_child,
- mdd_root_dir_name, dot_lustre_name,
- fid, &dt_directory_features);
- /* .lustre dir may be already present */
- if (IS_ERR(mdo) && PTR_ERR(mdo) != -EEXIST) {
- rc = PTR_ERR(mdo);
- CERROR("creating obj [%s] fid = "DFID" rc = %d\n",
- dot_lustre_name, PFID(fid), rc);
- return rc;
- }
-
- if (!IS_ERR(mdo))
- lu_object_put(env, &mdo->mo_lu);
-
- return 0;
-}
-
-
-static int dot_lustre_mdd_permission(const struct lu_env *env,
- struct md_object *pobj,
- struct md_object *cobj,
- struct md_attr *attr, int mask)
-{
- if (mask & ~(MAY_READ | MAY_EXEC))
- return -EPERM;
- else
- return 0;
-}
-
-static int dot_lustre_mdd_xattr_get(const struct lu_env *env,
- struct md_object *obj, struct lu_buf *buf,
- const char *name)
-{
- return 0;
-}
-
-static int dot_lustre_mdd_xattr_list(const struct lu_env *env,
- struct md_object *obj, struct lu_buf *buf)
-{
- return 0;
-}
-
-static int dot_lustre_mdd_xattr_set(const struct lu_env *env,
- struct md_object *obj,
- const struct lu_buf *buf, const char *name,
- int fl)
-{
- return -EPERM;
-}
-
-static int dot_lustre_mdd_xattr_del(const struct lu_env *env,
- struct md_object *obj,
- const char *name)
-{
- return -EPERM;
-}
-
-static int dot_lustre_mdd_readlink(const struct lu_env *env,
- struct md_object *obj, struct lu_buf *buf)
-{
- return 0;
-}
-
-static int dot_lustre_mdd_object_create(const struct lu_env *env,
- struct md_object *obj,
- const struct md_op_spec *spec,
- struct md_attr *ma)
-{
- return -EPERM;
-}
-
-static int dot_lustre_mdd_ref_add(const struct lu_env *env,
- struct md_object *obj,
- const struct md_attr *ma)