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_sync_io_container *oap_osic;
38 struct osic_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 #define OSCC_FLAG_RECOVERING 1
48 #define OSCC_FLAG_CREATING 2
49 #define OSCC_FLAG_NOSPC 4 /* can't create more objects on this OST */
51 int osc_create(struct obd_export *exp, struct obdo *oa,
52 struct lov_stripe_md **ea, struct obd_trans_info *oti);
53 int osc_real_create(struct obd_export *exp, struct obdo *oa,
54 struct lov_stripe_md **ea, struct obd_trans_info *oti);
55 void oscc_init(struct obd_export *exp);
58 int lproc_osc_attach_seqstat(struct obd_device *dev);
60 static inline int lproc_osc_attach_seqstat(struct obd_device *dev) {}
63 #endif /* OSC_INTERNAL_H */