Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 081b7265 authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman
Browse files

staging/lustre/obdclass: remove uses of lov_stripe_md



Remove the unused function llog_obd_add(). Remove the unused count and
parameters from llog_cancel(). Move dump_lsm() from obdclass to
the only module that uses it (lov). Remove obd_lov.h.

Signed-off-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/8545
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675


Reviewed-by: default avatarBobi Jam <bobijam@gmail.com>
Reviewed-by: default avatarMike Pershin <mike.pershin@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a5d490c2
Loading
Loading
Loading
Loading
+26 −0
Original line number Original line Diff line number Diff line
@@ -1682,6 +1682,30 @@ static inline __u32 lov_mds_md_size(__u16 stripes, __u32 lmm_magic)
				stripes * sizeof(struct lov_ost_data_v1);
				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_FLID	(0x00000001ULL) /* object ID */
#define OBD_MD_FLATIME     (0x00000002ULL) /* access time */
#define OBD_MD_FLATIME     (0x00000002ULL) /* access time */
@@ -2681,6 +2705,8 @@ enum seq_op {
 * protocol, this will limit the max number of OSTs per LOV */
 * protocol, this will limit the max number of OSTs per LOV */


#define LOV_DESC_MAGIC 0xB0CCDE5C
#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) */
/* LOV settings descriptor (should only contain static info) */
struct lov_desc {
struct lov_desc {
+0 −1
Original line number Original line Diff line number Diff line
@@ -48,7 +48,6 @@
/* lib/debug.c */
/* lib/debug.c */
void dump_lniobuf(struct niobuf_local *lnb);
void dump_lniobuf(struct niobuf_local *lnb);
int dump_req(struct ptlrpc_request *req);
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_setup(void *addr, int len, __u64 off, __u64 id);
int block_debug_check(char *who, void *addr, int len, __u64 off, __u64 id);
int block_debug_check(char *who, void *addr, int len, __u64 off, __u64 id);


+0 −10
Original line number Original line Diff line number Diff line
@@ -206,11 +206,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_ctxt_put(const struct lu_env *env, struct llog_ctxt *ctxt);
int llog_cleanup(const struct lu_env *env, struct llog_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_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,
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);
		struct llog_cookie *cookies, int flags);


int obd_llog_init(struct obd_device *obd, struct obd_llog_group *olg,
int obd_llog_init(struct obd_device *obd, struct obd_llog_group *olg,
@@ -242,7 +238,6 @@ struct llog_operations {
			int flags);
			int flags);
	int (*lop_cleanup)(const struct lu_env *env, struct llog_ctxt *ctxt);
	int (*lop_cleanup)(const struct lu_env *env, struct llog_ctxt *ctxt);
	int (*lop_cancel)(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);
			  struct llog_cookie *cookies, int flags);
	int (*lop_connect)(struct llog_ctxt *ctxt, struct llog_logid *logid,
	int (*lop_connect)(struct llog_ctxt *ctxt, struct llog_logid *logid,
			   struct llog_gen *gen, struct obd_uuid *uuid);
			   struct llog_gen *gen, struct obd_uuid *uuid);
@@ -296,11 +291,6 @@ struct llog_operations {
	int (*lop_add)(const struct lu_env *env, struct llog_handle *lgh,
	int (*lop_add)(const struct lu_env *env, struct llog_handle *lgh,
		       struct llog_rec_hdr *rec, struct llog_cookie *cookie,
		       struct llog_rec_hdr *rec, struct llog_cookie *cookie,
		       void *buf, struct thandle *th);
		       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 */
/* In-memory descriptor for a log object or log catalog */
+7 −0
Original line number Original line Diff line number Diff line
@@ -132,6 +132,13 @@ static inline bool lsm_has_objects(struct lov_stripe_md *lsm)
	return true;
	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;
struct obd_info;


typedef int (*obd_enqueue_update_f)(void *cookie, int rc);
typedef int (*obd_enqueue_update_f)(void *cookie, int rc);
+0 −9
Original line number Original line Diff line number Diff line
@@ -711,15 +711,6 @@ static inline int obd_size_diskmd(struct obd_export *exp,
	return obd_packmd(exp, NULL, mem_src);
	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,
static inline int obd_free_diskmd(struct obd_export *exp,
				  struct lov_mds_md **disk_tgt)
				  struct lov_mds_md **disk_tgt)
{
{
Loading