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 struct obd_sync_io_container *oap_osic;
38 struct obd_async_page_ops *oap_caller_ops;
39 void *oap_caller_data;
42 #define OSCC_FLAG_RECOVERING 1
43 #define OSCC_FLAG_CREATING 2
44 #define OSCC_FLAG_NOSPC 4 /* can't create more objects on this OST */
46 int osc_create(struct obd_export *exp, struct obdo *oa,
47 struct lov_stripe_md **ea, struct obd_trans_info *oti);
48 int osc_real_create(struct obd_export *exp, struct obdo *oa,
49 struct lov_stripe_md **ea, struct obd_trans_info *oti);
50 void oscc_init(struct obd_export *exp);
53 int lproc_osc_attach_seqstat(struct obd_device *dev);
55 static inline int lproc_osc_attach_seqstat(struct obd_device *dev) {}
58 #endif /* OSC_INTERNAL_H */