/* obdo.c */
#ifdef __KERNEL__
-void obdo_from_la(struct obdo *dst, struct lu_attr *la, __u64 valid);
+void obdo_from_la(struct obdo *dst, const struct lu_attr *la, __u64 valid);
void la_from_obdo(struct lu_attr *la, const struct obdo *dst, obd_flag valid);
-void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid);
-void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid);
+void obdo_refresh_inode(struct inode *dst, const struct obdo *src,
+ obd_flag valid);
#define ll_inode_flags(inode) (inode->i_flags)
#endif
MDS_DISCONNECT = 39,
MDS_GETSTATUS = 40,
MDS_STATFS = 41,
- MDS_PIN = 42,
- MDS_UNPIN = 43,
+ MDS_PIN = 42, /* obsolete, never used in a release */
+ MDS_UNPIN = 43, /* obsolete, never used in a release */
MDS_SYNC = 44,
MDS_DONE_WRITING = 45,
MDS_SET_INFO = 46,
MDS_GETXATTR = 49,
MDS_SETXATTR = 50, /* obsolete, now it's MDS_REINT op */
MDS_WRITEPAGE = 51,
- MDS_IS_SUBDIR = 52,
+ MDS_IS_SUBDIR = 52, /* obsolete, never used in a release */
MDS_GET_INFO = 53,
MDS_HSM_STATE_GET = 54,
MDS_HSM_STATE_SET = 55,
time_t imp_last_reply_time; /* for health check */
};
-typedef void (*obd_import_callback)(struct obd_import *imp, void *closure,
- int event, void *event_arg, void *cb_data);
-
-/**
- * Structure for import observer.
- * It is possible to register "observer" on an import and every time
- * something happens to an import (like connect/evict/disconnect)
- * obderver will get its callback called with event type
- */
-struct obd_import_observer {
- cfs_list_t oio_chain;
- obd_import_callback oio_cb;
- void *oio_cb_data;
-};
-
-void class_observe_import(struct obd_import *imp, obd_import_callback cb,
- void *cb_data);
-void class_unobserve_import(struct obd_import *imp, obd_import_callback cb,
- void *cb_data);
-void class_notify_import_observers(struct obd_import *imp, int event,
- void *event_arg);
-
/* import.c */
static inline unsigned int at_est2timeout(unsigned int val)
{
__llog_ctxt_put(NULL, ctxt);
}
-static inline void llog_group_init(struct obd_llog_group *olg, int group)
+static inline void llog_group_init(struct obd_llog_group *olg)
{
init_waitqueue_head(&olg->olg_waitq);
spin_lock_init(&olg->olg_lock);
mutex_init(&olg->olg_cat_processing);
- olg->olg_seq = group;
}
static inline int llog_group_set_ctxt(struct obd_llog_group *olg,
extern struct req_format RQF_MDS_GETATTR_NAME;
extern struct req_format RQF_MDS_CLOSE;
extern struct req_format RQF_MDS_RELEASE_CLOSE;
-extern struct req_format RQF_MDS_PIN;
-extern struct req_format RQF_MDS_UNPIN;
extern struct req_format RQF_MDS_CONNECT;
extern struct req_format RQF_MDS_DISCONNECT;
extern struct req_format RQF_MDS_GET_INFO;
extern struct req_format RQF_MDS_READPAGE;
extern struct req_format RQF_MDS_WRITEPAGE;
-extern struct req_format RQF_MDS_IS_SUBDIR;
extern struct req_format RQF_MDS_DONE_WRITING;
extern struct req_format RQF_MDS_REINT;
extern struct req_format RQF_MDS_REINT_CREATE;
- while setattr, the flags used for distinguish punch operation
*/
__u64 oi_flags;
- /* Lock handle specific for every OSC lock. */
- struct lustre_handle *oi_lockh;
/* lsm data specific for every OSC. */
struct lov_stripe_md *oi_md;
/* obdo data specific for every OSC, if needed at all. */
/* oss capability, its type is obd_capa in client to avoid copy.
* in contrary its type is lustre_capa in OSS. */
void *oi_capa;
- /* transfer jobid from ost_sync() to filter_sync()... */
- char *oi_jobid;
};
struct obd_type {
LLOG_CONFIG_ORIG_CTXT = 0,
LLOG_CONFIG_REPL_CTXT,
LLOG_MDS_OST_ORIG_CTXT,
- LLOG_MDS_OST_REPL_CTXT,
LLOG_SIZE_ORIG_CTXT,
LLOG_SIZE_REPL_CTXT,
- LLOG_RD1_ORIG_CTXT,
- LLOG_RD1_REPL_CTXT,
LLOG_TEST_ORIG_CTXT,
- LLOG_TEST_REPL_CTXT,
- LLOG_LOVEA_ORIG_CTXT,
- LLOG_LOVEA_REPL_CTXT,
LLOG_CHANGELOG_ORIG_CTXT, /**< changelog generation on mdd */
LLOG_CHANGELOG_REPL_CTXT, /**< changelog access on clients */
LLOG_CHANGELOG_USER_ORIG_CTXT, /**< for multiple changelog consumers */
/* A chunk is an optimal size used by osc_extent to determine
* the extent size. A chunk is max(PAGE_CACHE_SIZE, OST block size) */
int cl_chunkbits;
- int cl_chunk;
int cl_extent_tax; /* extent overhead, by bytes */
/* keep track of objects that have lois that contain pages which
__u32 flags;
struct page *page;
struct dentry *dentry;
- int lnb_grant_used;
int rc;
};
#define LUSTRE_MGS_OBDNAME "MGS"
#define LUSTRE_MGC_OBDNAME "MGC"
-static inline int is_osp_on_mdt(char *name)
-{
- char *ptr;
-
- ptr = strrchr(name, '-');
- if (ptr == NULL) {
- CERROR("%s is not a obdname\n", name);
- return 0;
- }
-
- /* 1.8 OSC/OSP name on MDT is fsname-OSTxxxx-osc */
- if (strncmp(ptr + 1, "osc", 3) == 0)
- return 1;
-
- if (strncmp(ptr + 1, "MDT", 3) != 0)
- return 0;
-
- while (*(--ptr) != '-' && ptr != name);
-
- if (ptr == name)
- return 0;
-
- if (strncmp(ptr + 1, LUSTRE_OSP_NAME, strlen(LUSTRE_OSP_NAME)) != 0 &&
- strncmp(ptr + 1, LUSTRE_OSC_NAME, strlen(LUSTRE_OSC_NAME)) != 0)
- return 0;
-
- return 1;
-}
-
-/* Don't conflict with on-wire flags OBD_BRW_WRITE, etc */
-#define N_LOCAL_TEMP_PAGE 0x10000000
-
struct obd_trans_info {
- __u64 oti_transno;
- __u64 oti_xid;
- /* Only used on the server side for tracking acks. */
- struct oti_req_ack_lock {
- struct lustre_handle lock;
- __u32 mode;
- } oti_ack_locks[4];
- void *oti_handle;
- struct llog_cookie oti_onecookie;
- struct llog_cookie *oti_logcookies;
- int oti_numcookies;
- /** synchronous write is needed */
- unsigned long oti_sync_write:1;
-
- /* initial thread handling transaction */
- struct ptlrpc_thread * oti_thread;
- __u32 oti_conn_cnt;
- /** VBR: versions */
- __u64 oti_pre_version;
- /** JobID */
- char *oti_jobid;
-
- struct obd_uuid *oti_ost_uuid;
+ __u64 oti_xid;
+ /* Only used on the server side for tracking acks. */
+ struct oti_req_ack_lock {
+ struct lustre_handle lock;
+ __u32 mode;
+ } oti_ack_locks[4];
+ void *oti_handle;
+ struct llog_cookie oti_onecookie;
+ struct llog_cookie *oti_logcookies;
+
+ /** VBR: versions */
+ __u64 oti_pre_version;
};
-static inline void oti_init(struct obd_trans_info *oti,
- struct ptlrpc_request *req)
-{
- if (oti == NULL)
- return;
- memset(oti, 0, sizeof(*oti));
-
- if (req == NULL)
- return;
-
- oti->oti_xid = req->rq_xid;
- /** VBR: take versions from request */
- if (req->rq_reqmsg != NULL &&
- lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) {
- __u64 *pre_version = lustre_msg_get_versions(req->rq_reqmsg);
- oti->oti_pre_version = pre_version ? pre_version[0] : 0;
- oti->oti_transno = lustre_msg_get_transno(req->rq_reqmsg);
- }
-
- /** called from mds_create_objects */
- if (req->rq_repmsg != NULL)
- oti->oti_transno = lustre_msg_get_transno(req->rq_repmsg);
- oti->oti_thread = req->rq_svc_thread;
- if (req->rq_reqmsg != NULL)
- oti->oti_conn_cnt = lustre_msg_get_conn_cnt(req->rq_reqmsg);
-}
-
-static inline void oti_alloc_cookies(struct obd_trans_info *oti,int num_cookies)
-{
- if (!oti)
- return;
-
- if (num_cookies == 1)
- oti->oti_logcookies = &oti->oti_onecookie;
- else
- OBD_ALLOC_LARGE(oti->oti_logcookies,
- num_cookies * sizeof(oti->oti_onecookie));
-
- oti->oti_numcookies = num_cookies;
-}
-
-static inline void oti_free_cookies(struct obd_trans_info *oti)
-{
- if (!oti || !oti->oti_logcookies)
- return;
-
- if (oti->oti_logcookies == &oti->oti_onecookie)
- LASSERT(oti->oti_numcookies == 1);
- else
- OBD_FREE_LARGE(oti->oti_logcookies,
- oti->oti_numcookies*sizeof(oti->oti_onecookie));
- oti->oti_logcookies = NULL;
- oti->oti_numcookies = 0;
-}
-
/*
* Events signalled through obd_notify() upcall-chain.
*/
};
struct obd_llog_group {
- int olg_seq;
struct llog_ctxt *olg_ctxts[LLOG_MAX_CTXTS];
wait_queue_head_t olg_waitq;
spinlock_t olg_lock;
obd_starting:1, /* started setup */
obd_force:1, /* cleanup with > 0 obd refcount */
obd_fail:1, /* cleanup with failover */
- obd_async_recov:1, /* allow asynchronous orphan cleanup */
obd_no_conn:1, /* deny new connections */
obd_inactive:1, /* device active/inactive
* (for /proc/status only!!) */
int obd_max_recoverable_clients;
atomic_t obd_connected_clients;
int obd_stale_clients;
- int obd_delayed_clients;
/* this lock protects all recovery list_heads, timer and
* obd_next_recovery_transno value */
spinlock_t obd_recovery_task_lock;
int obd_conn_inprogress;
};
-#define OBD_LLOG_FL_SENDNOW 0x0001
-#define OBD_LLOG_FL_EXIT 0x0002
-
enum obd_cleanup_stage {
/* Special case hack for MDS LOVs */
OBD_CLEANUP_EARLY,
/* get/set_info keys */
#define KEY_ASYNC "async"
-#define KEY_BLOCKSIZE_BITS "blocksize_bits"
-#define KEY_BLOCKSIZE "blocksize"
#define KEY_CAPA_KEY "capa_key"
#define KEY_CHANGELOG_CLEAR "changelog_clear"
#define KEY_FID2PATH "fid2path"
#define KEY_GRANT_SHRINK "grant_shrink"
#define KEY_HSM_COPYTOOL_SEND "hsm_send"
#define KEY_INIT_RECOV_BACKUP "init_recov_bk"
-#define KEY_INIT_RECOV "initial_recov"
#define KEY_INTERMDS "inter_mds"
#define KEY_LAST_ID "last_id"
#define KEY_LAST_FID "last_fid"
#define KEY_LOCK_TO_STRIPE "lock_to_stripe"
#define KEY_LOVDESC "lovdesc"
-#define KEY_LOV_IDX "lov_idx"
#define KEY_MAX_EASIZE "max_easize"
#define KEY_DEFAULT_EASIZE "default_easize"
#define KEY_MAX_COOKIESIZE "max_cookiesize"
/* KEY_SET_INFO in lustre_idl.h */
#define KEY_SPTLRPC_CONF "sptlrpc_conf"
#define KEY_CONNECT_FLAG "connect_flags"
-#define KEY_SYNC_LOCK_CANCEL "sync_lock_cancel"
#define KEY_CACHE_SET "cache_set"
#define KEY_CACHE_LRU_SHRINK "cache_lru_shrink"
-#define KEY_CHANGELOG_INDEX "changelog_index"
#define KEY_OSP_CONNECTED "osp_connected"
struct lu_context;
/* iattr fields and blocks. */
struct iattr op_attr;
-#ifdef __KERNEL__
- unsigned int op_attr_flags;
-#endif
__u64 op_valid;
loff_t op_attr_blocks;
__u32 keylen, void *key,
__u32 vallen, void *val,
struct ptlrpc_request_set *set);
- int (*o_attach)(struct obd_device *dev, obd_count len, void *data);
- int (*o_detach)(struct obd_device *dev);
int (*o_setup) (struct obd_device *dev, struct lustre_cfg *cfg);
int (*o_precleanup)(struct obd_device *dev,
enum obd_cleanup_stage cleanup_stage);
int (*o_create)(const struct lu_env *env, struct obd_export *exp,
struct obdo *oa, struct lov_stripe_md **ea,
struct obd_trans_info *oti);
- int (*o_create_async)(struct obd_export *exp, struct obd_info *oinfo,
- struct lov_stripe_md **ea,
- struct obd_trans_info *oti);
int (*o_destroy)(const struct lu_env *env, struct obd_export *exp,
struct obdo *oa, struct lov_stripe_md *ea,
struct obd_trans_info *oti, struct obd_export *md_exp,
int (*o_llog_init)(struct obd_device *obd, struct obd_llog_group *grp,
struct obd_device *disk_obd, int *idx);
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_capa *, struct obd_client_handle *, int flag);
- int (*o_unpin)(struct obd_export *, struct obd_client_handle *, int);
int (*o_import_event)(struct obd_device *, struct obd_import *,
enum obd_import_event);
struct mdt_remote_perm *remote_perm;
struct obd_capa *mds_capa;
struct obd_capa *oss_capa;
- __u64 lm_flags;
};
struct md_open_data {
int (*m_fsync)(struct obd_export *, const struct lu_fid *,
struct obd_capa *, struct ptlrpc_request **);
- int (*m_readpage)(struct obd_export *, struct md_op_data *,
- struct page **, struct ptlrpc_request **);
-
int (*m_read_entry)(struct obd_export *, struct md_op_data *,
struct md_callback *cb_op, struct lu_dirent **ld,
struct page **ppage);
int (*m_getattr_name)(struct obd_export *, struct md_op_data *,
struct ptlrpc_request **);
- int (*m_is_subdir)(struct obd_export *, const struct lu_fid *,
- const struct lu_fid *,
- struct ptlrpc_request **);
-
int (*m_init_ea_size)(struct obd_export *, int, int, int, int);
int (*m_get_lustre_md)(struct obd_export *, struct ptlrpc_request *,
}
}
-/* Requests for obd_extent_calc() */
-#define OBD_CALC_STRIPE_START 1
-#define OBD_CALC_STRIPE_END 2
-
-static inline struct lustre_capa *oinfo_capa(struct obd_info *oinfo)
-{
- return oinfo->oi_capa;
-}
-
static inline struct md_open_data *obd_mod_alloc(void)
{
struct md_open_data *mod;
* by the request interpret routine */
#define OBD_STATFS_FOR_MDT0 0x0008 /* The statfs is only for retrieving
* information from MDT0. */
-#define OBD_FL_PUNCH 0x00000001 /* To indicate it is punch operation */
/* OBD Device Declarations */
extern struct obd_device *obd_devs[MAX_OBD_DEVICES];
}
#endif
-void obdo_cpy_md(struct obdo *dst, struct obdo *src, obd_flag valid);
-void obdo_to_ioobj(struct obdo *oa, struct obd_ioobj *ioobj);
-void obdo_from_iattr(struct obdo *oa, struct iattr *attr,
- unsigned int ia_valid);
-void iattr_from_obdo(struct iattr *attr, struct obdo *oa, obd_flag valid);
-void md_from_obdo(struct md_op_data *op_data, struct obdo *oa, obd_flag valid);
-void obdo_from_md(struct obdo *oa, struct md_op_data *op_data,
- unsigned int valid);
+void obdo_cpy_md(struct obdo *dst, const struct obdo *src, obd_flag valid);
+void obdo_to_ioobj(const struct obdo *oa, struct obd_ioobj *ioobj);
+void md_from_obdo(struct md_op_data *op_data, const struct obdo *oa,
+ obd_flag valid);
#define OBT(dev) (dev)->obd_type
#define OBP(dev, op) (dev)->obd_type->typ_dt_ops->o_ ## op
return rc;
}
-static inline int obd_create_async(struct obd_export *exp,
- struct obd_info *oinfo,
- struct lov_stripe_md **ea,
- struct obd_trans_info *oti)
-{
- int rc;
- ENTRY;
-
- EXP_CHECK_DT_OP(exp, create_async);
- EXP_COUNTER_INCREMENT(exp, create_async);
-
- rc = OBP(exp->exp_obd, create_async)(exp, oinfo, ea, oti);
- RETURN(rc);
-}
-
static inline int obd_create(const struct lu_env *env, struct obd_export *exp,
struct obdo *obdo, struct lov_stripe_md **ea,
struct obd_trans_info *oti)
RETURN(rc);
}
-static inline int obd_pin(struct obd_export *exp, const struct lu_fid *fid,
- struct obd_capa *oc, struct obd_client_handle *handle,
- int flag)
-{
- int rc;
- ENTRY;
-
- EXP_CHECK_DT_OP(exp, pin);
- EXP_COUNTER_INCREMENT(exp, pin);
-
- rc = OBP(exp->exp_obd, pin)(exp, fid, oc, handle, flag);
- RETURN(rc);
-}
-
-static inline int obd_unpin(struct obd_export *exp,
- struct obd_client_handle *handle, int flag)
-{
- int rc;
- ENTRY;
-
- EXP_CHECK_DT_OP(exp, unpin);
- EXP_COUNTER_INCREMENT(exp, unpin);
-
- rc = OBP(exp->exp_obd, unpin)(exp, handle, flag);
- RETURN(rc);
-}
-
-
static inline void obd_import_event(struct obd_device *obd,
struct obd_import *imp,
enum obd_import_event event)
EXIT;
}
-static inline int obd_llog_connect(struct obd_export *exp,
- struct llogd_conn_body *body)
-{
- int rc;
- ENTRY;
-
- OBD_CHECK_DT_OP(exp->exp_obd, llog_connect, 0);
- EXP_COUNTER_INCREMENT(exp, llog_connect);
-
- rc = OBP(exp->exp_obd, llog_connect)(exp, body);
- RETURN(rc);
-}
-
-
static inline int obd_notify(struct obd_device *obd,
struct obd_device *watched,
enum obd_notify_event ev,
ENTRY;
OBD_CHECK_DEV(obd);
- /* the check for async_recov is a complete hack - I'm hereby
- overloading the meaning to also mean "this was called from
- mds_postsetup". I know that my mds is able to handle notifies
- by this point, and it needs to get them to execute mds_postrecov. */
- if (!obd->obd_set_up && !obd->obd_async_recov) {
+ if (!obd->obd_set_up) {
CDEBUG(D_HA, "obd %s not set up\n", obd->obd_name);
RETURN(-EINVAL);
}
RETURN(0);
}
-static inline int obd_pin_observer(struct obd_device *obd,
- struct obd_device **observer)
-{
- ENTRY;
- down_read(&obd->obd_observer_link_sem);
- if (!obd->obd_observer) {
- *observer = NULL;
- up_read(&obd->obd_observer_link_sem);
- RETURN(-ENOENT);
- }
- *observer = obd->obd_observer;
- RETURN(0);
-}
-
-static inline int obd_unpin_observer(struct obd_device *obd)
-{
- ENTRY;
- up_read(&obd->obd_observer_link_sem);
- RETURN(0);
-}
-
-#if 0
-static inline int obd_register_page_removal_cb(struct obd_export *exp,
- obd_page_removal_cb_t cb,
- obd_pin_extent_cb pin_cb)
-{
- int rc;
- ENTRY;
-
- OBD_CHECK_DT_OP(exp->exp_obd, register_page_removal_cb, 0);
- OBD_COUNTER_INCREMENT(exp->exp_obd, register_page_removal_cb);
-
- rc = OBP(exp->exp_obd, register_page_removal_cb)(exp, cb, pin_cb);
- RETURN(rc);
-}
-
-static inline int obd_unregister_page_removal_cb(struct obd_export *exp,
- obd_page_removal_cb_t cb)
-{
- int rc;
- ENTRY;
-
- OBD_CHECK_DT_OP(exp->exp_obd, unregister_page_removal_cb, 0);
- OBD_COUNTER_INCREMENT(exp->exp_obd, unregister_page_removal_cb);
-
- rc = OBP(exp->exp_obd, unregister_page_removal_cb)(exp, cb);
- RETURN(rc);
-}
-
-static inline int obd_register_lock_cancel_cb(struct obd_export *exp,
- obd_lock_cancel_cb cb)
-{
- int rc;
- ENTRY;
-
- OBD_CHECK_DT_OP(exp->exp_obd, register_lock_cancel_cb, 0);
- OBD_COUNTER_INCREMENT(exp->exp_obd, register_lock_cancel_cb);
-
- rc = OBP(exp->exp_obd, register_lock_cancel_cb)(exp, cb);
- RETURN(rc);
-}
-
-static inline int obd_unregister_lock_cancel_cb(struct obd_export *exp,
- obd_lock_cancel_cb cb)
-{
- int rc;
- ENTRY;
-
- OBD_CHECK_DT_OP(exp->exp_obd, unregister_lock_cancel_cb, 0);
- OBD_COUNTER_INCREMENT(exp->exp_obd, unregister_lock_cancel_cb);
-
- rc = OBP(exp->exp_obd, unregister_lock_cancel_cb)(exp, cb);
- RETURN(rc);
-}
-#endif
-
/* metadata helpers */
static inline int md_getstatus(struct obd_export *exp,
struct lu_fid *fid, struct obd_capa **pc)
RETURN(rc);
}
-static inline int md_is_subdir(struct obd_export *exp,
- const struct lu_fid *pfid,
- const struct lu_fid *cfid,
- struct ptlrpc_request **request)
-{
- int rc;
- ENTRY;
- EXP_CHECK_MD_OP(exp, is_subdir);
- EXP_MD_COUNTER_INCREMENT(exp, is_subdir);
- rc = MDP(exp->exp_obd, is_subdir)(exp, pfid, cfid, request);
- RETURN(rc);
-}
-
static inline int md_setattr(struct obd_export *exp, struct md_op_data *op_data,
void *ea, int ealen, void *ea2, int ea2len,
struct ptlrpc_request **request,
RETURN(rc);
}
-static inline int md_readpage(struct obd_export *exp, struct md_op_data *opdata,
- struct page **pages,
- struct ptlrpc_request **request)
-{
- int rc;
- ENTRY;
- EXP_CHECK_MD_OP(exp, readpage);
- EXP_MD_COUNTER_INCREMENT(exp, readpage);
- rc = MDP(exp->exp_obd, readpage)(exp, opdata, pages, request);
- RETURN(rc);
-}
-
static inline int md_read_entry(struct obd_export *exp,
struct md_op_data *op_data,
struct md_callback *cb_op,
} while(0)
-static inline void obdo2fid(struct obdo *oa, struct lu_fid *fid)
-{
- /* something here */
-}
-
-static inline void fid2obdo(struct lu_fid *fid, struct obdo *oa)
-{
- /* something here */
-}
-
typedef int (*register_lwp_cb)(void *data);
struct lwp_register_item {
extern unsigned int at_history;
extern int at_early_margin;
extern int at_extra;
-extern unsigned int obd_sync_filter;
extern unsigned int obd_max_dirty_pages;
extern atomic_t obd_unstable_pages;
extern atomic_t obd_dirty_pages;
struct filter_obd {
/* NB this field MUST be first */
struct obd_device_target fo_obt;
- rwlock_t fo_sptlrpc_lock;
- struct sptlrpc_rule_set fo_sptlrpc_rset;
/* capability related */
unsigned int fo_fl_oss_capa;
cfs_list_t fo_capa_keys;
cfs_hlist_head_t *fo_capa_hash;
- int fo_sec_level;
};
struct echo_obd {
void mdc_pack_capa(struct ptlrpc_request *req,
const struct req_msg_field *field, struct obd_capa *oc);
int mdc_pack_req(struct ptlrpc_request *req, int version, int opc);
-void mdc_is_subdir_pack(struct ptlrpc_request *req, const struct lu_fid *pfid,
- const struct lu_fid *cfid, int flags);
void mdc_swap_layouts_pack(struct ptlrpc_request *req,
struct md_op_data *op_data);
void mdc_readdir_pack(struct ptlrpc_request *req, __u64 pgoff, __u32 size,
DEBUG_CAPA(D_SEC, c, "pack");
}
-void mdc_is_subdir_pack(struct ptlrpc_request *req, const struct lu_fid *pfid,
- const struct lu_fid *cfid, int flags)
-{
- struct mdt_body *b = req_capsule_client_get(&req->rq_pill,
- &RMF_MDT_BODY);
-
- if (pfid) {
- b->fid1 = *pfid;
- b->valid = OBD_MD_FLID;
- }
- if (cfid)
- b->fid2 = *cfid;
- b->flags = flags;
-}
-
void mdc_swap_layouts_pack(struct ptlrpc_request *req,
struct md_op_data *op_data)
{
RETURN(rc);
}
-static int mdc_is_subdir(struct obd_export *exp,
- const struct lu_fid *pfid,
- const struct lu_fid *cfid,
- struct ptlrpc_request **request)
-{
- struct ptlrpc_request *req;
- int rc;
-
- ENTRY;
-
- *request = NULL;
- req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp),
- &RQF_MDS_IS_SUBDIR, LUSTRE_MDS_VERSION,
- MDS_IS_SUBDIR);
- if (req == NULL)
- RETURN(-ENOMEM);
-
- mdc_is_subdir_pack(req, pfid, cfid, 0);
- ptlrpc_request_set_replen(req);
-
- rc = ptlrpc_queue_wait(req);
- if (rc && rc != -EREMOTE)
- ptlrpc_req_finished(req);
- else
- *request = req;
- RETURN(rc);
-}
-
static int mdc_xattr_common(struct obd_export *exp,const struct req_format *fmt,
const struct lu_fid *fid,
struct obd_capa *oc, int opcode, obd_valid valid,
RETURN(rc);
}
-static int mdc_pin(struct obd_export *exp, const struct lu_fid *fid,
- struct obd_capa *oc, struct obd_client_handle *handle,
- int flags)
-{
- struct ptlrpc_request *req;
- struct mdt_body *body;
- int rc;
- ENTRY;
-
- req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_MDS_PIN);
- if (req == NULL)
- RETURN(-ENOMEM);
-
- mdc_set_capa_size(req, &RMF_CAPA1, oc);
-
- rc = ptlrpc_request_pack(req, LUSTRE_MDS_VERSION, MDS_PIN);
- if (rc) {
- ptlrpc_request_free(req);
- RETURN(rc);
- }
-
- mdc_pack_body(req, fid, oc, 0, 0, -1, flags);
-
- ptlrpc_request_set_replen(req);
-
- mdc_get_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
- rc = ptlrpc_queue_wait(req);
- mdc_put_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
- if (rc) {
- CERROR("Pin failed: %d\n", rc);
- GOTO(err_out, rc);
- }
-
- body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
- if (body == NULL)
- GOTO(err_out, rc = -EPROTO);
-
- handle->och_fh = body->handle;
- handle->och_magic = OBD_CLIENT_HANDLE_MAGIC;
-
- handle->och_mod = obd_mod_alloc();
- if (handle->och_mod == NULL) {
- DEBUG_REQ(D_ERROR, req, "can't allocate md_open_data");
- GOTO(err_out, rc = -ENOMEM);
- }
- handle->och_mod->mod_open_req = req; /* will be dropped by unpin */
-
- RETURN(0);
-
-err_out:
- ptlrpc_req_finished(req);
- RETURN(rc);
-}
-
-static int mdc_unpin(struct obd_export *exp, struct obd_client_handle *handle,
- int flag)
-{
- struct ptlrpc_request *req;
- struct mdt_body *body;
- int rc;
- ENTRY;
-
- req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp), &RQF_MDS_UNPIN,
- LUSTRE_MDS_VERSION, MDS_UNPIN);
- if (req == NULL)
- RETURN(-ENOMEM);
-
- body = req_capsule_client_get(&req->rq_pill, &RMF_MDT_BODY);
- body->handle = handle->och_fh;
- body->flags = flag;
-
- ptlrpc_request_set_replen(req);
-
- mdc_get_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
- rc = ptlrpc_queue_wait(req);
- mdc_put_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
-
- if (rc != 0)
- CERROR("Unpin failed: %d\n", rc);
-
- ptlrpc_req_finished(req);
- ptlrpc_req_finished(handle->och_mod->mod_open_req);
-
- obd_mod_put(handle->och_mod);
- RETURN(rc);
-}
-
int mdc_fsync(struct obd_export *exp, const struct lu_fid *fid,
struct obd_capa *oc, struct ptlrpc_request **request)
{
.o_iocontrol = mdc_iocontrol,
.o_set_info_async = mdc_set_info_async,
.o_statfs = mdc_statfs,
- .o_pin = mdc_pin,
- .o_unpin = mdc_unpin,
.o_fid_init = client_fid_init,
.o_fid_fini = client_fid_fini,
.o_fid_alloc = mdc_fid_alloc,
.m_getattr_name = mdc_getattr_name,
.m_intent_lock = mdc_intent_lock,
.m_link = mdc_link,
- .m_is_subdir = mdc_is_subdir,
.m_rename = mdc_rename,
.m_setattr = mdc_setattr,
.m_setxattr = mdc_setxattr,
return rc;
}
-static int mdt_is_subdir(struct tgt_session_info *tsi)
-{
- struct mdt_thread_info *info = tsi2mdt_info(tsi);
- struct mdt_object *o = info->mti_object;
- struct req_capsule *pill = info->mti_pill;
- const struct mdt_body *body = info->mti_body;
- struct mdt_body *repbody;
- int rc;
- ENTRY;
-
- LASSERT(o != NULL);
-
- repbody = req_capsule_server_get(pill, &RMF_MDT_BODY);
-
- /*
- * We save last checked parent fid to @repbody->fid1 for remote
- * directory case.
- */
- LASSERT(fid_is_sane(&body->fid2));
- LASSERT(mdt_object_exists(o) && !mdt_object_remote(o));
- rc = mdo_is_subdir(info->mti_env, mdt_object_child(o),
- &body->fid2, &repbody->fid1);
- if (rc == 0 || rc == -EREMOTE)
- repbody->valid |= OBD_MD_FLID;
-
- mdt_thread_info_fini(info);
- RETURN(rc);
-}
-
static int mdt_swap_layouts(struct tgt_session_info *tsi)
{
struct mdt_thread_info *info;
mdt_done_writing),
TGT_MDT_HDL(HABEO_CORPUS| HABEO_REFERO, MDS_READPAGE, mdt_readpage),
TGT_MDT_HDL(HABEO_CORPUS| HABEO_REFERO, MDS_SYNC, mdt_sync),
-TGT_MDT_HDL(HABEO_CORPUS| HABEO_REFERO, MDS_IS_SUBDIR, mdt_is_subdir),
TGT_MDT_HDL(0, MDS_QUOTACTL, mdt_quotactl),
TGT_MDT_HDL(HABEO_CORPUS| HABEO_REFERO | MUTABOR, MDS_HSM_PROGRESS,
mdt_hsm_progress),
}
EXPORT_SYMBOL(obd_alloc_fail);
-static inline void obd_data2conn(struct lustre_handle *conn,
- struct obd_ioctl_data *data)
-{
- memset(conn, 0, sizeof *conn);
- conn->cookie = data->ioc_cookie;
-}
-
-static inline void obd_conn2data(struct obd_ioctl_data *data,
- struct lustre_handle *conn)
-{
- data->ioc_cookie = conn->cookie;
-}
-
int class_resolve_dev_name(__u32 len, const char *name)
{
int rc;
#ifdef __KERNEL__
static void cleanup_obdclass(void)
{
- int i;
int lustre_unregister_fs(void);
__u64 memory_leaked, pages_leaked;
__u64 memory_max, pages_max;
lustre_unregister_fs();
misc_deregister(&obd_psdev);
- for (i = 0; i < class_devno_max(); i++) {
- struct obd_device *obd = class_num2obd(i);
- if (obd && obd->obd_set_up &&
- OBT(obd) && OBP(obd, detach)) {
- /* XXX should this call generic detach otherwise? */
- LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
- OBP(obd, detach)(obd);
- }
- }
llog_info_fini();
#ifdef HAVE_SERVER_SUPPORT
lu_ucred_global_fini();
extern unsigned int obd_dump_on_timeout;
extern unsigned int obd_timeout;
extern unsigned int ldlm_timeout;
-extern unsigned int obd_sync_filter;
extern atomic_t obd_memory;
int read_build_version SYSCTL_HANDLER_ARGS;
struct obd_device *obd = exp->exp_obd;
spin_lock(&obd->obd_recovery_task_lock);
- if (exp->exp_delayed)
- obd->obd_delayed_clients--;
if (obd->obd_recovering) {
if (exp->exp_in_recovery) {
spin_lock(&exp->exp_lock);
#define DEBUG_SUBSYSTEM S_CLASS
-#ifndef __KERNEL__
-#include <liblustre.h>
-#else
-#include <linux/module.h>
-#include <obd_class.h>
-#include <lustre/lustre_idl.h>
-#endif
-
-#ifdef __KERNEL__
#include <linux/fs.h>
+#include <linux/module.h>
#include <linux/pagemap.h> /* for PAGE_CACHE_SIZE */
+#include <lustre/lustre_idl.h>
+#include <obd_class.h>
/*FIXME: Just copy from obdo_from_inode*/
-void obdo_from_la(struct obdo *dst, struct lu_attr *la, __u64 valid)
+void obdo_from_la(struct obdo *dst, const struct lu_attr *la, __u64 valid)
{
obd_flag newvalid = 0;
}
EXPORT_SYMBOL(la_from_obdo);
-void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid)
+void obdo_refresh_inode(struct inode *dst, const struct obdo *src,
+ obd_flag valid)
{
valid &= src->o_valid;
dst->i_blocks = src->o_blocks;
}
EXPORT_SYMBOL(obdo_refresh_inode);
-
-void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid)
-{
- valid &= src->o_valid;
-
- LASSERTF(!(valid & (OBD_MD_FLTYPE | OBD_MD_FLGENER | OBD_MD_FLFID |
- OBD_MD_FLID | OBD_MD_FLGROUP)),
- "object "DOSTID", valid %x\n", POSTID(&src->o_oi), valid);
-
- if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
- CDEBUG(D_INODE,
- "valid "LPX64", cur time %lu/%lu, new "LPU64"/"LPU64"\n",
- src->o_valid, LTIME_S(dst->i_mtime),
- LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime);
-
- if (valid & OBD_MD_FLATIME)
- LTIME_S(dst->i_atime) = src->o_atime;
- if (valid & OBD_MD_FLMTIME)
- LTIME_S(dst->i_mtime) = src->o_mtime;
- if (valid & OBD_MD_FLCTIME && src->o_ctime > LTIME_S(dst->i_ctime))
- LTIME_S(dst->i_ctime) = src->o_ctime;
- if (valid & OBD_MD_FLSIZE)
- i_size_write(dst, src->o_size);
- if (valid & OBD_MD_FLBLOCKS) { /* allocation of space */
- dst->i_blocks = src->o_blocks;
- if (dst->i_blocks < src->o_blocks) /* overflow */
- dst->i_blocks = -1;
- }
- if (valid & OBD_MD_FLBLKSZ)
- dst->i_blkbits = ffs(src->o_blksize)-1;
- if (valid & OBD_MD_FLMODE)
- dst->i_mode = (dst->i_mode & S_IFMT) | (src->o_mode & ~S_IFMT);
- if (valid & OBD_MD_FLUID)
- dst->i_uid = make_kuid(&init_user_ns, src->o_uid);
- if (valid & OBD_MD_FLGID)
- dst->i_gid = make_kgid(&init_user_ns, src->o_gid);
- if (valid & OBD_MD_FLFLAGS)
- dst->i_flags = src->o_flags;
-}
-EXPORT_SYMBOL(obdo_to_inode);
-#endif
LPROCFS_MD_OP_INIT(num_private_stats, stats, intent_lock);
LPROCFS_MD_OP_INIT(num_private_stats, stats, link);
LPROCFS_MD_OP_INIT(num_private_stats, stats, rename);
- LPROCFS_MD_OP_INIT(num_private_stats, stats, is_subdir);
LPROCFS_MD_OP_INIT(num_private_stats, stats, setattr);
LPROCFS_MD_OP_INIT(num_private_stats, stats, fsync);
- LPROCFS_MD_OP_INIT(num_private_stats, stats, readpage);
LPROCFS_MD_OP_INIT(num_private_stats, stats, read_entry);
LPROCFS_MD_OP_INIT(num_private_stats, stats, unlink);
LPROCFS_MD_OP_INIT(num_private_stats, stats, setxattr);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, iocontrol);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, get_info);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, set_info_async);
- LPROCFS_OBD_OP_INIT(num_private_stats, stats, attach);
- LPROCFS_OBD_OP_INIT(num_private_stats, stats, detach);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, setup);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, precleanup);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, cleanup);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, packmd);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, unpackmd);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, create);
- LPROCFS_OBD_OP_INIT(num_private_stats, stats, create_async);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, destroy);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, setattr);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, setattr_async);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, init_export);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, destroy_export);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, llog_init);
- LPROCFS_OBD_OP_INIT(num_private_stats, stats, llog_connect);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, llog_finish);
- LPROCFS_OBD_OP_INIT(num_private_stats, stats, pin);
- LPROCFS_OBD_OP_INIT(num_private_stats, stats, unpin);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, import_event);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, notify);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, health_check);
CFS_INIT_LIST_HEAD(&obd->obd_evict_list);
INIT_LIST_HEAD(&obd->obd_lwp_list);
- llog_group_init(&obd->obd_olg, FID_SEQ_LLOG);
+ llog_group_init(&obd->obd_olg);
obd->obd_conn_inprogress = 0;
}
memcpy(obd->obd_uuid.uuid, uuid, len);
- /* do the attach */
- if (OBP(obd, attach)) {
- rc = OBP(obd,attach)(obd, sizeof *lcfg, lcfg);
- if (rc)
- GOTO(out, rc = -EINVAL);
- }
-
/* Detach drops this */
spin_lock(&obd->obd_dev_lock);
atomic_set(&obd->obd_refcount, 1);
CERROR("Cleanup %s returned %d\n",
obd->obd_name, err);
}
- if (OBP(obd, detach)) {
- err = OBP(obd, detach)(obd);
- if (err)
- CERROR("Detach returned %d\n", err);
- }
+
class_release_dev(obd);
}
}
}
EXPORT_SYMBOL(obdo_from_inode);
-void obdo_cpy_md(struct obdo *dst, struct obdo *src, obd_flag valid)
+void obdo_cpy_md(struct obdo *dst, const struct obdo *src, obd_flag valid)
{
#ifdef __KERNEL__
CDEBUG(D_INODE, "src obdo "DOSTID" valid "LPX64", dst obdo "DOSTID"\n",
}
EXPORT_SYMBOL(obdo_cpy_md);
-/* returns FALSE if comparison (by flags) is same, TRUE if changed */
-int obdo_cmp_md(struct obdo *dst, struct obdo *src, obd_flag compare)
-{
- int res = 0;
-
- if ( compare & OBD_MD_FLATIME )
- res = (res || (dst->o_atime != src->o_atime));
- if ( compare & OBD_MD_FLMTIME )
- res = (res || (dst->o_mtime != src->o_mtime));
- if ( compare & OBD_MD_FLCTIME )
- res = (res || (dst->o_ctime != src->o_ctime));
- if ( compare & OBD_MD_FLSIZE )
- res = (res || (dst->o_size != src->o_size));
- if ( compare & OBD_MD_FLBLOCKS ) /* allocation of space */
- res = (res || (dst->o_blocks != src->o_blocks));
- if ( compare & OBD_MD_FLBLKSZ )
- res = (res || (dst->o_blksize != src->o_blksize));
- if ( compare & OBD_MD_FLTYPE )
- res = (res || (((dst->o_mode ^ src->o_mode) & S_IFMT) != 0));
- if ( compare & OBD_MD_FLMODE )
- res = (res || (((dst->o_mode ^ src->o_mode) & ~S_IFMT) != 0));
- if ( compare & OBD_MD_FLUID )
- res = (res || (dst->o_uid != src->o_uid));
- if ( compare & OBD_MD_FLGID )
- res = (res || (dst->o_gid != src->o_gid));
- if ( compare & OBD_MD_FLFLAGS )
- res = (res || (dst->o_flags != src->o_flags));
- if ( compare & OBD_MD_FLNLINK )
- res = (res || (dst->o_nlink != src->o_nlink));
- if ( compare & OBD_MD_FLFID ) {
- res = (res || (dst->o_parent_seq != src->o_parent_seq));
- res = (res || (dst->o_parent_ver != src->o_parent_ver));
- }
- if ( compare & OBD_MD_FLGENER )
- res = (res || (dst->o_parent_oid != src->o_parent_oid));
- /* XXX Don't know if thses should be included here - wasn't previously
- if ( compare & OBD_MD_FLINLINE )
- res = (res || memcmp(dst->o_inline, src->o_inline));
- */
- return res;
-}
-EXPORT_SYMBOL(obdo_cmp_md);
-
-void obdo_to_ioobj(struct obdo *oa, struct obd_ioobj *ioobj)
+void obdo_to_ioobj(const struct obdo *oa, struct obd_ioobj *ioobj)
{
ioobj->ioo_oid = oa->o_oi;
if (unlikely(!(oa->o_valid & OBD_MD_FLGROUP)))
}
EXPORT_SYMBOL(obdo_to_ioobj);
-void obdo_from_iattr(struct obdo *oa, struct iattr *attr, unsigned int ia_valid)
-{
- if (ia_valid & ATTR_ATIME) {
- oa->o_atime = LTIME_S(attr->ia_atime);
- oa->o_valid |= OBD_MD_FLATIME;
- }
- if (ia_valid & ATTR_MTIME) {
- oa->o_mtime = LTIME_S(attr->ia_mtime);
- oa->o_valid |= OBD_MD_FLMTIME;
- }
- if (ia_valid & ATTR_CTIME) {
- oa->o_ctime = LTIME_S(attr->ia_ctime);
- oa->o_valid |= OBD_MD_FLCTIME;
- }
- if (ia_valid & ATTR_SIZE) {
- oa->o_size = attr->ia_size;
- oa->o_valid |= OBD_MD_FLSIZE;
- }
- if (ia_valid & ATTR_MODE) {
- oa->o_mode = attr->ia_mode;
- oa->o_valid |= OBD_MD_FLTYPE | OBD_MD_FLMODE;
- if (!in_group_p(make_kgid(&init_user_ns, oa->o_gid)) &&
- !cfs_capable(CFS_CAP_FSETID))
- oa->o_mode &= ~S_ISGID;
- }
- if (ia_valid & ATTR_UID) {
- oa->o_uid = from_kuid(&init_user_ns, attr->ia_uid);
- oa->o_valid |= OBD_MD_FLUID;
- }
- if (ia_valid & ATTR_GID) {
- oa->o_gid = from_kgid(&init_user_ns, attr->ia_gid);
- oa->o_valid |= OBD_MD_FLGID;
- }
-}
-EXPORT_SYMBOL(obdo_from_iattr);
-
-void iattr_from_obdo(struct iattr *attr, struct obdo *oa, obd_flag valid)
+static void iattr_from_obdo(struct iattr *attr, const struct obdo *oa,
+ obd_flag valid)
{
valid &= oa->o_valid;
attr->ia_valid |= ATTR_GID;
}
}
-EXPORT_SYMBOL(iattr_from_obdo);
-void md_from_obdo(struct md_op_data *op_data, struct obdo *oa, obd_flag valid)
+void md_from_obdo(struct md_op_data *op_data, const struct obdo *oa,
+ obd_flag valid)
{
iattr_from_obdo(&op_data->op_attr, oa, valid);
if (valid & OBD_MD_FLBLOCKS) {
}
}
EXPORT_SYMBOL(md_from_obdo);
-
-void obdo_from_md(struct obdo *oa, struct md_op_data *op_data,
- unsigned int valid)
-{
- obdo_from_iattr(oa, &op_data->op_attr, valid);
- if (valid & ATTR_BLOCKS) {
- oa->o_blocks = op_data->op_attr_blocks;
- oa->o_valid |= OBD_MD_FLBLOCKS;
- }
- if (valid & ATTR_ATTR_FLAG) {
- oa->o_flags =
- ((struct ll_iattr *)&op_data->op_attr)->ia_attr_flags;
- oa->o_valid |= OBD_MD_FLFLAGS;
- }
-}
-EXPORT_SYMBOL(obdo_from_md);
}
ioo.ioo_bufcnt = npages;
- oti->oti_transno = 0;
lpages = npages;
ret = obd_preprw(env, rw, exp, oa, 1, &ioo, rnb, &lpages,
spin_lock_init(&m->ofd_inconsistency_lock);
spin_lock_init(&m->ofd_batch_lock);
- rwlock_init(&obd->u.filter.fo_sptlrpc_lock);
- sptlrpc_rule_set_init(&obd->u.filter.fo_sptlrpc_rset);
init_rwsem(&m->ofd_lastid_rwsem);
obd->u.filter.fo_fl_oss_capa = 0;
LASSERT(oti != NULL);
info = ofd_info_init(env, exp);
ofd_oti2info(info, oti);
- jobid = oti->oti_jobid;
+ jobid = NULL;
} else {
info = tsi2ofd_info(tsi);
jobid = tsi->tsi_jobid;
*ea = lsm;
if (oti != NULL) {
- oti->oti_transno = lustre_msg_get_transno(req->rq_repmsg);
-
if (oa->o_valid & OBD_MD_FLCOOKIE) {
- if (!oti->oti_logcookies)
- oti_alloc_cookies(oti, 1);
+ if (oti->oti_logcookies == NULL)
+ oti->oti_logcookies = &oti->oti_onecookie;
+
*oti->oti_logcookies = oa->o_lcookie;
}
}
osd_map_remote_to_local(pos, len, &npages, lnb);
for (i = 0; i < npages; i++, lnb++) {
-
- /* We still set up for ungranted pages so that granted pages
- * can be written to disk as they were promised, and portals
- * needs to keep the pages all aligned properly. */
- lnb->dentry = (void *) obj;
-
lnb->page = osd_get_page(d, lnb->lnb_file_offset, rw);
if (lnb->page == NULL)
GOTO(cleanup, rc = -ENOMEM);
&RQF_MDS_SYNC,
&RQF_MDS_CLOSE,
&RQF_MDS_RELEASE_CLOSE,
- &RQF_MDS_PIN,
- &RQF_MDS_UNPIN,
&RQF_MDS_READPAGE,
&RQF_MDS_WRITEPAGE,
- &RQF_MDS_IS_SUBDIR,
&RQF_MDS_DONE_WRITING,
&RQF_MDS_REINT,
&RQF_MDS_REINT_CREATE,
mdt_release_close_client, mds_last_unlink_server);
EXPORT_SYMBOL(RQF_MDS_RELEASE_CLOSE);
-struct req_format RQF_MDS_PIN =
- DEFINE_REQ_FMT0("MDS_PIN",
- mdt_body_capa, mdt_body_only);
-EXPORT_SYMBOL(RQF_MDS_PIN);
-
-struct req_format RQF_MDS_UNPIN =
- DEFINE_REQ_FMT0("MDS_UNPIN", mdt_body_only, empty);
-EXPORT_SYMBOL(RQF_MDS_UNPIN);
-
struct req_format RQF_MDS_DONE_WRITING =
DEFINE_REQ_FMT0("MDS_DONE_WRITING",
mdt_close_client, mdt_body_only);
mdt_body_capa, mdt_body_only);
EXPORT_SYMBOL(RQF_MDS_WRITEPAGE);
-struct req_format RQF_MDS_IS_SUBDIR =
- DEFINE_REQ_FMT0("MDS_IS_SUBDIR",
- mdt_body_only, mdt_body_only);
-EXPORT_SYMBOL(RQF_MDS_IS_SUBDIR);
-
struct req_format RQF_LLOG_ORIGIN_HANDLE_CREATE =
DEFINE_REQ_FMT0("LLOG_ORIGIN_HANDLE_CREATE",
llog_origin_handle_create_client, llogd_body_only);