1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * This file is part of Lustre, http://www.lustre.org
7 * See also lustre_idl.h for wire formats of requests.
14 # include <linux/fs.h>
15 # include <linux/dcache.h>
16 # ifdef CONFIG_FS_POSIX_ACL
17 # include <linux/xattr_acl.h>
20 #include <lustre_handles.h>
21 #include <libcfs/kp30.h>
22 #include <lustre/lustre_idl.h>
23 #include <lustre_lib.h>
24 #include <lustre_dlm.h>
25 #include <lustre_log.h>
26 #include <lustre_export.h>
30 struct ptlrpc_request;
34 struct semaphore rpcl_sem;
35 struct lookup_intent *rpcl_it;
38 static inline void mdc_init_rpc_lock(struct mdc_rpc_lock *lck)
40 sema_init(&lck->rpcl_sem, 1);
44 static inline void mdc_get_rpc_lock(struct mdc_rpc_lock *lck,
45 struct lookup_intent *it)
48 if (!it || (it->it_op != IT_GETATTR && it->it_op != IT_LOOKUP)) {
50 LASSERT(lck->rpcl_it == NULL);
55 static inline void mdc_put_rpc_lock(struct mdc_rpc_lock *lck,
56 struct lookup_intent *it)
58 if (!it || (it->it_op != IT_GETATTR && it->it_op != IT_LOOKUP)) {
59 LASSERT(it == lck->rpcl_it);
66 struct mdc_cache_waiter {
67 struct list_head mcw_entry;
68 wait_queue_head_t mcw_waitq;
72 int it_disposition(struct lookup_intent *it, int flag);
73 void it_clear_disposition(struct lookup_intent *it, int flag);
74 void it_set_disposition(struct lookup_intent *it, int flag);
75 int it_open_error(int phase, struct lookup_intent *it);
76 #ifdef HAVE_SPLIT_SUPPORT
77 int mdc_sendpage(struct obd_export *exp, const struct lu_fid *fid,
78 const struct page *page, int offset);