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 # ifdef HAVE_XATTR_ACL
18 # include <linux/xattr_acl.h>
20 # ifdef HAVE_LINUX_POSIX_ACL_XATTR_H
21 # include <linux/posix_acl_xattr.h>
25 #include <lustre_handles.h>
26 #include <libcfs/kp30.h>
27 #include <lustre/lustre_idl.h>
28 #include <lustre_lib.h>
29 #include <lustre_dlm.h>
30 #include <lustre_log.h>
31 #include <lustre_export.h>
35 struct ptlrpc_request;
39 struct semaphore rpcl_sem;
40 struct lookup_intent *rpcl_it;
43 static inline void mdc_init_rpc_lock(struct mdc_rpc_lock *lck)
45 sema_init(&lck->rpcl_sem, 1);
49 static inline void mdc_get_rpc_lock(struct mdc_rpc_lock *lck,
50 struct lookup_intent *it)
53 if (!it || (it->it_op != IT_GETATTR && it->it_op != IT_LOOKUP)) {
55 LASSERT(lck->rpcl_it == NULL);
60 static inline void mdc_put_rpc_lock(struct mdc_rpc_lock *lck,
61 struct lookup_intent *it)
63 if (!it || (it->it_op != IT_GETATTR && it->it_op != IT_LOOKUP)) {
64 LASSERT(it == lck->rpcl_it);
71 struct mdc_cache_waiter {
72 struct list_head mcw_entry;
73 wait_queue_head_t mcw_waitq;
77 int it_disposition(struct lookup_intent *it, int flag);
78 void it_clear_disposition(struct lookup_intent *it, int flag);
79 void it_set_disposition(struct lookup_intent *it, int flag);
80 int it_open_error(int phase, struct lookup_intent *it);
81 #ifdef HAVE_SPLIT_SUPPORT
82 int mdc_sendpage(struct obd_export *exp, const struct lu_fid *fid,
83 const struct page *page, int offset);