]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging/lustre: remove obd_ost.h
authorJohn L. Hammond <john.hammond@intel.com>
Fri, 5 Sep 2014 20:08:10 +0000 (15:08 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Sep 2014 19:37:04 +0000 (12:37 -0700)
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>
drivers/staging/lustre/lustre/include/lustre_lite.h
drivers/staging/lustre/lustre/include/lustre_log.h
drivers/staging/lustre/lustre/include/obd_ost.h [deleted file]
drivers/staging/lustre/lustre/lov/lov_obd.c
drivers/staging/lustre/lustre/lov/lov_request.c
drivers/staging/lustre/lustre/obdclass/debug.c
drivers/staging/lustre/lustre/obdclass/genops.c
drivers/staging/lustre/lustre/osc/osc_cl_internal.h
drivers/staging/lustre/lustre/osc/osc_quota.c
drivers/staging/lustre/lustre/osc/osc_request.c
drivers/staging/lustre/lustre/ptlrpc/recover.c

index c10c0d388b66fd5d1273637c3b760ba3ed729d1d..df557c22abbed38c9287d09b243924adba9a6069 100644 (file)
@@ -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"
index 2f50b81e326fcd1d68f4e563ab2178e9a608e12c..36a2ffb29d58c5996fde97ef27191e534f54b709 100644 (file)
@@ -57,7 +57,6 @@
  */
 
 #include "obd_class.h"
-#include "obd_ost.h"
 #include "lustre/lustre_idl.h"
 #include "dt_object.h"
 
diff --git a/drivers/staging/lustre/lustre/include/obd_ost.h b/drivers/staging/lustre/lustre/include/obd_ost.h
deleted file mode 100644 (file)
index a679bb1..0000000
+++ /dev/null
@@ -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
index a1f8c7e7f5cd4e8c72b38ae8449c3fbb3ed1daee..d1eb6dfa4fbcb7cee79d88f44030177380bda4f7 100644 (file)
@@ -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"
index 19d4d70f53d759bc7114c936ba0a3c89927dafee..f57675034b514a3bd24a340097e1f5d13847f3c8 100644 (file)
@@ -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"
 
index e8aa42beb3c7ac38b3e2d3fdc3e27945c740bde7..d0f8f875ddd64537f6d4882664ed0d0ae0eeffc9 100644 (file)
@@ -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"
index c2e561dec89f110709e99ebea40f9563410bd544..d5bfbb8ac8949d0730be4c4aa58a0a58f3fd06e4 100644 (file)
@@ -40,7 +40,6 @@
  */
 
 #define DEBUG_SUBSYSTEM S_CLASS
-#include "../include/obd_ost.h"
 #include "../include/obd_class.h"
 #include "../include/lprocfs_status.h"
 
index 3aa80d949b2738e782fa3034ca1ef48c662e3b21..ebbd95c0cea822972f9bdf8ec71c4fd553f31f64 100644 (file)
@@ -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"
index 69872615823e1a63f4beb105f69f8b4dac62e773..6690f149a04c53a012d221108de3b32262587064 100644 (file)
@@ -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)
index ecca3eb75ecd35a56e722d1b19d48e4d2a942b64..e10bacb20384fab216edeb26b87befbe10c68b8b 100644 (file)
@@ -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"
 #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));
index 5e4a1a52e0dad7e36a7613e2535d56e39bff44ea..e26e5b80019e9929c0c7c916d07d07fb18052766 100644 (file)
@@ -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>