From: tappro Date: Sat, 26 Aug 2006 09:30:07 +0000 (+0000) Subject: - add isdir parameter to the mdo_name_insert() method to know that subdir is X-Git-Tag: v1_8_0_110~486^2~1083 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=60707d194cc549b8b8067caec760363057ce1bdc;p=fs%2Flustre-release.git - add isdir parameter to the mdo_name_insert() method to know that subdir is created and increase the nlink for directory. Needed for cross-ref cases. --- diff --git a/lustre/include/md_object.h b/lustre/include/md_object.h index 479b74e..23751f2 100644 --- a/lustre/include/md_object.h +++ b/lustre/include/md_object.h @@ -71,7 +71,7 @@ struct md_create_spec { /* symlink target */ const char *sp_symname; /* parent FID for cross-ref mkdir */ - const struct lu_fid sp_pfid; + const struct lu_fid *sp_pfid; /* eadata for regular files */ struct md_spec_reg { const void *eadata; @@ -155,7 +155,7 @@ struct md_dir_operations { /* partial ops for cross-ref case */ int (*mdo_name_insert)(const struct lu_context *, struct md_object *, - const char *, const struct lu_fid *); + const char *, const struct lu_fid *, int); int (*mdo_name_remove)(const struct lu_context *, struct md_object *, const char *); int (*mdo_rename_tgt)(const struct lu_context *, struct md_object *, @@ -388,11 +388,11 @@ static inline int mdo_unlink(const struct lu_context *cx, struct md_object *p, } static inline int mdo_name_insert(const struct lu_context *cx, - struct md_object *p, - const char *name, const struct lu_fid *f) + struct md_object *p, const char *name, + const struct lu_fid *f, int isdir) { LASSERT(p->mo_dir_ops->mdo_name_insert); - return p->mo_dir_ops->mdo_name_insert(cx, p, name, f); + return p->mo_dir_ops->mdo_name_insert(cx, p, name, f, isdir); } static inline int mdo_name_remove(const struct lu_context *cx,