struct lustre_quota_ctxt obt_qctxt;
};
+/* llog contexts */
+enum llog_ctxt_id {
+ LLOG_CONFIG_ORIG_CTXT = 0,
+ LLOG_CONFIG_REPL_CTXT = 1,
+ LLOG_MDS_OST_ORIG_CTXT = 2,
+ LLOG_MDS_OST_REPL_CTXT = 3,
+ LLOG_SIZE_ORIG_CTXT = 4,
+ LLOG_SIZE_REPL_CTXT = 5,
+ LLOG_MD_ORIG_CTXT = 6,
+ LLOG_MD_REPL_CTXT = 7,
+ LLOG_RD1_ORIG_CTXT = 8,
+ LLOG_RD1_REPL_CTXT = 9,
+ LLOG_TEST_ORIG_CTXT = 10,
+ LLOG_TEST_REPL_CTXT = 11,
+ LLOG_LOVEA_ORIG_CTXT = 12,
+ LLOG_LOVEA_REPL_CTXT = 13,
+ LLOG_MAX_CTXTS
+};
+
#define FILTER_SUBDIR_COUNT 32 /* set to zero for no subdirs */
#define FILTER_GROUP_LLOG 1
__u64 fe_end;
};
+struct obd_llogs {
+ struct llog_ctxt *llog_ctxt[LLOG_MAX_CTXTS];
+};
+
+struct filter_group_llog {
+ struct list_head list;
+ int group;
+ struct obd_llogs *llogs;
+ struct obd_export *exp;
+};
+
struct filter_obd {
/* NB this field MUST be first */
struct obd_device_target fo_obt;
struct obd_histogram fo_r_dio_frags;
struct obd_histogram fo_w_dio_frags;
+ struct list_head fo_llog_list;
+ spinlock_t fo_llog_list_lock;
+
struct lustre_quota_ctxt fo_quota_ctxt;
spinlock_t fo_quotacheck_lock;
atomic_t fo_quotachecking;
struct semaphore mgs_sem;
};
+/* hah, upper limit 64 should be enough */
+#define N_NOSQUASH_NIDS 64
+struct rootsquash_info {
+ uid_t rsi_uid;
+ gid_t rsi_gid;
+ int rsi_n_nosquash_nids;
+ lnet_nid_t rsi_nosquash_nids[N_NOSQUASH_NIDS];
+};
+
struct mds_obd {
/* NB this field MUST be first */
struct obd_device_target mds_obt;
struct file *mds_lov_objid_filp;
struct file *mds_health_check_filp;
unsigned long *mds_client_bitmap;
- struct upcall_cache *mds_group_hash;
+// struct upcall_cache *mds_group_hash;
struct lustre_quota_info mds_quota_info;
struct semaphore mds_qonoff_sem;
unsigned long mds_lov_objids_valid:1,
mds_fl_user_xattr:1,
mds_fl_acl:1;
+
+ /* For CMD add mds_num */
+ int mds_num;
+
+ struct upcall_cache *mds_identity_cache;
+ struct upcall_cache *mds_rmtacl_cache;
+
+ /* root squash */
+ struct rootsquash_info *mds_rootsquash_info;
};
struct echo_obd {
oti->oti_numcookies = 0;
}
-/* llog contexts */
-enum llog_ctxt_id {
- LLOG_CONFIG_ORIG_CTXT = 0,
- LLOG_CONFIG_REPL_CTXT = 1,
- LLOG_MDS_OST_ORIG_CTXT = 2,
- LLOG_MDS_OST_REPL_CTXT = 3,
- LLOG_SIZE_ORIG_CTXT = 4,
- LLOG_SIZE_REPL_CTXT = 5,
- LLOG_MD_ORIG_CTXT = 6,
- LLOG_MD_REPL_CTXT = 7,
- LLOG_RD1_ORIG_CTXT = 8,
- LLOG_RD1_REPL_CTXT = 9,
- LLOG_TEST_ORIG_CTXT = 10,
- LLOG_TEST_REPL_CTXT = 11,
- LLOG_LOVEA_ORIG_CTXT = 12,
- LLOG_LOVEA_REPL_CTXT = 13,
- LLOG_MAX_CTXTS
-};
-
/*
* Events signalled through obd_notify() upcall-chain.
*/
};
#include <lu_object.h>
+
/*
* Data structure used to pass obd_notify()-event to non-obd listeners (llite
* and liblustre being main examples).
int cmd, obd_off *);
/* llog related obd_methods */
- int (*o_llog_init)(struct obd_device *obd, struct obd_device *disk_obd,
- int count, struct llog_catid *logid,
- struct obd_uuid *uuid);
+ int (*o_llog_init)(struct obd_device *obd, struct obd_llogs *llog,
+ struct obd_device *disk_obd, int count,
+ struct llog_catid *logid, struct obd_uuid *uuid);
int (*o_llog_finish)(struct obd_device *obd, int count);
-
+ int (*o_llog_connect)(struct obd_export *, struct llogd_conn_body *);
+
/* metadata-only methods */
int (*o_pin)(struct obd_export *, const struct lu_fid *fid,
struct obd_client_handle *, int flag);
int (*m_create)(struct obd_export *, struct md_op_data *,
const void *, int, int, __u32, __u32, __u32,
__u64, struct ptlrpc_request **);
- int (*m_done_writing)(struct obd_export *, struct md_op_data *);
+ int (*m_done_writing)(struct obd_export *, struct md_op_data *,
+ struct obd_client_handle *);
int (*m_enqueue)(struct obd_export *, int, struct lookup_intent *,
int, struct md_op_data *, struct lustre_handle *,
void *, int, ldlm_completion_callback,
int (*m_rename)(struct obd_export *, struct md_op_data *,
const char *, int, const char *, int,
struct ptlrpc_request **);
- int (*m_setattr)(struct obd_export *, struct md_op_data *,
- struct iattr *, void *, int , void *, int,
- struct ptlrpc_request **);
+ int (*m_is_subdir)(struct obd_export *, const struct lu_fid *,
+ const struct lu_fid *, struct ptlrpc_request **);
+ int (*m_setattr)(struct obd_export *, struct md_op_data *, void *,
+ int , void *, int, struct ptlrpc_request **);
int (*m_sync)(struct obd_export *, const struct lu_fid *,
struct ptlrpc_request **);
int (*m_readpage)(struct obd_export *, const struct lu_fid *,
int (*m_cancel_unused)(struct obd_export *, const struct lu_fid *,
int flags, void *opaque);
+ int (*m_get_remote_perm)(struct obd_export *, const struct lu_fid *,
+ struct ptlrpc_request **);
+
/*
* NOTE: If adding ops, add another LPROCFS_MD_OP_INIT() line to
* lprocfs_alloc_md_stats() in obdclass/lprocfs_status.c. Also, add a
case LOV_MAGIC_JOIN:
return &lsm_join_ops;
default:
- CERROR("Cannot recognize lsm_magic %d", magic);
+ CERROR("Cannot recognize lsm_magic %d\n", magic);
return NULL;
}
}