# include <linux/xattr_acl.h>
# endif
#endif
-#include <linux/lustre_handles.h>
-#include <libcfs/kp30.h>
-#include <linux/lustre_idl.h>
-#include <linux/lustre_lib.h>
-#include <linux/lustre_dlm.h>
-#include <linux/lustre_log.h>
-#include <linux/lustre_export.h>
+/* ACL */
#ifdef CONFIG_FS_POSIX_ACL
#define LUSTRE_POSIX_ACL_MAX_ENTRIES (32)
#define LUSTRE_POSIX_ACL_MAX_SIZE \
- (xattr_acl_size(LUSTRE_POSIX_ACL_MAX_ENTRIES))
+ (sizeof(xattr_acl_header) + 32 * sizeof(xattr_acl_entry))
#else
#define LUSTRE_POSIX_ACL_MAX_SIZE 0
#endif
+
#endif
struct dentry *mfd_dentry;
};
-/* ACL */
-#ifdef CONFIG_FS_POSIX_ACL
-#define LUSTRE_POSIX_ACL_MAX_ENTRIES (32)
-#define LUSTRE_POSIX_ACL_MAX_SIZE \
- (xattr_acl_size(LUSTRE_POSIX_ACL_MAX_ENTRIES))
-#else
-#define LUSTRE_POSIX_ACL_MAX_SIZE 0
-#endif
/* mds/mds_reint.c */
struct inode;
extern const struct req_msg_field RMF_REC_RENAME;
extern const struct req_msg_field RMF_REC_SETATTR;
extern const struct req_msg_field RMF_EADATA;
+extern const struct req_msg_field RMF_ACL;
extern const struct req_msg_field RMF_LOGCOOKIES;
extern const struct req_msg_field RMF_REINT_OPC;
# include <linux/pagemap.h>
# include <linux/miscdevice.h>
# include <linux/init.h>
+#include <linux/lustre_acl.h>
#else
# include <liblustre.h>
#endif
#include <obd_class.h>
#include <lustre_dlm.h>
-#include <lustre_mds.h>
#include <lprocfs_status.h>
#include "mdc_internal.h"
RETURN(-EINVAL);
}
- /* get ready for the reply */
req->rq_replen = lustre_msg_size(repbufcnt, repsize);
mdc_get_rpc_lock(obddev->u.cli.cl_rpc_lock, it);
# include <linux/module.h>
# include <linux/pagemap.h>
# include <linux/miscdevice.h>
+# include <linux/lustre_acl.h>
# include <linux/init.h>
#else
# include <liblustre.h>
#include <obd_class.h>
#include <lustre_dlm.h>
#include <lustre_fid.h>
-#include <lustre_mds.h> /* for LUSTRE_POSIX_ACL_MAX_SIZE */
#include <md_object.h>
#include <lprocfs_status.h>
#include "mdc_internal.h"
* lsm object unique in the whole mds, as I see. But it seems, we
* still not need it now. right? so just borrow the ll_fid_build_ino
*/
-static obd_id mdd_lov_create_id(struct lu_fid *fid)
+static obd_id mdd_lov_create_id(const struct lu_fid *fid)
{
return ((fid_seq(fid) - 1) * LUSTRE_SEQ_MAX_WIDTH + fid_oid(fid));
}
# include <linux/locks.h>
#endif
+#include <linux/lustre_acl.h>
#include <obd_class.h>
#include <lustre_dlm.h>
#include <obd_lov.h>
#include <dt_object.h>
#include <lustre_mds.h>
#include "mdt_internal.h"
-
+#include <linux/lustre_acl.h>
/*
* Initialized in mdt_mod_init().
*/
#ifdef CONFIG_FS_POSIX_ACL
if ((req->rq_export->exp_connect_flags & OBD_CONNECT_ACL) &&
(reqbody->valid & OBD_MD_FLACL)) {
- buffer = req_capsule_server_get(pill, &RMF_EADATA);
- length = req_capsule_get_size(pill, &RMF_EADATA, RCL_SERVER);
+ buffer = req_capsule_server_get(pill, &RMF_ACL);
+ length = req_capsule_get_size(pill, &RMF_ACL, RCL_SERVER);
if (length > 0) {
rc = mo_xattr_get(ctxt, next, buffer,
length, XATTR_NAME_ACL_ACCESS);
ENTRY;
- req_capsule_set_size(&info->mti_pill, &RMF_EADATA,
- RCL_SERVER, LUSTRE_POSIX_ACL_MAX_SIZE);
+ req_capsule_set_size(&info->mti_pill, &RMF_MDT_MD,
+ RCL_SERVER, info->mti_mdt->mdt_max_mdsize);
result = req_capsule_pack(&info->mti_pill);
if (result)
req_capsule_set_size(&info->mti_pill, &RMF_MDT_MD,
RCL_SERVER, info->mti_mdt->mdt_max_mdsize);
- req_capsule_set_size(&info->mti_pill, &RMF_EADATA,
- RCL_SERVER, LUSTRE_POSIX_ACL_MAX_SIZE);
rc = req_capsule_pack(&info->mti_pill);
if (rc)
req_capsule_set_size(&info->mti_pill, &RMF_MDT_MD,
RCL_SERVER, mdt->mdt_max_mdsize);
- req_capsule_set_size(&info->mti_pill, &RMF_EADATA,
- RCL_SERVER, LUSTRE_POSIX_ACL_MAX_SIZE);
-
rc = req_capsule_pack(&info->mti_pill);
if (rc)
RETURN(rc);
#endif
#define DEBUG_SUBSYSTEM S_MDS
+#include <linux/lustre_acl.h>
#include <lustre_mds.h>
#include "mdt_internal.h"
repbody->valid |= OBD_MD_FLEASIZE;
}
- /*FIXME: should determine the offset dynamicly */
+ /*FIXME: should determine the offset dynamicly,
+ *did not get ACL before shrink*/
lustre_shrink_reply(req, 2, repbody->eadatasize, 1);
lustre_shrink_reply(req, repbody->eadatasize ? 3 : 2, repbody->aclsize, 0);
req_capsule_set_size(&info->mti_pill, &RMF_MDT_MD, RCL_SERVER,
mdt->mdt_max_mdsize);
- req_capsule_set_size(&info->mti_pill, &RMF_EADATA, RCL_SERVER,
- LUSTRE_POSIX_ACL_MAX_SIZE);
-
result = req_capsule_pack(&info->mti_pill);
if (result)
RETURN(result);
#endif
/* struct ptlrpc_request, lustre_msg* */
#include <lustre_req_layout.h>
+#include <linux/lustre_acl.h>
static const struct req_msg_field *empty[] = {}; /* none */
static const struct req_msg_field *mds_reint_open_server[] = {
&RMF_MDT_BODY,
&RMF_MDT_MD,
+ &RMF_ACL
};
static const struct req_msg_field *mds_reint_unlink_client[] = {
&RMF_DLM_REP,
&RMF_MDT_BODY,
&RMF_MDT_MD,
- &RMF_EADATA
+ &RMF_ACL
};
static const struct req_msg_field *ldlm_intent_getattr_client[] = {
static const struct req_msg_field *mds_getattr_server[] = {
&RMF_MDT_BODY,
&RMF_MDT_MD,
- &RMF_EADATA
+ &RMF_ACL
};
static const struct req_format *req_formats[] = {
const struct req_msg_field RMF_EADATA = DEFINE_MSGF("eadata", 0, -1, NULL);
EXPORT_SYMBOL(RMF_EADATA);
+const struct req_msg_field RMF_ACL = DEFINE_MSGF("acl", 0,
+ LUSTRE_POSIX_ACL_MAX_SIZE, NULL);
+EXPORT_SYMBOL(RMF_ACL);
+
const struct req_msg_field RMF_LOGCOOKIES =
DEFINE_MSGF("logcookies", 0, sizeof(struct llog_cookie), NULL);
EXPORT_SYMBOL(RMF_LOGCOOKIES);