From 1ecf5bd5a3bece3d615d037a332792e360b49a09 Mon Sep 17 00:00:00 2001 From: Ben Evans Date: Thu, 20 Aug 2015 09:07:07 -0500 Subject: [PATCH 1/1] LU-6401 headers: Create single .h for lu_seq_range Put lu_seq_range related functions into a single .h. Include directly from files which use it, and remove definitions from lustre_idl.h Signed-off-by: Ben Evans Change-Id: I2e8912688bc5b9fd77fd7b1c85d2dee27cfd825c Reviewed-on: http://review.whamcloud.com/15952 Tested-by: Jenkins Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/fid/fid_handler.c | 105 +++++++++---------- lustre/fid/fid_request.c | 22 ++-- lustre/fid/lproc_fid.c | 2 +- lustre/fld/fld_cache.c | 18 ++-- lustre/fld/fld_index.c | 16 +-- lustre/include/lustre/Makefile.am | 3 +- lustre/include/lustre/lustre_idl.h | 108 -------------------- lustre/include/lustre/seq_range.h | 199 +++++++++++++++++++++++++++++++++++++ lustre/include/lustre_fld.h | 1 + 9 files changed, 284 insertions(+), 190 deletions(-) create mode 100644 lustre/include/lustre/seq_range.h diff --git a/lustre/fid/fid_handler.c b/lustre/fid/fid_handler.c index 1046b3c..07c0070 100644 --- a/lustre/fid/fid_handler.c +++ b/lustre/fid/fid_handler.c @@ -94,13 +94,13 @@ EXPORT_SYMBOL(seq_server_set_cli); * allocate \a w units of sequence from range \a from. */ static inline void range_alloc(struct lu_seq_range *to, - struct lu_seq_range *from, - __u64 width) + struct lu_seq_range *from, + __u64 width) { - width = min(range_space(from), width); - to->lsr_start = from->lsr_start; - to->lsr_end = from->lsr_start + width; - from->lsr_start += width; + width = min(lu_seq_range_space(from), width); + to->lsr_start = from->lsr_start; + to->lsr_end = from->lsr_start + width; + from->lsr_start += width; } /** @@ -118,9 +118,9 @@ static int __seq_server_alloc_super(struct lu_server_seq *seq, int rc; ENTRY; - LASSERT(range_is_sane(space)); + LASSERT(lu_seq_range_is_sane(space)); - if (range_is_exhausted(space)) { + if (lu_seq_range_is_exhausted(space)) { CERROR("%s: Sequences space is exhausted\n", seq->lss_name); RETURN(-ENOSPC); @@ -215,47 +215,48 @@ static int __seq_set_init(const struct lu_env *env, * flaged as sync write op. */ static int range_alloc_set(const struct lu_env *env, - struct lu_seq_range *out, - struct lu_server_seq *seq) + struct lu_seq_range *out, + struct lu_server_seq *seq) { - struct lu_seq_range *space = &seq->lss_space; - struct lu_seq_range *loset = &seq->lss_lowater_set; - struct lu_seq_range *hiset = &seq->lss_hiwater_set; - int rc = 0; + struct lu_seq_range *space = &seq->lss_space; + struct lu_seq_range *loset = &seq->lss_lowater_set; + struct lu_seq_range *hiset = &seq->lss_hiwater_set; + int rc = 0; - if (range_is_zero(loset)) - __seq_set_init(env, seq); + if (lu_seq_range_is_zero(loset)) + __seq_set_init(env, seq); - if (OBD_FAIL_CHECK(OBD_FAIL_SEQ_ALLOC)) /* exhaust set */ - loset->lsr_start = loset->lsr_end; + if (OBD_FAIL_CHECK(OBD_FAIL_SEQ_ALLOC)) /* exhaust set */ + loset->lsr_start = loset->lsr_end; - if (range_is_exhausted(loset)) { - /* reached high water mark. */ + if (lu_seq_range_is_exhausted(loset)) { + /* reached high water mark. */ struct lu_device *dev = seq->lss_site->ss_lu->ls_top_dev; - int obd_num_clients = dev->ld_obd->obd_num_exports; - __u64 set_sz; + int obd_num_clients = dev->ld_obd->obd_num_exports; + __u64 set_sz; - /* calculate new seq width based on number of clients */ - set_sz = max(seq->lss_set_width, - obd_num_clients * seq->lss_width); - set_sz = min(range_space(space), set_sz); + /* calculate new seq width based on number of clients */ + set_sz = max(seq->lss_set_width, + obd_num_clients * seq->lss_width); + set_sz = min(lu_seq_range_space(space), set_sz); - /* Switch to hiwater range now */ - *loset = *hiset; - /* allocate new hiwater range */ - range_alloc(hiset, space, set_sz); + /* Switch to hiwater range now */ + *loset = *hiset; + /* allocate new hiwater range */ + range_alloc(hiset, space, set_sz); - /* update ondisk seq with new *space */ - rc = seq_store_update(env, seq, NULL, seq->lss_need_sync); - } + /* update ondisk seq with new *space */ + rc = seq_store_update(env, seq, NULL, seq->lss_need_sync); + } - LASSERTF(!range_is_exhausted(loset) || range_is_sane(loset), - DRANGE"\n", PRANGE(loset)); + LASSERTF(!lu_seq_range_is_exhausted(loset) || + lu_seq_range_is_sane(loset), + DRANGE"\n", PRANGE(loset)); - if (rc == 0) - range_alloc(out, loset, seq->lss_width); + if (rc == 0) + range_alloc(out, loset, seq->lss_width); - RETURN(rc); + RETURN(rc); } /** @@ -280,7 +281,7 @@ int seq_server_check_and_alloc_super(const struct lu_env *env, ENTRY; /* Check if available space ends and allocate new super seq */ - if (range_is_exhausted(space)) { + if (lu_seq_range_is_exhausted(space)) { if (!seq->lss_cli) { CERROR("%s: No sequence controller is attached.\n", seq->lss_name); @@ -296,7 +297,7 @@ int seq_server_check_and_alloc_super(const struct lu_env *env, /* Saving new range to allocation space. */ *space = seq->lss_cli->lcs_space; - LASSERT(range_is_sane(space)); + LASSERT(lu_seq_range_is_sane(space)); if (seq->lss_cli->lcs_srv == NULL) { struct lu_server_fld *fld; @@ -308,7 +309,7 @@ int seq_server_check_and_alloc_super(const struct lu_env *env, } } - if (range_is_zero(&seq->lss_lowater_set)) + if (lu_seq_range_is_zero(&seq->lss_lowater_set)) __seq_set_init(env, seq); RETURN(rc); @@ -324,7 +325,7 @@ static int __seq_server_alloc_meta(struct lu_server_seq *seq, ENTRY; - LASSERT(range_is_sane(space)); + LASSERT(lu_seq_range_is_sane(space)); rc = seq_server_check_and_alloc_super(env, seq); if (rc < 0) { @@ -526,11 +527,11 @@ int seq_server_init(const struct lu_env *env, seq->lss_cli = NULL; seq->lss_type = type; seq->lss_site = ss; - range_init(&seq->lss_space); + lu_seq_range_init(&seq->lss_space); - range_init(&seq->lss_lowater_set); - range_init(&seq->lss_hiwater_set); - seq->lss_set_width = LUSTRE_SEQ_BATCH_WIDTH; + lu_seq_range_init(&seq->lss_lowater_set); + lu_seq_range_init(&seq->lss_hiwater_set); + seq->lss_set_width = LUSTRE_SEQ_BATCH_WIDTH; mutex_init(&seq->lss_mutex); @@ -568,12 +569,12 @@ int seq_server_init(const struct lu_env *env, GOTO(out, rc); } - if (is_srv) { - LASSERT(range_is_sane(&seq->lss_space)); - } else { - LASSERT(!range_is_zero(&seq->lss_space) && - range_is_sane(&seq->lss_space)); - } + if (is_srv) { + LASSERT(lu_seq_range_is_sane(&seq->lss_space)); + } else { + LASSERT(!lu_seq_range_is_zero(&seq->lss_space) && + lu_seq_range_is_sane(&seq->lss_space)); + } rc = seq_server_proc_init(seq); if (rc) diff --git a/lustre/fid/fid_request.c b/lustre/fid/fid_request.c index 8cb64f1..3cd7a48 100644 --- a/lustre/fid/fid_request.c +++ b/lustre/fid/fid_request.c @@ -76,7 +76,7 @@ static int seq_client_rpc(struct lu_client_seq *seq, /* Zero out input range, this is not recovery yet. */ in = req_capsule_client_get(&req->rq_pill, &RMF_SEQ_RANGE); - range_init(in); + lu_seq_range_init(in); ptlrpc_request_set_replen(req); @@ -123,13 +123,13 @@ static int seq_client_rpc(struct lu_client_seq *seq, out = req_capsule_server_get(&req->rq_pill, &RMF_SEQ_RANGE); *output = *out; - if (!range_is_sane(output)) { + if (!lu_seq_range_is_sane(output)) { CERROR("%s: Invalid range received from server: " DRANGE"\n", seq->lcs_name, PRANGE(output)); GOTO(out_req, rc = -EINVAL); } - if (range_is_exhausted(output)) { + if (lu_seq_range_is_exhausted(output)) { CERROR("%s: Range received from server is exhausted: " DRANGE"]\n", seq->lcs_name, PRANGE(output)); GOTO(out_req, rc = -EINVAL); @@ -208,12 +208,12 @@ static int seq_client_alloc_meta(const struct lu_env *env, static int seq_client_alloc_seq(const struct lu_env *env, struct lu_client_seq *seq, u64 *seqnr) { - int rc; - ENTRY; + int rc; + ENTRY; - LASSERT(range_is_sane(&seq->lcs_space)); + LASSERT(lu_seq_range_is_sane(&seq->lcs_space)); - if (range_is_exhausted(&seq->lcs_space)) { + if (lu_seq_range_is_exhausted(&seq->lcs_space)) { rc = seq_client_alloc_meta(env, seq); if (rc) { CERROR("%s: Can't allocate new meta-sequence," @@ -227,9 +227,9 @@ static int seq_client_alloc_seq(const struct lu_env *env, rc = 0; } - LASSERT(!range_is_exhausted(&seq->lcs_space)); - *seqnr = seq->lcs_space.lsr_start; - seq->lcs_space.lsr_start += 1; + LASSERT(!lu_seq_range_is_exhausted(&seq->lcs_space)); + *seqnr = seq->lcs_space.lsr_start; + seq->lcs_space.lsr_start += 1; CDEBUG(D_INFO, "%s: Allocated sequence ["LPX64"]\n", seq->lcs_name, *seqnr); @@ -414,7 +414,7 @@ void seq_client_flush(struct lu_client_seq *seq) seq->lcs_space.lsr_index = -1; - range_init(&seq->lcs_space); + lu_seq_range_init(&seq->lcs_space); mutex_unlock(&seq->lcs_mutex); } EXPORT_SYMBOL(seq_client_flush); diff --git a/lustre/fid/lproc_fid.c b/lustre/fid/lproc_fid.c index aa16d81..2f7c670 100644 --- a/lustre/fid/lproc_fid.c +++ b/lustre/fid/lproc_fid.c @@ -91,7 +91,7 @@ lprocfs_fid_write_common(const char __user *buffer, size_t count, rc = sscanf(kernbuf, "[%llx - %llx]\n", (long long unsigned *)&tmp.lsr_start, (long long unsigned *)&tmp.lsr_end); - if (!range_is_sane(&tmp) || range_is_zero(&tmp) || + if (!lu_seq_range_is_sane(&tmp) || lu_seq_range_is_zero(&tmp) || tmp.lsr_start < range->lsr_start || tmp.lsr_end > range->lsr_end) RETURN(-EINVAL); *range = tmp; diff --git a/lustre/fld/fld_cache.c b/lustre/fld/fld_cache.c index 24b0cd1..8e4a691 100644 --- a/lustre/fld/fld_cache.c +++ b/lustre/fld/fld_cache.c @@ -142,12 +142,12 @@ static void fld_fix_new_list(struct fld_cache *cache) restart_fixup: list_for_each_entry_safe(f_curr, f_next, head, fce_list) { - c_range = &f_curr->fce_range; - n_range = &f_next->fce_range; + c_range = &f_curr->fce_range; + n_range = &f_next->fce_range; - LASSERT(range_is_sane(c_range)); - if (&f_next->fce_list == head) - break; + LASSERT(lu_seq_range_is_sane(c_range)); + if (&f_next->fce_list == head) + break; if (c_range->lsr_flags != n_range->lsr_flags) continue; @@ -369,7 +369,7 @@ struct fld_cache_entry { struct fld_cache_entry *f_new; - LASSERT(range_is_sane(range)); + LASSERT(lu_seq_range_is_sane(range)); OBD_ALLOC_PTR(f_new); if (!f_new) @@ -545,10 +545,10 @@ int fld_cache_lookup(struct fld_cache *cache, } prev = flde; - if (range_within(&flde->fce_range, seq)) { - *range = flde->fce_range; + if (lu_seq_range_within(&flde->fce_range, seq)) { + *range = flde->fce_range; - cache->fci_stat.fst_cache++; + cache->fci_stat.fst_cache++; read_unlock(&cache->fci_lock); RETURN(0); } diff --git a/lustre/fld/fld_index.c b/lustre/fld/fld_index.c index efff9fe..4226438 100644 --- a/lustre/fld/fld_index.c +++ b/lustre/fld/fld_index.c @@ -103,7 +103,7 @@ int fld_declare_index_create(const struct lu_env *env, rc = fld_index_lookup(env, fld, new_range->lsr_start, range); if (rc == 0) { /* In case of duplicate entry, the location must be same */ - LASSERT((range_compare_loc(new_range, range) == 0)); + LASSERT((lu_seq_range_compare_loc(new_range, range) == 0)); GOTO(out, rc = -EEXIST); } @@ -116,7 +116,7 @@ int fld_declare_index_create(const struct lu_env *env, /* Check for merge case, since the fld entry can only be increamental, * so we will only check whether it can be merged from the left. */ if (new_range->lsr_start == range->lsr_end && range->lsr_end != 0 && - range_compare_loc(new_range, range) == 0) { + lu_seq_range_compare_loc(new_range, range) == 0) { range_cpu_to_be(tmp, range); rc = dt_declare_delete(env, fld->lsf_obj, (struct dt_key *)&tmp->lsr_start, th); @@ -182,7 +182,7 @@ int fld_index_create(const struct lu_env *env, struct lu_server_fld *fld, } if (new_range->lsr_start == range->lsr_end && range->lsr_end != 0 && - range_compare_loc(new_range, range) == 0) { + lu_seq_range_compare_loc(new_range, range) == 0) { range_cpu_to_be(tmp, range); rc = dt_delete(env, fld->lsf_obj, (struct dt_key *)&tmp->lsr_start, th); @@ -244,11 +244,11 @@ int fld_index_lookup(const struct lu_env *env, struct lu_server_fld *fld, rc = fld_cache_lookup(fld->lsf_cache, seq, fld_rec); if (rc == 0) { - *range = *fld_rec; - if (range_within(range, seq)) - rc = 0; - else - rc = -ENOENT; + *range = *fld_rec; + if (lu_seq_range_within(range, seq)) + rc = 0; + else + rc = -ENOENT; } CDEBUG(D_INFO, "%s: lookup seq = "LPX64" range : "DRANGE" rc = %d\n", diff --git a/lustre/include/lustre/Makefile.am b/lustre/include/lustre/Makefile.am index d731de3..cef28e8 100644 --- a/lustre/include/lustre/Makefile.am +++ b/lustre/include/lustre/Makefile.am @@ -41,4 +41,5 @@ pkginclude_HEADERS = lustreapi.h lustre_user.h liblustreapi.h ll_fiemap.h endif EXTRA_DIST = lustreapi.h lustre_idl.h lustre_user.h liblustreapi.h \ - libiam.h ll_fiemap.h lustre_lfsck_user.h lustre_errno.h + libiam.h ll_fiemap.h lustre_lfsck_user.h lustre_errno.h \ + seq_range.h diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index be88ece..1f8641d 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -186,113 +186,6 @@ struct lu_seq_range_array { #define LU_SEQ_RANGE_MASK 0x3 -static inline unsigned fld_range_type(const struct lu_seq_range *range) -{ - return range->lsr_flags & LU_SEQ_RANGE_MASK; -} - -static inline bool fld_range_is_ost(const struct lu_seq_range *range) -{ - return fld_range_type(range) == LU_SEQ_RANGE_OST; -} - -static inline bool fld_range_is_mdt(const struct lu_seq_range *range) -{ - return fld_range_type(range) == LU_SEQ_RANGE_MDT; -} - -/** - * This all range is only being used when fld client sends fld query request, - * but it does not know whether the seq is MDT or OST, so it will send req - * with ALL type, which means either seq type gotten from lookup can be - * expected. - */ -static inline unsigned fld_range_is_any(const struct lu_seq_range *range) -{ - return fld_range_type(range) == LU_SEQ_RANGE_ANY; -} - -static inline void fld_range_set_type(struct lu_seq_range *range, - unsigned flags) -{ - range->lsr_flags |= flags; -} - -static inline void fld_range_set_mdt(struct lu_seq_range *range) -{ - fld_range_set_type(range, LU_SEQ_RANGE_MDT); -} - -static inline void fld_range_set_ost(struct lu_seq_range *range) -{ - fld_range_set_type(range, LU_SEQ_RANGE_OST); -} - -static inline void fld_range_set_any(struct lu_seq_range *range) -{ - fld_range_set_type(range, LU_SEQ_RANGE_ANY); -} - -/** - * returns width of given range \a r - */ - -static inline __u64 range_space(const struct lu_seq_range *range) -{ - return range->lsr_end - range->lsr_start; -} - -/** - * initialize range to zero - */ - -static inline void range_init(struct lu_seq_range *range) -{ - memset(range, 0, sizeof(*range)); -} - -/** - * check if given seq id \a s is within given range \a r - */ - -static inline bool range_within(const struct lu_seq_range *range, - __u64 s) -{ - return s >= range->lsr_start && s < range->lsr_end; -} - -static inline bool range_is_sane(const struct lu_seq_range *range) -{ - return range->lsr_end >= range->lsr_start; -} - -static inline bool range_is_zero(const struct lu_seq_range *range) -{ - return range->lsr_start == 0 && range->lsr_end == 0; -} - -static inline bool range_is_exhausted(const struct lu_seq_range *range) -{ - return range_space(range) == 0; -} - -/* return 0 if two range have the same location */ -static inline int range_compare_loc(const struct lu_seq_range *r1, - const struct lu_seq_range *r2) -{ - return r1->lsr_index != r2->lsr_index || - r1->lsr_flags != r2->lsr_flags; -} - -#define DRANGE "[%#16.16"LPF64"x-%#16.16"LPF64"x):%x:%s" - -#define PRANGE(range) \ - (range)->lsr_start, \ - (range)->lsr_end, \ - (range)->lsr_index, \ - fld_range_is_mdt(range) ? "mdt" : "ost" - - /** \defgroup lu_fid lu_fid * @{ */ @@ -923,7 +816,6 @@ static inline bool fid_is_sane(const struct lu_fid *fid) } extern void lustre_swab_lu_fid(struct lu_fid *fid); -extern void lustre_swab_lu_seq_range(struct lu_seq_range *range); static inline bool lu_fid_eq(const struct lu_fid *f0, const struct lu_fid *f1) { diff --git a/lustre/include/lustre/seq_range.h b/lustre/include/lustre/seq_range.h new file mode 100644 index 0000000..e4efaa4 --- /dev/null +++ b/lustre/include/lustre/seq_range.h @@ -0,0 +1,199 @@ +/* + * 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.gnu.org/licenses/gpl-2.0.html + * + * GPL HEADER END + */ +/* + * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Use is subject to license terms. + * + * Copyright (c) 2011, 2014, Intel Corporation. + * + * Copyright 2015 Cray Inc, all rights reserved. + * Author: Ben Evans. + * + * Define lu_seq_range associated functions + */ + +#ifndef _SEQ_RANGE_H_ +#define _SEQ_RANGE_H_ + +#include + +/** + * computes the sequence range type \a range + */ + +static inline unsigned fld_range_type(const struct lu_seq_range *range) +{ + return range->lsr_flags & LU_SEQ_RANGE_MASK; +} + +/** + * Is this sequence range an OST? \a range + */ + +static inline bool fld_range_is_ost(const struct lu_seq_range *range) +{ + return fld_range_type(range) == LU_SEQ_RANGE_OST; +} + +/** + * Is this sequence range an MDT? \a range + */ + +static inline bool fld_range_is_mdt(const struct lu_seq_range *range) +{ + return fld_range_type(range) == LU_SEQ_RANGE_MDT; +} + +/** + * ANY range is only used when the fld client sends a fld query request, + * but it does not know whether the seq is an MDT or OST, so it will send the + * request with ANY type, which means any seq type from the lookup can be + * expected. /a range + */ +static inline unsigned fld_range_is_any(const struct lu_seq_range *range) +{ + return fld_range_type(range) == LU_SEQ_RANGE_ANY; +} + +/** + * Apply flags to range \a range \a flags + */ + +static inline void fld_range_set_type(struct lu_seq_range *range, + unsigned flags) +{ + range->lsr_flags |= flags; +} + +/** + * Add MDT to range type \a range + */ + +static inline void fld_range_set_mdt(struct lu_seq_range *range) +{ + fld_range_set_type(range, LU_SEQ_RANGE_MDT); +} + +/** + * Add OST to range type \a range + */ + +static inline void fld_range_set_ost(struct lu_seq_range *range) +{ + fld_range_set_type(range, LU_SEQ_RANGE_OST); +} + +/** + * Add ANY to range type \a range + */ + +static inline void fld_range_set_any(struct lu_seq_range *range) +{ + fld_range_set_type(range, LU_SEQ_RANGE_ANY); +} + +/** + * computes width of given sequence range \a range + */ + +static inline __u64 lu_seq_range_space(const struct lu_seq_range *range) +{ + return range->lsr_end - range->lsr_start; +} + +/** + * initialize range to zero \a range + */ + +static inline void lu_seq_range_init(struct lu_seq_range *range) +{ + memset(range, 0, sizeof(*range)); +} + +/** + * check if given seq id \a s is within given range \a range + */ + +static inline bool lu_seq_range_within(const struct lu_seq_range *range, + __u64 seq) +{ + return seq >= range->lsr_start && seq < range->lsr_end; +} + +/** + * Is the range sane? Is the end after the beginning? \a range + */ + +static inline bool lu_seq_range_is_sane(const struct lu_seq_range *range) +{ + return range->lsr_end >= range->lsr_start; +} + +/** + * Is the range 0? \a range + */ + +static inline bool lu_seq_range_is_zero(const struct lu_seq_range *range) +{ + return range->lsr_start == 0 && range->lsr_end == 0; +} + +/** + * Is the range out of space? \a range + */ + +static inline bool lu_seq_range_is_exhausted(const struct lu_seq_range *range) +{ + return lu_seq_range_space(range) == 0; +} + +/** + * return 0 if two ranges have the same location, nonzero if they are + * different \a r1 \a r2 + */ + +static inline int lu_seq_range_compare_loc(const struct lu_seq_range *r1, + const struct lu_seq_range *r2) +{ + return r1->lsr_index != r2->lsr_index || + r1->lsr_flags != r2->lsr_flags; +} + +#if !defined(__REQ_LAYOUT_USER__) +/** + * byte swap range structure \a range + */ + +void lustre_swab_lu_seq_range(struct lu_seq_range *range); +#endif +/** + * printf string and argument list for sequence range + */ +#define DRANGE "[%#16.16"LPF64"x-%#16.16"LPF64"x):%x:%s" + +#define PRANGE(range) \ + (range)->lsr_start, \ + (range)->lsr_end, \ + (range)->lsr_index, \ + fld_range_is_mdt(range) ? "mdt" : "ost" + +#endif diff --git a/lustre/include/lustre_fld.h b/lustre/include/lustre_fld.h index bc22acf..bc8eb89 100644 --- a/lustre/include/lustre_fld.h +++ b/lustre/include/lustre_fld.h @@ -44,6 +44,7 @@ #include #include +#include struct lu_env; struct lu_client_fld; -- 1.8.3.1