1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
6 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 only,
10 * as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License version 2 for more details (a copy is included
16 * in the LICENSE file that accompanied this code).
18 * You should have received a copy of the GNU General Public License
19 * version 2 along with this program; If not, see
20 * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
22 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
23 * CA 95054 USA or visit www.sun.com if you need additional information or
29 * Copyright 2008 Sun Microsystems, Inc. All rights reserved
30 * Use is subject to license terms.
33 * This file is part of Lustre, http://www.lustre.org/
34 * Lustre is a trademark of Sun Microsystems, Inc.
36 * lustre/include/obd_ost.h
38 * Data structures for object storage targets and client: OST & OSC's
40 * See also lustre_idl.h for wire formats of requests.
46 #include <obd_class.h>
48 struct osc_brw_async_args {
52 obd_count aa_page_count;
54 struct brw_page **aa_ppga;
55 struct client_obd *aa_cli;
56 struct list_head aa_oaps;
57 struct obd_capa *aa_ocapa;
58 struct cl_req *aa_clerq;
61 #define osc_grant_args osc_brw_async_args
62 struct osc_async_args {
63 struct obd_info *aa_oi;
66 struct osc_punch_args {
68 obd_enqueue_update_f pa_upcall;
72 struct osc_enqueue_args {
73 struct obd_export *oa_exp;
75 obd_enqueue_update_f oa_upcall;
77 struct ost_lvb *oa_lvb;
78 struct lustre_handle *oa_lockh;
79 struct ldlm_enqueue_info *oa_ei;
83 int osc_extent_blocking_cb(struct ldlm_lock *lock,
84 struct ldlm_lock_desc *new, void *data,
89 * Build DLM resource name from object id & group for osc-ost extent lock.
91 static inline struct ldlm_res_id *osc_build_res_name(__u64 id, __u64 gr,
92 struct ldlm_res_id *name)
94 memset(name, 0, sizeof *name);
101 * Return true if the resource is for the object identified by this id & group.
103 static inline int osc_res_name_eq(__u64 id, __u64 gr, struct ldlm_res_id *name)
105 return name->name[0] == id && name->name[1] == gr;