From: John L. Hammond Date: Wed, 11 Dec 2013 18:08:17 +0000 (-0600) Subject: LU-2675 obdclass: remove uses of lov_stripe_md X-Git-Tag: 2.5.57~46 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=8e357d93ccc26e85e6ddf53360df72b47a254852 LU-2675 obdclass: remove uses of lov_stripe_md 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 Change-Id: I38a5fdae210b6317a07d1601c1c93ae8071631ae Reviewed-on: http://review.whamcloud.com/8545 Reviewed-by: Bobi Jam Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- diff --git a/lustre/include/Makefile.am b/lustre/include/Makefile.am index 831a63d..8544c61 100644 --- a/lustre/include/Makefile.am +++ b/lustre/include/Makefile.am @@ -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 diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index 869e682..3620fa6 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -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 { diff --git a/lustre/include/lustre_debug.h b/lustre/include/lustre_debug.h index cdb2f9d..f7e5173 100644 --- a/lustre/include/lustre_debug.h +++ b/lustre/include/lustre_debug.h @@ -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); diff --git a/lustre/include/lustre_log.h b/lustre/include/lustre_log.h index 061c100..1ccb8d4 100644 --- a/lustre/include/lustre_log.h +++ b/lustre/include/lustre_log.h @@ -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 */ diff --git a/lustre/include/obd.h b/lustre/include/obd.h index 3be4697..b9c2433 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -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); diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index 5e5a4cd..536e40b 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -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 index dfb2631..0000000 --- a/lustre/include/obd_lov.h +++ /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 diff --git a/lustre/lod/lod_lov.c b/lustre/lod/lod_lov.c index dc5201e..5bd344c 100644 --- a/lustre/lod/lod_lov.c +++ b/lustre/lod/lod_lov.c @@ -34,7 +34,6 @@ #define DEBUG_SUBSYSTEM S_MDS #include -#include #include #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) diff --git a/lustre/lod/lod_object.c b/lustre/lod/lod_object.c index 02c14c2..b7e97ad 100644 --- a/lustre/lod/lod_object.c +++ b/lustre/lod/lod_object.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #include "lod_internal.h" diff --git a/lustre/lod/lod_qos.c b/lustre/lod/lod_qos.c index b4b8d93..2b8f1d1 100644 --- a/lustre/lod/lod_qos.c +++ b/lustre/lod/lod_qos.c @@ -35,9 +35,9 @@ #define DEBUG_SUBSYSTEM S_LOV +#include #include #include -#include #include #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; } diff --git a/lustre/lov/lov_ea.c b/lustre/lov/lov_ea.c index d4ae4b2..dc06237 100644 --- a/lustre/lov/lov_ea.c +++ b/lustre/lov/lov_ea.c @@ -48,7 +48,6 @@ #endif #include -#include #include #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); +} diff --git a/lustre/lov/lov_internal.h b/lustre/lov/lov_internal.h index 3b0acf3..6a01148 100644 --- a/lustre/lov/lov_internal.h +++ b/lustre/lov/lov_internal.h @@ -38,9 +38,39 @@ #define LOV_INTERNAL_H #include -#include #include +/* 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; diff --git a/lustre/lov/lov_merge.c b/lustre/lov/lov_merge.c index 5407c11..b7911c9 100644 --- a/lustre/lov/lov_merge.c +++ b/lustre/lov/lov_merge.c @@ -43,8 +43,6 @@ #endif #include -#include - #include "lov_internal.h" /** Merge the lock value block(&lvb) attributes and KMS from each of the diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 286cd15..14ccf34 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -54,9 +54,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -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) diff --git a/lustre/lov/lov_object.c b/lustre/lov/lov_object.c index 7588338..b394966 100644 --- a/lustre/lov/lov_object.c +++ b/lustre/lov/lov_object.c @@ -42,7 +42,6 @@ #define DEBUG_SUBSYSTEM S_LOV #include "lov_cl_internal.h" -#include /** \addtogroup lov * @{ diff --git a/lustre/lov/lov_offset.c b/lustre/lov/lov_offset.c index 464cf49..d29e87d 100644 --- a/lustre/lov/lov_offset.c +++ b/lustre/lov/lov_offset.c @@ -43,7 +43,6 @@ #endif #include -#include #include "lov_internal.h" diff --git a/lustre/lov/lov_pack.c b/lustre/lov/lov_pack.c index 13bfa81..3c511fe 100644 --- a/lustre/lov/lov_pack.c +++ b/lustre/lov/lov_pack.c @@ -47,7 +47,6 @@ #include #include -#include #include #include #include @@ -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; diff --git a/lustre/lov/lov_request.c b/lustre/lov/lov_request.c index d11e748..ddbca8c 100644 --- a/lustre/lov/lov_request.c +++ b/lustre/lov/lov_request.c @@ -43,7 +43,6 @@ #endif #include -#include #include #include diff --git a/lustre/mdd/mdd_device.c b/lustre/mdd/mdd_device.c index 80ff70e..4e863c1 100644 --- a/lustre/mdd/mdd_device.c +++ b/lustre/mdd/mdd_device.c @@ -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; diff --git a/lustre/mdd/mdd_lov.c b/lustre/mdd/mdd_lov.c index 6049c2f..c2326ea 100644 --- a/lustre/mdd/mdd_lov.c +++ b/lustre/mdd/mdd_lov.c @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index 462b2b5..ef887cf 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -49,7 +49,6 @@ #include /* fid_be_cpu(), fid_cpu_to_be(). */ #include -#include #include #include #include diff --git a/lustre/mdt/mdt_coordinator.c b/lustre/mdt/mdt_coordinator.c index 037bcbd..e095ba9 100644 --- a/lustre/mdt/mdt_coordinator.c +++ b/lustre/mdt/mdt_coordinator.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include "mdt_internal.h" diff --git a/lustre/mdt/mdt_hsm_cdt_client.c b/lustre/mdt/mdt_hsm_cdt_client.c index 3c873d5a..8362627 100644 --- a/lustre/mdt/mdt_hsm_cdt_client.c +++ b/lustre/mdt/mdt_hsm_cdt_client.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include "mdt_internal.h" diff --git a/lustre/mgs/mgs_llog.c b/lustre/mgs/mgs_llog.c index 00e2fbc..4c546bb 100644 --- a/lustre/mgs/mgs_llog.c +++ b/lustre/mgs/mgs_llog.c @@ -46,7 +46,6 @@ #define D_MGS D_CONFIG #include -#include #include #include #include @@ -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; diff --git a/lustre/obdclass/debug.c b/lustre/obdclass/debug.c index 2754af9..e1d5ec2 100644 --- a/lustre/obdclass/debug.c +++ b/lustre/obdclass/debug.c @@ -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) { diff --git a/lustre/obdclass/llog_obd.c b/lustre/obdclass/llog_obd.c index 20866c3..a2dc63a 100644 --- a/lustre/obdclass/llog_obd.c +++ b/lustre/obdclass/llog_obd.c @@ -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); diff --git a/lustre/obdecho/echo_client.c b/lustre/obdecho/echo_client.c index 8940cc4..38cff00 100644 --- a/lustre/obdecho/echo_client.c +++ b/lustre/obdecho/echo_client.c @@ -51,7 +51,6 @@ #include #include #include -#include #include "echo_internal.h" diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index f95fb55..0884aaf 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -47,7 +47,6 @@ #include #include #include -#include #ifdef __CYGWIN__ # include diff --git a/lustre/ptlrpc/recover.c b/lustre/ptlrpc/recover.c index a5d6ae7..64b7196 100644 --- a/lustre/ptlrpc/recover.c +++ b/lustre/ptlrpc/recover.c @@ -53,7 +53,6 @@ #include #include #include -#include /* for IOC_LOV_SET_OSC_ACTIVE */ #include #include "ptlrpc_internal.h" diff --git a/lustre/tests/ll_dirstripe_verify.c b/lustre/tests/ll_dirstripe_verify.c index be20a72..7e3fed8 100644 --- a/lustre/tests/ll_dirstripe_verify.c +++ b/lustre/tests/ll_dirstripe_verify.c @@ -55,7 +55,6 @@ #include #include #include -#include #include diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index ef03636..025c01d 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -74,7 +74,6 @@ #include #include -#include #include "obdctl.h" /* all functions */ diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c index ad1a993..eabe1d5 100644 --- a/lustre/utils/liblustreapi.c +++ b/lustre/utils/liblustreapi.c @@ -72,7 +72,6 @@ #include #include #include -#include #include #include "lustreapi_internal.h" diff --git a/lustre/utils/liblustreapi_hsm.c b/lustre/utils/liblustreapi_hsm.c index 01ad99a..dcce44e 100644 --- a/lustre/utils/liblustreapi_hsm.c +++ b/lustre/utils/liblustreapi_hsm.c @@ -55,7 +55,6 @@ #include #include #include -#include #include #include "lustreapi_internal.h" diff --git a/lustre/utils/lustre_cfg.c b/lustre/utils/lustre_cfg.c index 9a552f5..54312d4 100644 --- a/lustre/utils/lustre_cfg.c +++ b/lustre/utils/lustre_cfg.c @@ -57,7 +57,6 @@ #include #include #include /* for struct lov_stripe_md */ -#include #include #include