Whamcloud - gitweb
LU-2675 obdclass: remove uses of lov_stripe_md 45/8545/5
authorJohn L. Hammond <john.hammond@intel.com>
Wed, 11 Dec 2013 18:08:17 +0000 (12:08 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 1 Mar 2014 02:38:39 +0000 (02:38 +0000)
Remove the unused function llog_obd_add(). Remove the unused count and
lsm parameters from llog_cancel(). Move dump_lsm() from obdclass to
the only module that uses it (lov). Remove obd_lov.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I38a5fdae210b6317a07d1601c1c93ae8071631ae
Reviewed-on: http://review.whamcloud.com/8545
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
34 files changed:
lustre/include/Makefile.am
lustre/include/lustre/lustre_idl.h
lustre/include/lustre_debug.h
lustre/include/lustre_log.h
lustre/include/obd.h
lustre/include/obd_class.h
lustre/include/obd_lov.h [deleted file]
lustre/lod/lod_lov.c
lustre/lod/lod_object.c
lustre/lod/lod_qos.c
lustre/lov/lov_ea.c
lustre/lov/lov_internal.h
lustre/lov/lov_merge.c
lustre/lov/lov_obd.c
lustre/lov/lov_object.c
lustre/lov/lov_offset.c
lustre/lov/lov_pack.c
lustre/lov/lov_request.c
lustre/mdd/mdd_device.c
lustre/mdd/mdd_lov.c
lustre/mdd/mdd_object.c
lustre/mdt/mdt_coordinator.c
lustre/mdt/mdt_hsm_cdt_client.c
lustre/mgs/mgs_llog.c
lustre/obdclass/debug.c
lustre/obdclass/llog_obd.c
lustre/obdecho/echo_client.c
lustre/osc/osc_request.c
lustre/ptlrpc/recover.c
lustre/tests/ll_dirstripe_verify.c
lustre/utils/lfs.c
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi_hsm.c
lustre/utils/lustre_cfg.c

index 831a63d..8544c61 100644 (file)
@@ -89,7 +89,6 @@ EXTRA_DIST = \
        obd_cksum.h \
        obd_class.h \
        obd.h \
-       obd_lov.h \
        obd_ost.h \
        obd_support.h \
        obd_target.h
index 869e682..3620fa6 100644 (file)
@@ -1741,6 +1741,30 @@ static inline __u32 lov_mds_md_size(__u16 stripes, __u32 lmm_magic)
                                stripes * sizeof(struct lov_ost_data_v1);
 }
 
+static inline __u32
+lov_mds_md_max_stripe_count(size_t buf_size, __u32 lmm_magic)
+{
+       switch (lmm_magic) {
+       case LOV_MAGIC_V1: {
+               struct lov_mds_md_v1 lmm;
+
+               if (buf_size < sizeof(lmm))
+                       return 0;
+
+               return (buf_size - sizeof(lmm)) / sizeof(lmm.lmm_objects[0]);
+       }
+       case LOV_MAGIC_V3: {
+               struct lov_mds_md_v3 lmm;
+
+               if (buf_size < sizeof(lmm))
+                       return 0;
+
+               return (buf_size - sizeof(lmm)) / sizeof(lmm.lmm_objects[0]);
+       }
+       default:
+               return 0;
+       }
+}
 
 #define OBD_MD_FLID        (0x00000001ULL) /* object ID */
 #define OBD_MD_FLATIME     (0x00000002ULL) /* access time */
@@ -2852,6 +2876,8 @@ typedef enum {
  * protocol, this will limit the max number of OSTs per LOV */
 
 #define LOV_DESC_MAGIC 0xB0CCDE5C
+#define LOV_DESC_QOS_MAXAGE_DEFAULT 5  /* Seconds */
+#define LOV_DESC_STRIPE_SIZE_DEFAULT (1 << LNET_MTU_BITS)
 
 /* LOV settings descriptor (should only contain static info) */
 struct lov_desc {
index cdb2f9d..f7e5173 100644 (file)
@@ -75,7 +75,6 @@ do { if (offset > ASSERT_MAX_SIZE_MB << 20) {                           \
 /* lib/debug.c */
 void dump_lniobuf(struct niobuf_local *lnb);
 int dump_req(struct ptlrpc_request *req);
-void dump_lsm(int level, struct lov_stripe_md *lsm);
 int block_debug_setup(void *addr, int len, __u64 off, __u64 id);
 int block_debug_check(char *who, void *addr, int len, __u64 off, __u64 id);
 
index 061c100..1ccb8d4 100644 (file)
@@ -214,11 +214,7 @@ int llog_setup(const struct lu_env *env, struct obd_device *obd,
 int __llog_ctxt_put(const struct lu_env *env, struct llog_ctxt *ctxt);
 int llog_cleanup(const struct lu_env *env, struct llog_ctxt *);
 int llog_sync(struct llog_ctxt *ctxt, struct obd_export *exp, int flags);
-int llog_obd_add(const struct lu_env *env, struct llog_ctxt *ctxt,
-                struct llog_rec_hdr *rec, struct lov_stripe_md *lsm,
-                struct llog_cookie *logcookies, int numcookies);
 int llog_cancel(const struct lu_env *env, struct llog_ctxt *ctxt,
-               struct lov_stripe_md *lsm, int count,
                struct llog_cookie *cookies, int flags);
 
 int obd_llog_init(struct obd_device *obd, struct obd_llog_group *olg,
@@ -253,7 +249,6 @@ struct llog_operations {
                        int flags);
        int (*lop_cleanup)(const struct lu_env *env, struct llog_ctxt *ctxt);
        int (*lop_cancel)(const struct lu_env *env, struct llog_ctxt *ctxt,
-                         struct lov_stripe_md *lsm, int count,
                          struct llog_cookie *cookies, int flags);
        int (*lop_connect)(struct llog_ctxt *ctxt, struct llog_logid *logid,
                           struct llog_gen *gen, struct obd_uuid *uuid);
@@ -307,11 +302,6 @@ struct llog_operations {
        int (*lop_add)(const struct lu_env *env, struct llog_handle *lgh,
                       struct llog_rec_hdr *rec, struct llog_cookie *cookie,
                       void *buf, struct thandle *th);
-       /* Old llog_add version, used in MDS-LOV-OSC now and will gone with
-        * LOD/OSP replacement */
-       int (*lop_obd_add)(const struct lu_env *env, struct llog_ctxt *ctxt,
-                          struct llog_rec_hdr *rec, struct lov_stripe_md *lsm,
-                          struct llog_cookie *logcookies, int numcookies);
 };
 
 /* In-memory descriptor for a log object or log catalog */
index 3be4697..b9c2433 100644 (file)
@@ -145,6 +145,13 @@ static inline bool lsm_has_objects(struct lov_stripe_md *lsm)
        return true;
 }
 
+static inline int lov_stripe_md_size(unsigned int stripe_count)
+{
+       struct lov_stripe_md lsm;
+
+       return sizeof(lsm) + stripe_count * sizeof(lsm.lsm_oinfo[0]);
+}
+
 struct obd_info;
 
 typedef int (*obd_enqueue_update_f)(void *cookie, int rc);
index 5e5a4cd..536e40b 100644 (file)
@@ -728,15 +728,6 @@ static inline int obd_size_diskmd(struct obd_export *exp,
         return obd_packmd(exp, NULL, mem_src);
 }
 
-/* helper functions */
-static inline int obd_alloc_diskmd(struct obd_export *exp,
-                                   struct lov_mds_md **disk_tgt)
-{
-        LASSERT(disk_tgt);
-        LASSERT(*disk_tgt == NULL);
-        return obd_packmd(exp, disk_tgt, NULL);
-}
-
 static inline int obd_free_diskmd(struct obd_export *exp,
                                  struct lov_mds_md **disk_tgt)
 {
diff --git a/lustre/include/obd_lov.h b/lustre/include/obd_lov.h
deleted file mode 100644 (file)
index dfb2631..0000000
+++ /dev/null
@@ -1,116 +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) 2002, 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.
- */
-
-#ifndef _OBD_LOV_H__
-#define _OBD_LOV_H__
-
-#define LOV_DEFAULT_STRIPE_SIZE (1 << LNET_MTU_BITS)
-
-static inline int lov_stripe_md_size(__u16 stripes)
-{
-        return sizeof(struct lov_stripe_md) + stripes*sizeof(struct lov_oinfo*);
-}
-
-struct lov_version_size {
-        __u32   lvs_magic;
-        size_t  lvs_lmm_size;
-        size_t  lvs_lod_size;
-};
-
-static inline __u32 lov_mds_md_stripecnt(int ea_size, __u32 lmm_magic)
-{
-        static const struct lov_version_size lmm_ver_size[] = {
-                        { .lvs_magic = LOV_MAGIC_V3,
-                          .lvs_lmm_size = sizeof(struct lov_mds_md_v3),
-                          .lvs_lod_size = sizeof(struct lov_ost_data_v1) },
-                        { .lvs_magic = LOV_MAGIC_V1,
-                          .lvs_lmm_size = sizeof(struct lov_mds_md_v1),
-                          .lvs_lod_size = sizeof(struct lov_ost_data_v1)} };
-        int i;
-
-        for (i = 0; i < ARRAY_SIZE(lmm_ver_size); i++) {
-                if (lmm_magic == lmm_ver_size[i].lvs_magic) {
-                        if (ea_size <= lmm_ver_size[i].lvs_lmm_size)
-                                return 0;
-                        return (ea_size - lmm_ver_size[i].lvs_lmm_size) /
-                                lmm_ver_size[i].lvs_lod_size;
-                }
-        }
-
-        /* Invalid LOV magic, so no stripes could fit */
-        return 0;
-}
-
-/* lov_do_div64(a, b) returns a % b, and a = a / b.
- * The 32-bit code is LOV-specific due to knowing about stripe limits in
- * order to reduce the divisor to a 32-bit number.  If the divisor is
- * already a 32-bit value the compiler handles this directly. */
-#if BITS_PER_LONG > 32
-# define lov_do_div64(n,base) ({                                       \
-       uint64_t __base = (base);                                       \
-       uint64_t __rem;                                                 \
-       __rem = ((uint64_t)(n)) % __base;                               \
-       (n) = ((uint64_t)(n)) / __base;                                 \
-       __rem;                                                          \
-  })
-#else
-# define lov_do_div64(n,base) ({                                       \
-       uint64_t __rem;                                                 \
-       if ((sizeof(base) > 4) && (((base) & 0xffffffff00000000ULL) != 0)) {  \
-               int __remainder;                                              \
-               LASSERTF(!((base) & (LOV_MIN_STRIPE_SIZE - 1)), "64 bit lov " \
-                        "division %llu / %llu\n", (n), (uint64_t)(base));    \
-               __remainder = (n) & (LOV_MIN_STRIPE_SIZE - 1);          \
-               (n) >>= LOV_MIN_STRIPE_BITS;                            \
-               __rem = do_div(n, (base) >> LOV_MIN_STRIPE_BITS);       \
-               __rem <<= LOV_MIN_STRIPE_BITS;                          \
-               __rem += __remainder;                                   \
-       } else {                                                        \
-               __rem = do_div(n, base);                                \
-       }                                                               \
-       __rem;                                                          \
-  })
-#endif
-
-#define IOC_LOV_TYPE                   'g'
-#define IOC_LOV_MIN_NR                 50
-#define IOC_LOV_SET_OSC_ACTIVE         _IOWR('g', 50, long)
-#define IOC_LOV_MAX_NR                 50
-
-#define QOS_DEFAULT_THRESHOLD           10 /* MB */
-#define QOS_DEFAULT_MAXAGE              5  /* Seconds */
-
-#endif
index dc5201e..5bd344c 100644 (file)
@@ -34,7 +34,6 @@
 #define DEBUG_SUBSYSTEM S_MDS
 
 #include <obd_class.h>
-#include <obd_lov.h>
 #include <lustre_lfsck.h>
 
 #include "lod_internal.h"
@@ -1015,8 +1014,8 @@ void lod_fix_desc_stripe_size(__u64 *val)
                if (*val != 0)
                        LCONSOLE_INFO("Increasing default stripe size to "
                                      "minimum value %u\n",
-                                     LOV_DEFAULT_STRIPE_SIZE);
-               *val = LOV_DEFAULT_STRIPE_SIZE;
+                                     LOV_DESC_STRIPE_SIZE_DEFAULT);
+               *val = LOV_DESC_STRIPE_SIZE_DEFAULT;
        } else if (*val & (LOV_MIN_STRIPE_SIZE - 1)) {
                *val &= ~(LOV_MIN_STRIPE_SIZE - 1);
                LCONSOLE_WARN("Changing default stripe size to "LPU64" (a "
@@ -1044,7 +1043,7 @@ void lod_fix_desc_qos_maxage(__u32 *val)
 {
        /* fix qos_maxage */
        if (*val == 0)
-               *val = QOS_DEFAULT_MAXAGE;
+               *val = LOV_DESC_QOS_MAXAGE_DEFAULT;
 }
 
 void lod_fix_desc(struct lov_desc *desc)
index 02c14c2..b7e97ad 100644 (file)
@@ -43,7 +43,6 @@
 #include <lustre_param.h>
 #include <lustre_fid.h>
 #include <lustre_lmv.h>
-#include <obd_lov.h>
 #include <md_object.h>
 
 #include "lod_internal.h"
index b4b8d93..2b8f1d1 100644 (file)
@@ -35,9 +35,9 @@
 
 #define DEBUG_SUBSYSTEM S_LOV
 
+#include <asm/div64.h>
 #include <libcfs/libcfs.h>
 #include <obd_class.h>
-#include <obd_lov.h>
 #include <lustre/lustre_idl.h>
 #include "lod_internal.h"
 
@@ -284,7 +284,7 @@ static int lod_qos_calc_ppo(struct lod_device *lod)
 
                /* per-OST penalty is prio * TGT_bavail / (num_ost - 1) / 2 */
                temp >>= 1;
-               lov_do_div64(temp, num_active);
+               do_div(temp, num_active);
                OST_TGT(lod,i)->ltd_qos.ltq_penalty_per_obj =
                        (temp * prio_wide) >> 8;
 
@@ -314,7 +314,7 @@ static int lod_qos_calc_ppo(struct lod_device *lod)
        /* Per-OSS penalty is prio * oss_avail / oss_osts / (num_oss - 1) / 2 */
        cfs_list_for_each_entry(oss, &lod->lod_qos.lq_oss_list, lqo_oss_list) {
                temp = oss->lqo_bavail >> 1;
-               lov_do_div64(temp, oss->lqo_ost_count * num_active);
+               do_div(temp, oss->lqo_ost_count * num_active);
                oss->lqo_penalty_per_obj = (temp * prio_wide) >> 8;
 
                age = (now - oss->lqo_used) >> 3;
@@ -1203,8 +1203,8 @@ static __u16 lod_get_stripecnt(struct lod_device *lod, __u32 magic,
 
        /* stripe count is based on whether OSD can handle larger EA sizes */
        if (lod->lod_osd_max_easize > 0)
-               max_stripes = lov_mds_md_stripecnt(lod->lod_osd_max_easize,
-                                                  magic);
+               max_stripes = lov_mds_md_max_stripe_count(
+                       lod->lod_osd_max_easize, magic);
 
        return (stripe_count < max_stripes) ? stripe_count : max_stripes;
 }
index d4ae4b2..dc06237 100644 (file)
@@ -48,7 +48,6 @@
 #endif
 
 #include <obd_class.h>
-#include <obd_lov.h>
 #include <lustre/lustre_idl.h>
 
 #include "lov_internal.h"
@@ -346,3 +345,13 @@ const struct lsm_operations lsm_v3_ops = {
         .lsm_unpackmd           = lsm_unpackmd_v3,
 };
 
+void dump_lsm(unsigned int level, const struct lov_stripe_md *lsm)
+{
+       CDEBUG(level, "lsm %p, objid "DOSTID", maxbytes "LPX64", magic 0x%08X,"
+              " stripe_size %u, stripe_count %u, refc: %d,"
+              " layout_gen %u, pool ["LOV_POOLNAMEF"]\n", lsm,
+              POSTID(&lsm->lsm_oi), lsm->lsm_maxbytes, lsm->lsm_magic,
+              lsm->lsm_stripe_size, lsm->lsm_stripe_count,
+              atomic_read(&lsm->lsm_refc), lsm->lsm_layout_gen,
+              lsm->lsm_pool_name);
+}
index 3b0acf3..6a01148 100644 (file)
 #define LOV_INTERNAL_H
 
 #include <obd_class.h>
-#include <obd_lov.h>
 #include <lustre/lustre_user.h>
 
+/* lov_do_div64(a, b) returns a % b, and a = a / b.
+ * The 32-bit code is LOV-specific due to knowing about stripe limits in
+ * order to reduce the divisor to a 32-bit number.  If the divisor is
+ * already a 32-bit value the compiler handles this directly. */
+#if BITS_PER_LONG == 64
+# define lov_do_div64(n, base) ({                                      \
+       uint64_t __base = (base);                                       \
+       uint64_t __rem;                                                 \
+       __rem = ((uint64_t)(n)) % __base;                               \
+       (n) = ((uint64_t)(n)) / __base;                                 \
+       __rem;                                                          \
+})
+#elif BITS_PER_LONG == 32
+# define lov_do_div64(n, base) ({                                      \
+       uint64_t __rem;                                                 \
+       if ((sizeof(base) > 4) && (((base) & 0xffffffff00000000ULL) != 0)) {  \
+               int __remainder;                                              \
+               LASSERTF(!((base) & (LOV_MIN_STRIPE_SIZE - 1)), "64 bit lov " \
+                        "division %llu / %llu\n", (n), (uint64_t)(base));    \
+               __remainder = (n) & (LOV_MIN_STRIPE_SIZE - 1);          \
+               (n) >>= LOV_MIN_STRIPE_BITS;                            \
+               __rem = do_div(n, (base) >> LOV_MIN_STRIPE_BITS);       \
+               __rem <<= LOV_MIN_STRIPE_BITS;                          \
+               __rem += __remainder;                                   \
+       } else {                                                        \
+               __rem = do_div(n, base);                                \
+       }                                                               \
+       __rem;                                                          \
+})
+#endif
+
 #define pool_tgt_size(p) ((p)->pool_obds.op_size)
 #define pool_tgt_count(p) ((p)->pool_obds.op_count)
 #define pool_tgt_array(p) ((p)->pool_obds.op_array)
@@ -184,6 +214,7 @@ void lov_dump_lmm(int level, void *lmm);
 /* lov_ea.c */
 struct lov_stripe_md *lsm_alloc_plain(__u16 stripe_count, int *size);
 void lsm_free_plain(struct lov_stripe_md *lsm);
+void dump_lsm(unsigned int level, const struct lov_stripe_md *lsm);
 
 /* lproc_lov.c */
 extern struct file_operations lov_proc_target_fops;
index 5407c11..b7911c9 100644 (file)
@@ -43,8 +43,6 @@
 #endif
 
 #include <obd_class.h>
-#include <obd_lov.h>
-
 #include "lov_internal.h"
 
 /** Merge the lock value block(&lvb) attributes and KMS from each of the
index 286cd15..14ccf34 100644 (file)
@@ -54,9 +54,7 @@
 #include <lustre/lustre_idl.h>
 #include <lustre_dlm.h>
 #include <lustre_mds.h>
-#include <lustre_debug.h>
 #include <obd_class.h>
-#include <obd_lov.h>
 #include <obd_ost.h>
 #include <lprocfs_status.h>
 #include <lustre_param.h>
@@ -739,8 +737,8 @@ void lov_fix_desc_stripe_size(__u64 *val)
                if (*val != 0)
                        LCONSOLE_INFO("Increasing default stripe size to "
                                      "minimum %u\n",
-                                     LOV_DEFAULT_STRIPE_SIZE);
-               *val = LOV_DEFAULT_STRIPE_SIZE;
+                                     LOV_DESC_STRIPE_SIZE_DEFAULT);
+               *val = LOV_DESC_STRIPE_SIZE_DEFAULT;
        } else if (*val & (LOV_MIN_STRIPE_SIZE - 1)) {
                *val &= ~(LOV_MIN_STRIPE_SIZE - 1);
                LCONSOLE_WARN("Changing default stripe size to "LPU64" (a "
@@ -766,9 +764,8 @@ void lov_fix_desc_pattern(__u32 *val)
 
 void lov_fix_desc_qos_maxage(__u32 *val)
 {
-        /* fix qos_maxage */
-        if (*val == 0)
-                *val = QOS_DEFAULT_MAXAGE;
+       if (*val == 0)
+               *val = LOV_DESC_QOS_MAXAGE_DEFAULT;
 }
 
 void lov_fix_desc(struct lov_desc *desc)
index 7588338..b394966 100644 (file)
@@ -42,7 +42,6 @@
 #define DEBUG_SUBSYSTEM S_LOV
 
 #include "lov_cl_internal.h"
-#include <lustre_debug.h>
 
 /** \addtogroup lov
  *  @{
index 464cf49..d29e87d 100644 (file)
@@ -43,7 +43,6 @@
 #endif
 
 #include <obd_class.h>
-#include <obd_lov.h>
 
 #include "lov_internal.h"
 
index 13bfa81..3c511fe 100644 (file)
@@ -47,7 +47,6 @@
 
 #include <lustre_net.h>
 #include <obd.h>
-#include <obd_lov.h>
 #include <obd_class.h>
 #include <obd_support.h>
 #include <lustre/lustre_user.h>
@@ -181,8 +180,9 @@ int lov_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
                  * Anyway, this is pretty inaccurate since ld_tgt_count now
                  * represents max index and we should rely on the actual number
                  * of OSTs instead */
-                stripe_count = lov_mds_md_stripecnt(lov->lov_ocd.ocd_max_easize,
-                                                    lmm_magic);
+               stripe_count = lov_mds_md_max_stripe_count(
+                       lov->lov_ocd.ocd_max_easize, lmm_magic);
+
                 if (stripe_count > lov->desc.ld_tgt_count)
                         stripe_count = lov->desc.ld_tgt_count;
         }
@@ -268,8 +268,8 @@ __u16 lov_get_stripecnt(struct lov_obd *lov, __u32 magic, __u16 stripe_count)
          * larger EA sizes */
         if (lov->lov_ocd.ocd_connect_flags & OBD_CONNECT_MAX_EASIZE &&
             lov->lov_ocd.ocd_max_easize)
-                max_stripes = lov_mds_md_stripecnt(lov->lov_ocd.ocd_max_easize,
-                                                   magic);
+               max_stripes = lov_mds_md_max_stripe_count(
+                       lov->lov_ocd.ocd_max_easize, magic);
 
         if (stripe_count > max_stripes)
                 stripe_count = max_stripes;
index d11e748..ddbca8c 100644 (file)
@@ -43,7 +43,6 @@
 #endif
 
 #include <obd_class.h>
-#include <obd_lov.h>
 #include <obd_ost.h>
 #include <lustre/lustre_idl.h>
 
index 80ff70e..4e863c1 100644 (file)
@@ -235,7 +235,6 @@ static int llog_changelog_cancel_cb(const struct lu_env *env,
 
 static int llog_changelog_cancel(const struct lu_env *env,
                                 struct llog_ctxt *ctxt,
-                                struct lov_stripe_md *lsm, int count,
                                 struct llog_cookie *cookies, int flags)
 {
        struct llog_handle      *cathandle = ctxt->loc_handle;
@@ -480,7 +479,7 @@ int mdd_changelog_llog_cancel(const struct lu_env *env,
            changed since the last purge) */
         mdd->mdd_cl.mc_starttime = cfs_time_current_64();
 
-       rc = llog_cancel(env, ctxt, NULL, 1, (struct llog_cookie *)&endrec, 0);
+       rc = llog_cancel(env, ctxt, (struct llog_cookie *)&endrec, 0);
 out:
         llog_ctxt_put(ctxt);
         return rc;
index 6049c2f..c2326ea 100644 (file)
@@ -48,7 +48,6 @@
 #include <obd_class.h>
 #include <lustre_ver.h>
 #include <obd_support.h>
-#include <obd_lov.h>
 #include <lprocfs_status.h>
 #include <lustre_mds.h>
 #include <lustre_fid.h>
index 462b2b5..ef887cf 100644 (file)
@@ -49,7 +49,6 @@
 #include <lprocfs_status.h>
 /* fid_be_cpu(), fid_cpu_to_be(). */
 #include <lustre_fid.h>
-#include <obd_lov.h>
 #include <lustre_idmap.h>
 #include <lustre_param.h>
 #include <lustre_mds.h>
index 037bcbd..e095ba9 100644 (file)
@@ -41,7 +41,6 @@
 #include <lustre_net.h>
 #include <lustre_export.h>
 #include <obd.h>
-#include <obd_lov.h>
 #include <lprocfs_status.h>
 #include <lustre_log.h>
 #include "mdt_internal.h"
index 3c873d5..8362627 100644 (file)
@@ -39,7 +39,6 @@
 #include <lustre_net.h>
 #include <lustre_export.h>
 #include <obd.h>
-#include <obd_lov.h>
 #include <lprocfs_status.h>
 #include <lustre_log.h>
 #include "mdt_internal.h"
index 00e2fbc..4c546bb 100644 (file)
@@ -46,7 +46,6 @@
 #define D_MGS D_CONFIG
 
 #include <obd.h>
-#include <obd_lov.h>
 #include <lustre_param.h>
 #include <lustre_sec.h>
 #include <lustre_quota.h>
@@ -1854,9 +1853,9 @@ static int mgs_write_log_lov(const struct lu_env *env, struct mgs_device *mgs,
         /* Defaults.  Can be changed later by lcfg config_param */
         lovdesc->ld_default_stripe_count = 1;
         lovdesc->ld_pattern = LOV_PATTERN_RAID0;
-        lovdesc->ld_default_stripe_size = 1024 * 1024;
+       lovdesc->ld_default_stripe_size = LOV_DESC_STRIPE_SIZE_DEFAULT;
         lovdesc->ld_default_stripe_offset = -1;
-        lovdesc->ld_qos_maxage = QOS_DEFAULT_MAXAGE;
+       lovdesc->ld_qos_maxage = LOV_DESC_QOS_MAXAGE_DEFAULT;
         sprintf((char*)lovdesc->ld_uuid.uuid, "%s_UUID", lovname);
         /* can these be the same? */
         uuid = (char *)lovdesc->ld_uuid.uuid;
index 2754af9..e1d5ec2 100644 (file)
@@ -59,18 +59,6 @@ void dump_lniobuf(struct niobuf_local *nb)
 }
 EXPORT_SYMBOL(dump_lniobuf);
 
-void dump_lsm(int level, struct lov_stripe_md *lsm)
-{
-       CDEBUG(level, "lsm %p, objid "DOSTID", maxbytes "LPX64", magic 0x%08X,"
-              " stripe_size %u, stripe_count %u, refc: %d,"
-              " layout_gen %u, pool ["LOV_POOLNAMEF"]\n", lsm,
-              POSTID(&lsm->lsm_oi), lsm->lsm_maxbytes, lsm->lsm_magic,
-              lsm->lsm_stripe_size, lsm->lsm_stripe_count,
-              atomic_read(&lsm->lsm_refc), lsm->lsm_layout_gen,
-              lsm->lsm_pool_name);
-}
-EXPORT_SYMBOL(dump_lsm);
-
 #define LPDS sizeof(__u64)
 int block_debug_setup(void *addr, int len, __u64 off, __u64 id)
 {
index 20866c3..a2dc63a 100644 (file)
@@ -232,35 +232,7 @@ int llog_sync(struct llog_ctxt *ctxt, struct obd_export *exp, int flags)
 }
 EXPORT_SYMBOL(llog_sync);
 
-int llog_obd_add(const struct lu_env *env, struct llog_ctxt *ctxt,
-                struct llog_rec_hdr *rec, struct lov_stripe_md *lsm,
-                struct llog_cookie *logcookies, int numcookies)
-{
-        int raised, rc;
-        ENTRY;
-
-        if (!ctxt) {
-                CERROR("No ctxt\n");
-                RETURN(-ENODEV);
-        }
-
-        if (ctxt->loc_flags & LLOG_CTXT_FLAG_UNINITIALIZED)
-                RETURN(-ENXIO);
-
-       CTXT_CHECK_OP(ctxt, obd_add, -EOPNOTSUPP);
-        raised = cfs_cap_raised(CFS_CAP_SYS_RESOURCE);
-        if (!raised)
-                cfs_cap_raise(CFS_CAP_SYS_RESOURCE);
-       rc = CTXTP(ctxt, obd_add)(env, ctxt, rec, lsm, logcookies,
-                                 numcookies);
-        if (!raised)
-                cfs_cap_lower(CFS_CAP_SYS_RESOURCE);
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_obd_add);
-
 int llog_cancel(const struct lu_env *env, struct llog_ctxt *ctxt,
-               struct lov_stripe_md *lsm, int count,
                struct llog_cookie *cookies, int flags)
 {
         int rc;
@@ -272,7 +244,7 @@ int llog_cancel(const struct lu_env *env, struct llog_ctxt *ctxt,
         }
 
         CTXT_CHECK_OP(ctxt, cancel, -EOPNOTSUPP);
-       rc = CTXTP(ctxt, cancel)(env, ctxt, lsm, count, cookies, flags);
+       rc = CTXTP(ctxt, cancel)(env, ctxt, cookies, flags);
         RETURN(rc);
 }
 EXPORT_SYMBOL(llog_cancel);
index 8940cc4..38cff00 100644 (file)
@@ -51,7 +51,6 @@
 #include <lustre_fid.h>
 #include <lustre_acl.h>
 #include <lustre_net.h>
-#include <obd_lov.h>
 
 #include "echo_internal.h"
 
index f95fb55..0884aaf 100644 (file)
@@ -47,7 +47,6 @@
 #include <lustre/lustre_user.h>
 #include <obd_cksum.h>
 #include <obd_ost.h>
-#include <obd_lov.h>
 
 #ifdef  __CYGWIN__
 # include <ctype.h>
index a5d6ae7..64b7196 100644 (file)
@@ -53,7 +53,6 @@
 #include <obd.h>
 #include <obd_ost.h>
 #include <obd_class.h>
-#include <obd_lov.h> /* for IOC_LOV_SET_OSC_ACTIVE */
 #include <libcfs/list.h>
 
 #include "ptlrpc_internal.h"
index be20a72..7e3fed8 100644 (file)
@@ -55,7 +55,6 @@
 #include <obd.h>
 #include <lustre_lib.h>
 #include <lustre/lustreapi.h>
-#include <obd_lov.h>
 
 #include <lnet/lnetctl.h>
 
index ef03636..025c01d 100644 (file)
@@ -74,7 +74,6 @@
 
 #include <libcfs/libcfsutil.h>
 #include <obd.h>
-#include <obd_lov.h>
 #include "obdctl.h"
 
 /* all functions */
index ad1a993..eabe1d5 100644 (file)
@@ -72,7 +72,6 @@
 #include <liblustre.h>
 #include <lnet/lnetctl.h>
 #include <obd.h>
-#include <obd_lov.h>
 #include <lustre/lustreapi.h>
 #include "lustreapi_internal.h"
 
index 01ad99a..dcce44e 100644 (file)
@@ -55,7 +55,6 @@
 #include <liblustre.h>
 #include <lnet/lnetctl.h>
 #include <obd.h>
-#include <obd_lov.h>
 #include <lustre/lustreapi.h>
 #include "lustreapi_internal.h"
 
index 9a552f5..54312d4 100644 (file)
@@ -57,7 +57,6 @@
 #include <lustre/lustre_idl.h>
 #include <lustre_dlm.h>
 #include <obd.h>          /* for struct lov_stripe_md */
-#include <obd_lov.h>
 #include <lustre/lustre_build_version.h>
 
 #include <unistd.h>