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

Commit 114acca8 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman
Browse files

staging/lustre: get rid of seqno_t and mdsno_t typedefs



seqno_t is u64 and mdsno_t is u32 so just use them as such.

Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 48caf5a0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ static int seq_client_alloc_meta(const struct lu_env *env,

/* Allocate new sequence for client. */
static int seq_client_alloc_seq(const struct lu_env *env,
				struct lu_client_seq *seq, seqno_t *seqnr)
				struct lu_client_seq *seq, u64 *seqnr)
{
	int rc;

@@ -249,7 +249,7 @@ static void seq_fid_alloc_fini(struct lu_client_seq *seq)
 * Allocate the whole seq to the caller.
 **/
int seq_client_get_seq(const struct lu_env *env,
		       struct lu_client_seq *seq, seqno_t *seqnr)
		       struct lu_client_seq *seq, u64 *seqnr)
{
	wait_queue_t link;
	int rc;
@@ -313,7 +313,7 @@ int seq_client_alloc_fid(const struct lu_env *env,
		seq->lcs_fid.f_oid = seq->lcs_width;

	while (1) {
		seqno_t seqnr;
		u64 seqnr;

		if (!fid_is_zero(&seq->lcs_fid) &&
		    fid_oid(&seq->lcs_fid) < seq->lcs_width) {
+8 −8
Original line number Diff line number Diff line
@@ -263,8 +263,8 @@ void fld_cache_punch_hole(struct fld_cache *cache,
			  struct fld_cache_entry *f_new)
{
	const struct lu_seq_range *range = &f_new->fce_range;
	const seqno_t new_start  = range->lsr_start;
	const seqno_t new_end  = range->lsr_end;
	const u64 new_start  = range->lsr_start;
	const u64 new_end  = range->lsr_end;
	struct fld_cache_entry *fldt;

	OBD_ALLOC_GFP(fldt, sizeof(*fldt), GFP_ATOMIC);
@@ -302,9 +302,9 @@ static void fld_cache_overlap_handle(struct fld_cache *cache,
				struct fld_cache_entry *f_new)
{
	const struct lu_seq_range *range = &f_new->fce_range;
	const seqno_t new_start  = range->lsr_start;
	const seqno_t new_end  = range->lsr_end;
	const mdsno_t mdt = range->lsr_index;
	const u64 new_start  = range->lsr_start;
	const u64 new_end  = range->lsr_end;
	const u32 mdt = range->lsr_index;

	/* this is overlap case, these case are checking overlapping with
	 * prev range only. fixup will handle overlapping with next range. */
@@ -386,8 +386,8 @@ int fld_cache_insert_nolock(struct fld_cache *cache,
	struct fld_cache_entry *n;
	struct list_head *head;
	struct list_head *prev = NULL;
	const seqno_t new_start  = f_new->fce_range.lsr_start;
	const seqno_t new_end  = f_new->fce_range.lsr_end;
	const u64 new_start  = f_new->fce_range.lsr_start;
	const u64 new_end  = f_new->fce_range.lsr_end;
	__u32 new_flags  = f_new->fce_range.lsr_flags;

	/*
@@ -516,7 +516,7 @@ struct fld_cache_entry
 * lookup \a seq sequence for range in fld cache.
 */
int fld_cache_lookup(struct fld_cache *cache,
		     const seqno_t seq, struct lu_seq_range *range)
		     const u64 seq, struct lu_seq_range *range)
{
	struct fld_cache_entry *flde;
	struct fld_cache_entry *prev = NULL;
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ void fld_cache_delete(struct fld_cache *cache,
void fld_cache_delete_nolock(struct fld_cache *cache,
			     const struct lu_seq_range *range);
int fld_cache_lookup(struct fld_cache *cache,
		     const seqno_t seq, struct lu_seq_range *range);
		     const u64 seq, struct lu_seq_range *range);

struct fld_cache_entry*
fld_cache_entry_lookup(struct fld_cache *cache, struct lu_seq_range *range);
+4 −5
Original line number Diff line number Diff line
@@ -110,15 +110,14 @@ static void fld_exit_request(struct client_obd *cli)
	client_obd_list_unlock(&cli->cl_loi_list_lock);
}

static int fld_rrb_hash(struct lu_client_fld *fld,
			seqno_t seq)
static int fld_rrb_hash(struct lu_client_fld *fld, u64 seq)
{
	LASSERT(fld->lcf_count > 0);
	return do_div(seq, fld->lcf_count);
}

static struct lu_fld_target *
fld_rrb_scan(struct lu_client_fld *fld, seqno_t seq)
fld_rrb_scan(struct lu_client_fld *fld, u64 seq)
{
	struct lu_fld_target *target;
	int hash;
@@ -173,7 +172,7 @@ struct lu_fld_hash fld_hash[] = {
};

static struct lu_fld_target *
fld_client_get_target(struct lu_client_fld *fld, seqno_t seq)
fld_client_get_target(struct lu_client_fld *fld, u64 seq)
{
	struct lu_fld_target *target;

@@ -453,7 +452,7 @@ out_req:
	return rc;
}

int fld_client_lookup(struct lu_client_fld *fld, seqno_t seq, mdsno_t *mds,
int fld_client_lookup(struct lu_client_fld *fld, u64 seq, u32 *mds,
		      __u32 flags, const struct lu_env *env)
{
	struct lu_seq_range res = { 0 };
+0 −2
Original line number Diff line number Diff line
@@ -165,8 +165,6 @@
#define LUSTRE_LOG_VERSION  0x00050000
#define LUSTRE_MGS_VERSION  0x00060000

typedef __u32 mdsno_t;
typedef __u64 seqno_t;
typedef __u64 obd_id;
typedef __u64 obd_seq;
typedef __s64 obd_time;
Loading