1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2003 Cluster File Systems, Inc.
6 * This code is issued under the GNU General Public License.
7 * See the file COPYING in this distribution
10 #ifndef OSC_INTERNAL_H
11 #define OSC_INTERNAL_H
13 #include <portals/lib-types.h> /* for PTL_MTU and PTL_MD_MAX_PAGES */
16 /* bug 1578: negotiate BRW_MAX_SIZE with the OST, instead of hard-coding it */
17 #define OSC_BRW_MAX_SIZE PTL_MTU
18 #define OSC_BRW_MAX_IOV PTL_MD_MAX_PAGES
20 #define OAP_MAGIC 8675309
22 struct osc_async_page {
24 struct list_head oap_pending_item;
25 struct list_head oap_urgent_item;
26 struct list_head oap_rpc_item;
27 struct page *oap_page;
33 obd_flag oap_brw_flags;
34 enum async_flags oap_async_flags;
36 unsigned long oap_interrupted:1;
37 struct obd_io_group *oap_oig;
38 struct oig_callback_context oap_occ;
39 struct ptlrpc_request *oap_request;
40 struct client_obd *oap_cli;
41 struct lov_oinfo *oap_loi;
43 struct obd_async_page_ops *oap_caller_ops;
44 void *oap_caller_data;
47 struct osc_cache_waiter {
48 struct list_head ocw_entry;
49 wait_queue_head_t ocw_waitq;
50 struct osc_async_page *ocw_oap;
54 #define OSCC_FLAG_RECOVERING 1
55 #define OSCC_FLAG_CREATING 2
56 #define OSCC_FLAG_NOSPC 4 /* can't create more objects on this OST */
58 int osc_create(struct obd_export *exp, struct obdo *oa,
59 struct lov_stripe_md **ea, struct obd_trans_info *oti);
60 int osc_real_create(struct obd_export *exp, struct obdo *oa,
61 struct lov_stripe_md **ea, struct obd_trans_info *oti);
62 void oscc_init(struct obd_device *obd);
63 void osc_wake_cache_waiters(struct client_obd *cli);
66 int lproc_osc_attach_seqstat(struct obd_device *dev);
68 static inline int lproc_osc_attach_seqstat(struct obd_device *dev) {return 0;}
71 #endif /* OSC_INTERNAL_H */