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>
17 #include <linux/lustre_handles.h>
18 #include <libcfs/kp30.h>
19 #include <linux/lustre_idl.h>
20 #include <linux/lustre_lib.h>
21 #include <linux/lustre_dlm.h>
22 #include <linux/lustre_log.h>
23 #include <linux/lustre_export.h>
26 struct ptlrpc_request;
29 struct mds_update_record {
31 struct ll_fid *ur_fid1;
32 struct ll_fid *ur_fid2;
40 struct llog_cookie *ur_logcookies;
41 struct iattr ur_iattr;
42 struct lvfs_ucred ur_uc;
47 struct lvfs_grp_hash_entry *ur_grp_entry;
50 /* file data for open files on MDS */
51 struct mds_file_data {
52 struct portals_handle mfd_handle; /* must be first */
53 atomic_t mfd_refcount;
54 struct list_head mfd_list; /* protected by med_open_lock */
57 struct dentry *mfd_dentry;
61 int mds_reint_rec(struct mds_update_record *r, int offset,
62 struct ptlrpc_request *req, struct lustre_handle *);
66 struct dentry *mds_fid2locked_dentry(struct obd_device *obd, struct ll_fid *fid,
67 struct vfsmount **mnt, int lock_mode,
68 struct lustre_handle *lockh,
70 struct dentry *mds_fid2dentry(struct mds_obd *mds, struct ll_fid *fid,
71 struct vfsmount **mnt);
72 int mds_update_server_data(struct obd_device *, int force_sync);
75 int mds_fs_setup(struct obd_device *obddev, struct vfsmount *mnt);
76 int mds_fs_cleanup(struct obd_device *obddev);
79 /* ioctls for trying requests */
80 #define IOC_REQUEST_TYPE 'f'
81 #define IOC_REQUEST_MIN_NR 30
83 #define IOC_REQUEST_GETATTR _IOWR('f', 30, long)
84 #define IOC_REQUEST_READPAGE _IOWR('f', 31, long)
85 #define IOC_REQUEST_SETATTR _IOWR('f', 32, long)
86 #define IOC_REQUEST_CREATE _IOWR('f', 33, long)
87 #define IOC_REQUEST_OPEN _IOWR('f', 34, long)
88 #define IOC_REQUEST_CLOSE _IOWR('f', 35, long)
89 #define IOC_REQUEST_MAX_NR 35