staging/lustre: remove obd_ost.h
Move the structures defined in lustre/include/obd_ost.h to the one file that uses them (lustre/osc/osc_request.c). Remove the unused function osc_update_enqueue(). Remove the then empty header lustre/include/obd_ost.h. Signed-off-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>hifive-unleashed-5.1
parent
dd45f477f5
commit
f024bad46a
|
@ -45,7 +45,6 @@
|
|||
#include "linux/lustre_lite.h"
|
||||
|
||||
#include "obd_class.h"
|
||||
#include "obd_ost.h"
|
||||
#include "lustre_net.h"
|
||||
#include "lustre_mds.h"
|
||||
#include "lustre_ha.h"
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
*/
|
||||
|
||||
#include "obd_class.h"
|
||||
#include "obd_ost.h"
|
||||
#include "lustre/lustre_idl.h"
|
||||
#include "dt_object.h"
|
||||
|
||||
|
|
|
@ -1,100 +0,0 @@
|
|||
/*
|
||||
* GPL HEADER START
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 only,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License version 2 for more details (a copy is included
|
||||
* in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 along with this program; If not, see
|
||||
* http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
|
||||
*
|
||||
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*
|
||||
* GPL HEADER END
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
*
|
||||
* Copyright (c) 2012, Intel Corporation.
|
||||
*/
|
||||
/*
|
||||
* This file is part of Lustre, http://www.lustre.org/
|
||||
* Lustre is a trademark of Sun Microsystems, Inc.
|
||||
*
|
||||
* lustre/include/obd_ost.h
|
||||
*
|
||||
* Data structures for object storage targets and client: OST & OSC's
|
||||
*
|
||||
* See also lustre_idl.h for wire formats of requests.
|
||||
*/
|
||||
|
||||
#ifndef _LUSTRE_OST_H
|
||||
#define _LUSTRE_OST_H
|
||||
|
||||
#include "obd_class.h"
|
||||
|
||||
struct osc_brw_async_args {
|
||||
struct obdo *aa_oa;
|
||||
int aa_requested_nob;
|
||||
int aa_nio_count;
|
||||
u32 aa_page_count;
|
||||
int aa_resends;
|
||||
struct brw_page **aa_ppga;
|
||||
struct client_obd *aa_cli;
|
||||
struct list_head aa_oaps;
|
||||
struct list_head aa_exts;
|
||||
struct obd_capa *aa_ocapa;
|
||||
struct cl_req *aa_clerq;
|
||||
};
|
||||
|
||||
#define osc_grant_args osc_brw_async_args
|
||||
struct osc_async_args {
|
||||
struct obd_info *aa_oi;
|
||||
};
|
||||
|
||||
struct osc_setattr_args {
|
||||
struct obdo *sa_oa;
|
||||
obd_enqueue_update_f sa_upcall;
|
||||
void *sa_cookie;
|
||||
};
|
||||
|
||||
struct osc_fsync_args {
|
||||
struct obd_info *fa_oi;
|
||||
obd_enqueue_update_f fa_upcall;
|
||||
void *fa_cookie;
|
||||
};
|
||||
|
||||
struct osc_enqueue_args {
|
||||
struct obd_export *oa_exp;
|
||||
__u64 *oa_flags;
|
||||
obd_enqueue_update_f oa_upcall;
|
||||
void *oa_cookie;
|
||||
struct ost_lvb *oa_lvb;
|
||||
struct lustre_handle *oa_lockh;
|
||||
struct ldlm_enqueue_info *oa_ei;
|
||||
unsigned int oa_agl:1;
|
||||
};
|
||||
|
||||
extern void osc_update_enqueue(struct lustre_handle *lov_lockhp,
|
||||
struct lov_oinfo *loi, __u64 flags,
|
||||
struct ost_lvb *lvb, __u32 mode, int rc);
|
||||
|
||||
#if 0
|
||||
int osc_extent_blocking_cb(struct ldlm_lock *lock,
|
||||
struct ldlm_lock_desc *new, void *data,
|
||||
int flag);
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -51,7 +51,6 @@
|
|||
#include "../include/lustre_dlm.h"
|
||||
#include "../include/lustre_mds.h"
|
||||
#include "../include/obd_class.h"
|
||||
#include "../include/obd_ost.h"
|
||||
#include "../include/lprocfs_status.h"
|
||||
#include "../include/lustre_param.h"
|
||||
#include "../include/cl_object.h"
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "../../include/linux/libcfs/libcfs.h"
|
||||
|
||||
#include "../include/obd_class.h"
|
||||
#include "../include/obd_ost.h"
|
||||
#include "../include/lustre/lustre_idl.h"
|
||||
#include "lov_internal.h"
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#define DEBUG_SUBSYSTEM D_OTHER
|
||||
|
||||
|
||||
#include "../include/obd_ost.h"
|
||||
#include "../include/obd_support.h"
|
||||
#include "../include/lustre_debug.h"
|
||||
#include "../include/lustre_net.h"
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
*/
|
||||
|
||||
#define DEBUG_SUBSYSTEM S_CLASS
|
||||
#include "../include/obd_ost.h"
|
||||
#include "../include/obd_class.h"
|
||||
#include "../include/lprocfs_status.h"
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@
|
|||
|
||||
#include "../include/obd.h"
|
||||
/* osc_build_res_name() */
|
||||
#include "../include/obd_ost.h"
|
||||
#include "../include/cl_object.h"
|
||||
#include "../include/lclient.h"
|
||||
#include "osc_internal.h"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* Code originally extracted from quota directory
|
||||
*/
|
||||
|
||||
#include "../include/obd_ost.h"
|
||||
#include "../include/obd_class.h"
|
||||
#include "osc_internal.h"
|
||||
|
||||
static inline struct osc_quota_info *osc_oqi_alloc(u32 id)
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "../include/lustre_net.h"
|
||||
#include "../include/lustre/lustre_user.h"
|
||||
#include "../include/obd_cksum.h"
|
||||
#include "../include/obd_ost.h"
|
||||
|
||||
#include "../include/lustre_ha.h"
|
||||
#include "../include/lprocfs_status.h"
|
||||
|
@ -54,6 +53,47 @@
|
|||
#include "osc_internal.h"
|
||||
#include "osc_cl_internal.h"
|
||||
|
||||
struct osc_brw_async_args {
|
||||
struct obdo *aa_oa;
|
||||
int aa_requested_nob;
|
||||
int aa_nio_count;
|
||||
u32 aa_page_count;
|
||||
int aa_resends;
|
||||
struct brw_page **aa_ppga;
|
||||
struct client_obd *aa_cli;
|
||||
struct list_head aa_oaps;
|
||||
struct list_head aa_exts;
|
||||
struct obd_capa *aa_ocapa;
|
||||
struct cl_req *aa_clerq;
|
||||
};
|
||||
|
||||
struct osc_async_args {
|
||||
struct obd_info *aa_oi;
|
||||
};
|
||||
|
||||
struct osc_setattr_args {
|
||||
struct obdo *sa_oa;
|
||||
obd_enqueue_update_f sa_upcall;
|
||||
void *sa_cookie;
|
||||
};
|
||||
|
||||
struct osc_fsync_args {
|
||||
struct obd_info *fa_oi;
|
||||
obd_enqueue_update_f fa_upcall;
|
||||
void *fa_cookie;
|
||||
};
|
||||
|
||||
struct osc_enqueue_args {
|
||||
struct obd_export *oa_exp;
|
||||
__u64 *oa_flags;
|
||||
obd_enqueue_update_f oa_upcall;
|
||||
void *oa_cookie;
|
||||
struct ost_lvb *oa_lvb;
|
||||
struct lustre_handle *oa_lockh;
|
||||
struct ldlm_enqueue_info *oa_ei;
|
||||
unsigned int oa_agl:1;
|
||||
};
|
||||
|
||||
static void osc_release_ppga(struct brw_page **ppga, u32 count);
|
||||
static int brw_interpret(const struct lu_env *env,
|
||||
struct ptlrpc_request *req, void *data, int rc);
|
||||
|
@ -846,7 +886,7 @@ static int osc_shrink_grant_interpret(const struct lu_env *env,
|
|||
void *aa, int rc)
|
||||
{
|
||||
struct client_obd *cli = &req->rq_import->imp_obd->u.cli;
|
||||
struct obdo *oa = ((struct osc_grant_args *)aa)->aa_oa;
|
||||
struct obdo *oa = ((struct osc_brw_async_args *)aa)->aa_oa;
|
||||
struct ost_body *body;
|
||||
|
||||
if (rc != 0) {
|
||||
|
@ -2174,50 +2214,6 @@ static int osc_enqueue_interpret(const struct lu_env *env,
|
|||
return rc;
|
||||
}
|
||||
|
||||
void osc_update_enqueue(struct lustre_handle *lov_lockhp,
|
||||
struct lov_oinfo *loi, __u64 flags,
|
||||
struct ost_lvb *lvb, __u32 mode, int rc)
|
||||
{
|
||||
struct ldlm_lock *lock = ldlm_handle2lock(lov_lockhp);
|
||||
|
||||
if (rc == ELDLM_OK) {
|
||||
__u64 tmp;
|
||||
|
||||
LASSERT(lock != NULL);
|
||||
loi->loi_lvb = *lvb;
|
||||
tmp = loi->loi_lvb.lvb_size;
|
||||
/* Extend KMS up to the end of this lock and no further
|
||||
* A lock on [x,y] means a KMS of up to y + 1 bytes! */
|
||||
if (tmp > lock->l_policy_data.l_extent.end)
|
||||
tmp = lock->l_policy_data.l_extent.end + 1;
|
||||
if (tmp >= loi->loi_kms) {
|
||||
LDLM_DEBUG(lock, "lock acquired, setting rss=%llu, kms=%llu",
|
||||
loi->loi_lvb.lvb_size, tmp);
|
||||
loi_kms_set(loi, tmp);
|
||||
} else {
|
||||
LDLM_DEBUG(lock, "lock acquired, setting rss=%llu; leaving kms=%llu, end=%llu",
|
||||
loi->loi_lvb.lvb_size, loi->loi_kms,
|
||||
lock->l_policy_data.l_extent.end);
|
||||
}
|
||||
ldlm_lock_allow_match(lock);
|
||||
} else if (rc == ELDLM_LOCK_ABORTED && (flags & LDLM_FL_HAS_INTENT)) {
|
||||
LASSERT(lock != NULL);
|
||||
loi->loi_lvb = *lvb;
|
||||
ldlm_lock_allow_match(lock);
|
||||
CDEBUG(D_INODE, "glimpsed, setting rss=%llu; leaving kms=%llu\n",
|
||||
loi->loi_lvb.lvb_size, loi->loi_kms);
|
||||
rc = ELDLM_OK;
|
||||
}
|
||||
|
||||
if (lock != NULL) {
|
||||
if (rc != ELDLM_OK)
|
||||
ldlm_lock_fail_match(lock);
|
||||
|
||||
LDLM_LOCK_PUT(lock);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(osc_update_enqueue);
|
||||
|
||||
struct ptlrpc_request_set *PTLRPCD_SET = (void *)1;
|
||||
|
||||
/* When enqueuing asynchronously, locks are not ordered, we can obtain a lock
|
||||
|
@ -2935,7 +2931,7 @@ static int osc_set_info_async(const struct lu_env *env, struct obd_export *exp,
|
|||
memcpy(tmp, val, vallen);
|
||||
|
||||
if (KEY_IS(KEY_GRANT_SHRINK)) {
|
||||
struct osc_grant_args *aa;
|
||||
struct osc_brw_async_args *aa;
|
||||
struct obdo *oa;
|
||||
|
||||
CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#include "../include/lustre_import.h"
|
||||
#include "../include/lustre_export.h"
|
||||
#include "../include/obd.h"
|
||||
#include "../include/obd_ost.h"
|
||||
#include "../include/obd_class.h"
|
||||
#include <linux/list.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue