X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdc%2Fmdc_internal.h;h=792cdbf18ecdde118e7978c949bb44a7ec3fc7fa;hp=d599034647c8fb919776aa319936302f3a2c42ca;hb=3e76334402a71e37aed4e9a5166d0141e30af375;hpb=d0423abc1adc717b08de61be3556688cccd52ddf diff --git a/lustre/mdc/mdc_internal.h b/lustre/mdc/mdc_internal.h index d599034..792cdbf 100644 --- a/lustre/mdc/mdc_internal.h +++ b/lustre/mdc/mdc_internal.h @@ -56,10 +56,11 @@ void mdc_open_pack(struct ptlrpc_request *req, struct md_op_data *op_data, void mdc_file_secctx_pack(struct ptlrpc_request *req, const char *secctx_name, const void *secctx, size_t secctx_size); +void mdc_file_encctx_pack(struct ptlrpc_request *req, + const void *encctx, size_t encctx_size); void mdc_file_sepol_pack(struct ptlrpc_request *req); void mdc_unlink_pack(struct ptlrpc_request *req, struct md_op_data *op_data); -void mdc_getxattr_pack(struct ptlrpc_request *req, struct md_op_data *op_data); void mdc_link_pack(struct ptlrpc_request *req, struct md_op_data *op_data); void mdc_rename_pack(struct ptlrpc_request *req, struct md_op_data *op_data, const char *old, size_t oldlen, @@ -93,9 +94,6 @@ int mdc_resource_get_unused_res(struct obd_export *exp, int mdc_resource_get_unused(struct obd_export *exp, const struct lu_fid *fid, struct list_head *cancels, enum ldlm_mode mode, __u64 bits); -int mdc_save_lovea(struct ptlrpc_request *req, - const struct req_msg_field *field, - void *data, u32 size); /* mdc/mdc_request.c */ int mdc_fid_alloc(const struct lu_env *env, struct obd_export *exp, struct lu_fid *fid, struct md_op_data *op_data); @@ -103,18 +101,10 @@ int mdc_setup(struct obd_device *obd, struct lustre_cfg *cfg); struct obd_client_handle; -int mdc_get_lustre_md(struct obd_export *md_exp, struct ptlrpc_request *req, - struct obd_export *dt_exp, struct obd_export *lmv_exp, - struct lustre_md *md); - -int mdc_free_lustre_md(struct obd_export *exp, struct lustre_md *md); - int mdc_set_open_replay_data(struct obd_export *exp, struct obd_client_handle *och, struct lookup_intent *it); -int mdc_clear_open_replay_data(struct obd_export *exp, - struct obd_client_handle *och); void mdc_commit_open(struct ptlrpc_request *req); void mdc_replay_open(struct ptlrpc_request *req); @@ -153,6 +143,7 @@ enum ldlm_mode mdc_lock_match(struct obd_export *exp, __u64 flags, #define MDC_CHANGELOG_DEV_NAME "changelog" extern struct class *mdc_changelog_class; extern dev_t mdc_changelog_dev; +extern struct idr mdc_changelog_minor_idr; int mdc_changelog_cdev_init(struct obd_device *obd); @@ -166,6 +157,26 @@ static inline int mdc_prep_elc_req(struct obd_export *exp, count); } +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL +int mdc_unpack_acl(struct ptlrpc_request *req, struct lustre_md *md); +#else +static inline +int mdc_unpack_acl(struct ptlrpc_request *req, struct lustre_md *md) +{ + return 0; +} +#endif + +static inline void mdc_body2lvb(struct mdt_body *body, struct ost_lvb *lvb) +{ + LASSERT(body->mbo_valid & OBD_MD_DOM_SIZE); + lvb->lvb_mtime = body->mbo_mtime; + lvb->lvb_atime = body->mbo_atime; + lvb->lvb_ctime = body->mbo_ctime; + lvb->lvb_blocks = body->mbo_dom_blocks; + lvb->lvb_size = body->mbo_dom_size; +} + static inline unsigned long hash_x_index(__u64 hash, int hash64) { if (BITS_PER_LONG == 32 && hash64)