Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-3069 build: fix 'integer handling' issues
[fs/lustre-release.git]
/
lustre
/
lod
/
lod_dev.c
diff --git
a/lustre/lod/lod_dev.c
b/lustre/lod/lod_dev.c
index
5d8f5fe
..
2315222
100644
(file)
--- a/
lustre/lod/lod_dev.c
+++ b/
lustre/lod/lod_dev.c
@@
-23,7
+23,7
@@
* Copyright 2009 Sun Microsystems, Inc. All rights reserved
* Use is subject to license terms.
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved
* Use is subject to license terms.
*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012,
2013,
Intel Corporation.
*
*/
/*
*
*/
/*
@@
-38,12
+38,10
@@
* Author: Mikhail Pershin <mike.pershin@intel.com>
*/
* Author: Mikhail Pershin <mike.pershin@intel.com>
*/
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
#define DEBUG_SUBSYSTEM S_MDS
#include <obd_class.h>
#define DEBUG_SUBSYSTEM S_MDS
#include <obd_class.h>
+#include <md_object.h>
#include <lustre_fid.h>
#include <lustre_param.h>
#include <lustre_update.h>
#include <lustre_fid.h>
#include <lustre_param.h>
#include <lustre_update.h>
@@
-56,12
+54,12
@@
* \param lod LOD to be lookup at.
* \param fid FID of object to find MDT/OST.
* \param tgt MDT/OST index to return.
* \param lod LOD to be lookup at.
* \param fid FID of object to find MDT/OST.
* \param tgt MDT/OST index to return.
- * \param
flags
indidcate the FID is on MDS or OST.
+ * \param
type
indidcate the FID is on MDS or OST.
**/
int lod_fld_lookup(const struct lu_env *env, struct lod_device *lod,
**/
int lod_fld_lookup(const struct lu_env *env, struct lod_device *lod,
- const struct lu_fid *fid, __u32 *tgt, int
flags
)
+ const struct lu_fid *fid, __u32 *tgt, int
type
)
{
{
- struct lu_seq_range range;
+ struct lu_seq_range range
= { 0 }
;
struct lu_server_fld *server_fld;
int rc = 0;
ENTRY;
struct lu_server_fld *server_fld;
int rc = 0;
ENTRY;
@@
-72,20
+70,17
@@
int lod_fld_lookup(const struct lu_env *env, struct lod_device *lod,
RETURN(rc);
}
RETURN(rc);
}
- if (!lod->lod_initialized ||
!fid_is_norm(fid
)) {
+ if (!lod->lod_initialized ||
(!fid_seq_in_fldb(fid_seq(fid))
)) {
LASSERT(lu_site2seq(lod2lu_dev(lod)->ld_site) != NULL);
*tgt = lu_site2seq(lod2lu_dev(lod)->ld_site)->ss_node_id;
RETURN(rc);
}
server_fld = lu_site2seq(lod2lu_dev(lod)->ld_site)->ss_server_fld;
LASSERT(lu_site2seq(lod2lu_dev(lod)->ld_site) != NULL);
*tgt = lu_site2seq(lod2lu_dev(lod)->ld_site)->ss_node_id;
RETURN(rc);
}
server_fld = lu_site2seq(lod2lu_dev(lod)->ld_site)->ss_server_fld;
-
range.lsr_flags = flags
;
+
fld_range_set_type(&range, type)
;
rc = fld_server_lookup(env, server_fld, fid_seq(fid), &range);
rc = fld_server_lookup(env, server_fld, fid_seq(fid), &range);
- if (rc) {
- CERROR("%s: Can't find tgt by seq "LPX64", rc %d\n",
- lod2obd(lod)->obd_name, fid_seq(fid), rc);
+ if (rc)
RETURN(rc);
RETURN(rc);
- }
*tgt = range.lsr_index;
*tgt = range.lsr_index;
@@
-100,7
+95,7
@@
extern struct lu_object_operations lod_lu_robj_ops;
extern struct dt_object_operations lod_obj_ops;
/* Slab for OSD object allocation */
extern struct dt_object_operations lod_obj_ops;
/* Slab for OSD object allocation */
-
cfs_mem_cache_t
*lod_object_kmem;
+
struct kmem_cache
*lod_object_kmem;
static struct lu_kmem_descr lod_caches[] = {
{
static struct lu_kmem_descr lod_caches[] = {
{
@@
-127,7
+122,7
@@
struct lu_object *lod_object_alloc(const struct lu_env *env,
int rc = 0;
ENTRY;
int rc = 0;
ENTRY;
- OBD_SLAB_ALLOC_PTR_GFP(lod_obj, lod_object_kmem,
CFS_ALLOC
_IO);
+ OBD_SLAB_ALLOC_PTR_GFP(lod_obj, lod_object_kmem,
__GFP
_IO);
if (lod_obj == NULL)
RETURN(ERR_PTR(-ENOMEM));
if (lod_obj == NULL)
RETURN(ERR_PTR(-ENOMEM));
@@
-181,7
+176,7
@@
static int lod_cleanup_desc_tgts(const struct lu_env *env,
return rc;
}
return rc;
}
-static int lodname2mdt_index(char *lodname,
int
*index)
+static int lodname2mdt_index(char *lodname,
long
*index)
{
char *ptr, *tmp;
{
char *ptr, *tmp;
@@
-365,10
+360,13
@@
static int lod_process_config(const struct lu_env *env,
if (mdt == NULL) {
mdt_index = 0;
} else {
if (mdt == NULL) {
mdt_index = 0;
} else {
+ long long_index;
rc = lodname2mdt_index(
rc = lodname2mdt_index(
- lustre_cfg_string(lcfg, 0), &mdt_index);
+ lustre_cfg_string(lcfg, 0),
+ &long_index);
if (rc != 0)
GOTO(out, rc);
if (rc != 0)
GOTO(out, rc);
+ mdt_index = long_index;
}
rc = lod_add_device(env, lod, arg1, index, gen,
mdt_index, LUSTRE_OSC_NAME, 1);
}
rc = lod_add_device(env, lod, arg1, index, gen,
mdt_index, LUSTRE_OSC_NAME, 1);