aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/lov
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--drivers/staging/lustre/lustre/lov/Makefile4
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_cl_internal.h6
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_dev.c4
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_ea.c8
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_internal.h8
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_io.c6
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_merge.c31
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_obd.c52
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_offset.c6
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_pack.c12
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_pool.c10
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_request.c43
-rw-r--r--drivers/staging/lustre/lustre/lov/lproc_lov.c8
13 files changed, 95 insertions, 103 deletions
diff --git a/drivers/staging/lustre/lustre/lov/Makefile b/drivers/staging/lustre/lustre/lov/Makefile
index a908edb533d3..6fe56a24b165 100644
--- a/drivers/staging/lustre/lustre/lov/Makefile
+++ b/drivers/staging/lustre/lustre/lov/Makefile
@@ -4,7 +4,3 @@ lov-y := lov_obd.o lov_pack.o lov_offset.o lov_merge.o \
lov_lock.o lov_io.o lovsub_dev.o lovsub_object.o lovsub_page.o \
lovsub_lock.o lovsub_io.o lov_pool.o
lov-$(CONFIG_PROC_FS) += lproc_lov.o
-
-
-
-ccflags-y := -I$(src)/../include
diff --git a/drivers/staging/lustre/lustre/lov/lov_cl_internal.h b/drivers/staging/lustre/lustre/lov/lov_cl_internal.h
index 3965d5e4e725..99ade92c5e64 100644
--- a/drivers/staging/lustre/lustre/lov/lov_cl_internal.h
+++ b/drivers/staging/lustre/lustre/lov/lov_cl_internal.h
@@ -46,10 +46,10 @@
#ifndef LOV_CL_INTERNAL_H
#define LOV_CL_INTERNAL_H
-# include <linux/libcfs/libcfs.h>
+#include "../../include/linux/libcfs/libcfs.h"
-#include <obd.h>
-#include <cl_object.h>
+#include "../include/obd.h"
+#include "../include/cl_object.h"
#include "lov_internal.h"
/** \defgroup lov lov
diff --git a/drivers/staging/lustre/lustre/lov/lov_dev.c b/drivers/staging/lustre/lustre/lov/lov_dev.c
index 53e5781ba1d9..796a015d070c 100644
--- a/drivers/staging/lustre/lustre/lov/lov_dev.c
+++ b/drivers/staging/lustre/lustre/lov/lov_dev.c
@@ -41,7 +41,7 @@
#define DEBUG_SUBSYSTEM S_LOV
/* class_name2obd() */
-#include <obd_class.h>
+#include "../include/obd_class.h"
#include "lov_cl_internal.h"
#include "lov_internal.h"
@@ -453,7 +453,7 @@ static int lov_process_config(const struct lu_env *env,
case LCFG_LOV_ADD_INA:
rc = lov_cl_add_target(env, d, index);
if (rc != 0)
- lov_del_target(d->ld_obd, index, 0, 0);
+ lov_del_target(d->ld_obd, index, NULL, 0);
break;
case LCFG_LOV_DEL_OBD:
lov_cl_del_target(env, d, index);
diff --git a/drivers/staging/lustre/lustre/lov/lov_ea.c b/drivers/staging/lustre/lustre/lov/lov_ea.c
index a0c148e31f69..2401ca872507 100644
--- a/drivers/staging/lustre/lustre/lov/lov_ea.c
+++ b/drivers/staging/lustre/lustre/lov/lov_ea.c
@@ -41,10 +41,10 @@
#define DEBUG_SUBSYSTEM S_LOV
#include <asm/div64.h>
-#include <linux/libcfs/libcfs.h>
+#include "../../include/linux/libcfs/libcfs.h"
-#include <obd_class.h>
-#include <lustre/lustre_idl.h>
+#include "../include/obd_class.h"
+#include "../include/lustre/lustre_idl.h"
#include "lov_internal.h"
@@ -348,7 +348,7 @@ const struct lsm_operations lsm_v3_ops = {
void dump_lsm(unsigned int level, const struct lov_stripe_md *lsm)
{
- CDEBUG(level, "lsm %p, objid "DOSTID", maxbytes "LPX64", magic 0x%08X,"
+ CDEBUG(level, "lsm %p, objid "DOSTID", maxbytes %#llx, 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,
diff --git a/drivers/staging/lustre/lustre/lov/lov_internal.h b/drivers/staging/lustre/lustre/lov/lov_internal.h
index 38508a5c827f..017961a5cc3e 100644
--- a/drivers/staging/lustre/lustre/lov/lov_internal.h
+++ b/drivers/staging/lustre/lustre/lov/lov_internal.h
@@ -37,8 +37,8 @@
#ifndef LOV_INTERNAL_H
#define LOV_INTERNAL_H
-#include <obd_class.h>
-#include <lustre/lustre_user.h>
+#include "../include/obd_class.h"
+#include "../include/lustre/lustre_user.h"
/* 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
@@ -252,7 +252,7 @@ int lov_prep_match_set(struct obd_export *exp, struct obd_info *oinfo,
ldlm_policy_data_t *policy, __u32 mode,
struct lustre_handle *lockh,
struct lov_request_set **reqset);
-int lov_fini_match_set(struct lov_request_set *set, __u32 mode, int flags);
+int lov_fini_match_set(struct lov_request_set *set, __u32 mode, __u64 flags);
int lov_prep_cancel_set(struct obd_export *exp, struct obd_info *oinfo,
struct lov_stripe_md *lsm,
__u32 mode, struct lustre_handle *lockh,
@@ -310,7 +310,7 @@ void dump_lsm(unsigned int level, const struct lov_stripe_md *lsm);
int lovea_destroy_object(struct lov_obd *lov, struct lov_stripe_md *lsm,
struct obdo *oa, void *data);
/* lproc_lov.c */
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
extern const struct file_operations lov_proc_target_fops;
void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars);
#else
diff --git a/drivers/staging/lustre/lustre/lov/lov_io.c b/drivers/staging/lustre/lustre/lov/lov_io.c
index 65133ea308b6..ce074c54a003 100644
--- a/drivers/staging/lustre/lustre/lov/lov_io.c
+++ b/drivers/staging/lustre/lustre/lov/lov_io.c
@@ -398,7 +398,7 @@ static int lov_io_iter_init(const struct lu_env *env,
start, end);
rc = cl_io_iter_init(sub->sub_env, sub->sub_io);
lov_sub_put(sub);
- CDEBUG(D_VFSTRACE, "shrink: %d ["LPU64", "LPU64")\n",
+ CDEBUG(D_VFSTRACE, "shrink: %d [%llu, %llu)\n",
stripe, start, end);
} else
rc = PTR_ERR(sub);
@@ -436,8 +436,8 @@ static int lov_io_rw_iter_init(const struct lu_env *env,
next) - io->u.ci_rw.crw_pos;
lio->lis_pos = io->u.ci_rw.crw_pos;
lio->lis_endpos = io->u.ci_rw.crw_pos + io->u.ci_rw.crw_count;
- CDEBUG(D_VFSTRACE, "stripe: "LPU64" chunk: ["LPU64", "LPU64") "
- LPU64"\n", (__u64)start, lio->lis_pos, lio->lis_endpos,
+ CDEBUG(D_VFSTRACE, "stripe: %llu chunk: [%llu, %llu) %llu\n",
+ (__u64)start, lio->lis_pos, lio->lis_endpos,
(__u64)lio->lis_io_endpos);
}
/*
diff --git a/drivers/staging/lustre/lustre/lov/lov_merge.c b/drivers/staging/lustre/lustre/lov/lov_merge.c
index da959e901371..85144b8da96d 100644
--- a/drivers/staging/lustre/lustre/lov/lov_merge.c
+++ b/drivers/staging/lustre/lustre/lov/lov_merge.c
@@ -36,9 +36,9 @@
#define DEBUG_SUBSYSTEM S_LOV
-#include <linux/libcfs/libcfs.h>
+#include "../../include/linux/libcfs/libcfs.h"
-#include <obd_class.h>
+#include "../include/obd_class.h"
#include "lov_internal.h"
/** Merge the lock value block(&lvb) attributes and KMS from each of the
@@ -61,10 +61,9 @@ int lov_merge_lvb_kms(struct lov_stripe_md *lsm,
assert_spin_locked(&lsm->lsm_lock);
LASSERT(lsm->lsm_lock_owner == current_pid());
- CDEBUG(D_INODE, "MDT ID "DOSTID" initial value: s="LPU64" m="LPU64
- " a="LPU64" c="LPU64" b="LPU64"\n", POSTID(&lsm->lsm_oi),
- lvb->lvb_size, lvb->lvb_mtime, lvb->lvb_atime, lvb->lvb_ctime,
- lvb->lvb_blocks);
+ CDEBUG(D_INODE, "MDT ID "DOSTID" initial value: s=%llu m=%llu a=%llu c=%llu b=%llu\n",
+ POSTID(&lsm->lsm_oi), lvb->lvb_size, lvb->lvb_mtime,
+ lvb->lvb_atime, lvb->lvb_ctime, lvb->lvb_blocks);
for (i = 0; i < lsm->lsm_stripe_count; i++) {
struct lov_oinfo *loi = lsm->lsm_oinfo[i];
obd_size lov_size, tmpsize;
@@ -94,11 +93,11 @@ int lov_merge_lvb_kms(struct lov_stripe_md *lsm,
if (loi->loi_lvb.lvb_ctime > current_ctime)
current_ctime = loi->loi_lvb.lvb_ctime;
- CDEBUG(D_INODE, "MDT ID "DOSTID" on OST[%u]: s="LPU64" m="LPU64
- " a="LPU64" c="LPU64" b="LPU64"\n", POSTID(&lsm->lsm_oi),
- loi->loi_ost_idx, loi->loi_lvb.lvb_size,
- loi->loi_lvb.lvb_mtime, loi->loi_lvb.lvb_atime,
- loi->loi_lvb.lvb_ctime, loi->loi_lvb.lvb_blocks);
+ CDEBUG(D_INODE, "MDT ID "DOSTID" on OST[%u]: s=%llu m=%llu a=%llu c=%llu b=%llu\n",
+ POSTID(&lsm->lsm_oi), loi->loi_ost_idx,
+ loi->loi_lvb.lvb_size, loi->loi_lvb.lvb_mtime,
+ loi->loi_lvb.lvb_atime, loi->loi_lvb.lvb_ctime,
+ loi->loi_lvb.lvb_blocks);
}
*kms_place = kms;
@@ -131,9 +130,9 @@ int lov_merge_lvb(struct obd_export *exp,
if (kms_only)
lvb->lvb_size = kms;
- CDEBUG(D_INODE, "merged for ID "DOSTID" s="LPU64" m="LPU64" a="LPU64
- " c="LPU64" b="LPU64"\n", POSTID(&lsm->lsm_oi), lvb->lvb_size,
- lvb->lvb_mtime, lvb->lvb_atime, lvb->lvb_ctime, lvb->lvb_blocks);
+ CDEBUG(D_INODE, "merged for ID "DOSTID" s=%llu m=%llu a=%llu c=%llu b=%llu\n",
+ POSTID(&lsm->lsm_oi), lvb->lvb_size, lvb->lvb_mtime,
+ lvb->lvb_atime, lvb->lvb_ctime, lvb->lvb_blocks);
return rc;
}
@@ -153,7 +152,7 @@ int lov_adjust_kms(struct obd_export *exp, struct lov_stripe_md *lsm,
struct lov_oinfo *loi = lsm->lsm_oinfo[stripe];
kms = lov_size_to_stripe(lsm, size, stripe);
CDEBUG(D_INODE,
- "stripe %d KMS %sing "LPU64"->"LPU64"\n",
+ "stripe %d KMS %sing %llu->%llu\n",
stripe, kms > loi->loi_kms ? "increase":"shrink",
loi->loi_kms, kms);
loi_kms_set(loi, loi->loi_lvb.lvb_size = kms);
@@ -166,7 +165,7 @@ int lov_adjust_kms(struct obd_export *exp, struct lov_stripe_md *lsm,
kms = lov_size_to_stripe(lsm, size, stripe);
loi = lsm->lsm_oinfo[stripe];
- CDEBUG(D_INODE, "stripe %d KMS %sincreasing "LPU64"->"LPU64"\n",
+ CDEBUG(D_INODE, "stripe %d KMS %sincreasing %llu->%llu\n",
stripe, kms > loi->loi_kms ? "" : "not ", loi->loi_kms, kms);
if (kms > loi->loi_kms)
loi_kms_set(loi, kms);
diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c
index 2d843b1c1ded..e4f4fe3f71c7 100644
--- a/drivers/staging/lustre/lustre/lov/lov_obd.c
+++ b/drivers/staging/lustre/lustre/lov/lov_obd.c
@@ -42,22 +42,22 @@
*/
#define DEBUG_SUBSYSTEM S_LOV
-#include <linux/libcfs/libcfs.h>
-
-#include <obd_support.h>
-#include <lustre_lib.h>
-#include <lustre_net.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_dlm.h>
-#include <lustre_mds.h>
-#include <obd_class.h>
-#include <obd_ost.h>
-#include <lprocfs_status.h>
-#include <lustre_param.h>
-#include <cl_object.h>
-#include <lclient.h> /* for cl_client_lru */
-#include <lustre/ll_fiemap.h>
-#include <lustre_fid.h>
+#include "../../include/linux/libcfs/libcfs.h"
+
+#include "../include/obd_support.h"
+#include "../include/lustre_lib.h"
+#include "../include/lustre_net.h"
+#include "../include/lustre/lustre_idl.h"
+#include "../include/lustre_dlm.h"
+#include "../include/lustre_mds.h"
+#include "../include/obd_class.h"
+#include "../include/obd_ost.h"
+#include "../include/lprocfs_status.h"
+#include "../include/lustre_param.h"
+#include "../include/cl_object.h"
+#include "../include/lclient.h" /* for cl_client_lru */
+#include "../include/lustre/ll_fiemap.h"
+#include "../include/lustre_fid.h"
#include "lov_internal.h"
@@ -382,7 +382,7 @@ static int lov_set_osc_active(struct obd_device *obd, struct obd_uuid *uuid,
if (!tgt->ltd_exp)
continue;
- CDEBUG(D_INFO, "lov idx %d is %s conn "LPX64"\n",
+ CDEBUG(D_INFO, "lov idx %d is %s conn %#llx\n",
index, obd_uuid2str(&tgt->ltd_uuid),
tgt->ltd_exp->exp_handle.h_cookie);
if (obd_uuid_equals(uuid, &tgt->ltd_uuid))
@@ -727,8 +727,7 @@ void lov_fix_desc_stripe_size(__u64 *val)
*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 "
- "multiple of %u)\n",
+ LCONSOLE_WARN("Changing default stripe size to %llu (a multiple of %u)\n",
*val, LOV_MIN_STRIPE_SIZE);
}
}
@@ -821,7 +820,7 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
lprocfs_lov_init_vars(&lvars);
lprocfs_obd_setup(obd, lvars.obd_vars);
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
{
int rc1;
@@ -900,7 +899,7 @@ static int lov_cleanup(struct obd_device *obd)
" deathrow=%d, lovrc=%d\n",
i, lov->lov_death_row,
atomic_read(&lov->lov_refcount));
- lov_del_target(obd, i, 0, 0);
+ lov_del_target(obd, i, NULL, 0);
}
obd_putref(obd);
OBD_FREE(lov->lov_tgts, sizeof(*lov->lov_tgts) *
@@ -944,7 +943,7 @@ int lov_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg,
GOTO(out, rc);
}
case LCFG_PARAM: {
- struct lprocfs_static_vars lvars = { 0 };
+ struct lprocfs_static_vars lvars = { NULL };
struct lov_desc *desc = &(obd->u.lov.desc);
if (!desc)
@@ -1463,7 +1462,7 @@ static int lov_sync(const struct lu_env *env, struct obd_export *exp,
if (rc)
return rc;
- CDEBUG(D_INFO, "fsync objid "DOSTID" ["LPX64", "LPX64"]\n",
+ CDEBUG(D_INFO, "fsync objid "DOSTID" [%#llx, %#llx]\n",
POSTID(&set->set_oi->oi_oa->o_oi), start, end);
list_for_each(pos, &set->set_list) {
@@ -2636,9 +2635,8 @@ static int lov_extent_calc(struct obd_export *exp, struct lov_stripe_md *lsm,
lov_do_div64(start, ssize);
start = start * ssize;
- CDEBUG(D_DLMTRACE, "offset "LPU64", stripe %u, start "LPU64
- ", end "LPU64"\n", *offset, ssize, start,
- start + ssize - 1);
+ CDEBUG(D_DLMTRACE, "offset %llu, stripe %u, start %llu, end %llu\n",
+ *offset, ssize, start, start + ssize - 1);
if (cmd == OBD_CALC_STRIPE_END) {
*offset = start + ssize - 1;
} else if (cmd == OBD_CALC_STRIPE_START) {
@@ -2818,7 +2816,7 @@ struct kmem_cache *lov_oinfo_slab;
int __init lov_init(void)
{
- struct lprocfs_static_vars lvars = { 0 };
+ struct lprocfs_static_vars lvars = { NULL };
int rc;
/* print an address of _any_ initialized kernel symbol from this
diff --git a/drivers/staging/lustre/lustre/lov/lov_offset.c b/drivers/staging/lustre/lustre/lov/lov_offset.c
index 379568f8245c..8e1c3bacc0a0 100644
--- a/drivers/staging/lustre/lustre/lov/lov_offset.c
+++ b/drivers/staging/lustre/lustre/lov/lov_offset.c
@@ -36,9 +36,9 @@
#define DEBUG_SUBSYSTEM S_LOV
-#include <linux/libcfs/libcfs.h>
+#include "../../include/linux/libcfs/libcfs.h"
-#include <obd_class.h>
+#include "../include/obd_class.h"
#include "lov_internal.h"
@@ -223,7 +223,7 @@ int lov_stripe_intersects(struct lov_stripe_md *lsm, int stripeno,
start_side = lov_stripe_offset(lsm, start, stripeno, obd_start);
end_side = lov_stripe_offset(lsm, end, stripeno, obd_end);
- CDEBUG(D_INODE, "["LPU64"->"LPU64"] -> [(%d) "LPU64"->"LPU64" (%d)]\n",
+ CDEBUG(D_INODE, "[%llu->%llu] -> [(%d) %llu->%llu (%d)]\n",
start, end, start_side, *obd_start, *obd_end, end_side);
/* this stripe doesn't intersect the file extent when neither
diff --git a/drivers/staging/lustre/lustre/lov/lov_pack.c b/drivers/staging/lustre/lustre/lov/lov_pack.c
index 59ab7c30ffbf..a5b190f32c0f 100644
--- a/drivers/staging/lustre/lustre/lov/lov_pack.c
+++ b/drivers/staging/lustre/lustre/lov/lov_pack.c
@@ -42,11 +42,11 @@
#define DEBUG_SUBSYSTEM S_LOV
-#include <lustre_net.h>
-#include <obd.h>
-#include <obd_class.h>
-#include <obd_support.h>
-#include <lustre/lustre_user.h>
+#include "../include/lustre_net.h"
+#include "../include/obd.h"
+#include "../include/obd_class.h"
+#include "../include/obd_support.h"
+#include "../include/lustre/lustre_user.h"
#include "lov_internal.h"
@@ -555,7 +555,7 @@ int lov_setea(struct obd_export *exp, struct lov_stripe_md **lsmp,
return rc;
if (ostid_id(&lmm_objects[i].l_ost_oi) > last_id) {
CERROR("Setting EA for object > than last id on"
- " ost idx %d "DOSTID" > "LPD64" \n",
+ " ost idx %d "DOSTID" > %lld \n",
lmm_objects[i].l_ost_idx,
POSTID(&lmm_objects[i].l_ost_oi), last_id);
return -EINVAL;
diff --git a/drivers/staging/lustre/lustre/lov/lov_pool.c b/drivers/staging/lustre/lustre/lov/lov_pool.c
index 3bda0c1f3c19..91b3509a8083 100644
--- a/drivers/staging/lustre/lustre/lov/lov_pool.c
+++ b/drivers/staging/lustre/lustre/lov/lov_pool.c
@@ -44,9 +44,9 @@
#define DEBUG_SUBSYSTEM S_LOV
-#include <linux/libcfs/libcfs.h>
+#include "../../include/linux/libcfs/libcfs.h"
-#include <obd.h>
+#include "../include/obd.h"
#include "lov_internal.h"
#define pool_tgt(_p, _i) \
@@ -152,7 +152,7 @@ cfs_hash_ops_t pool_hash_operations = {
};
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
/* ifdef needed for liblustre support */
/*
* pool /proc seq_file methods
@@ -294,7 +294,7 @@ static struct file_operations pool_proc_operations = {
.llseek = seq_lseek,
.release = seq_release,
};
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
void lov_dump_pool(int level, struct pool_desc *pool)
{
@@ -452,7 +452,7 @@ int lov_pool_new(struct obd_device *obd, char *poolname)
INIT_HLIST_NODE(&new_pool->pool_hash);
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
/* we need this assert seq_file is not implemented for liblustre */
/* get ref for /proc file */
lov_pool_getref(new_pool);
diff --git a/drivers/staging/lustre/lustre/lov/lov_request.c b/drivers/staging/lustre/lustre/lov/lov_request.c
index bd6490d0129c..e4bb02a54b0d 100644
--- a/drivers/staging/lustre/lustre/lov/lov_request.c
+++ b/drivers/staging/lustre/lustre/lov/lov_request.c
@@ -36,11 +36,11 @@
#define DEBUG_SUBSYSTEM S_LOV
-#include <linux/libcfs/libcfs.h>
-
-#include <obd_class.h>
-#include <lustre/lustre_idl.h>
+#include "../../include/linux/libcfs/libcfs.h"
+#include "../include/obd_class.h"
+#include "../include/obd_ost.h"
+#include "../include/lustre/lustre_idl.h"
#include "lov_internal.h"
static void lov_init_set(struct lov_request_set *set)
@@ -140,16 +140,16 @@ void lov_set_add_req(struct lov_request *req, struct lov_request_set *set)
static int lov_check_set(struct lov_obd *lov, int idx)
{
- int rc = 0;
- mutex_lock(&lov->lov_lock);
-
- if (lov->lov_tgts[idx] == NULL ||
- lov->lov_tgts[idx]->ltd_active ||
- (lov->lov_tgts[idx]->ltd_exp != NULL &&
- class_exp2cliimp(lov->lov_tgts[idx]->ltd_exp)->imp_connect_tried))
- rc = 1;
+ int rc;
+ struct lov_tgt_desc *tgt;
+ mutex_lock(&lov->lov_lock);
+ tgt = lov->lov_tgts[idx];
+ rc = !tgt || tgt->ltd_active ||
+ (tgt->ltd_exp &&
+ class_exp2cliimp(tgt->ltd_exp)->imp_connect_tried);
mutex_unlock(&lov->lov_lock);
+
return rc;
}
@@ -194,13 +194,9 @@ out:
return rc;
}
-extern void osc_update_enqueue(struct lustre_handle *lov_lockhp,
- struct lov_oinfo *loi, int flags,
- struct ost_lvb *lvb, __u32 mode, int rc);
-
static int lov_update_enqueue_lov(struct obd_export *exp,
struct lustre_handle *lov_lockhp,
- struct lov_oinfo *loi, int flags, int idx,
+ struct lov_oinfo *loi, __u64 flags, int idx,
struct ost_id *oi, int rc)
{
struct lov_obd *lov = &exp->exp_obd->u.lov;
@@ -443,7 +439,7 @@ out_set:
return rc;
}
-int lov_fini_match_set(struct lov_request_set *set, __u32 mode, int flags)
+int lov_fini_match_set(struct lov_request_set *set, __u32 mode, __u64 flags)
{
int rc = 0;
@@ -482,7 +478,7 @@ int lov_prep_match_set(struct obd_export *exp, struct obd_info *oinfo,
GOTO(out_set, rc = -ENOMEM);
lockh->cookie = set->set_lockh->llh_handle.h_cookie;
- for (i = 0; i < lsm->lsm_stripe_count; i++){
+ for (i = 0; i < lsm->lsm_stripe_count; i++) {
struct lov_oinfo *loi;
struct lov_request *req;
obd_off start, end;
@@ -570,7 +566,7 @@ int lov_prep_cancel_set(struct obd_export *exp, struct obd_info *oinfo,
}
lockh->cookie = set->set_lockh->llh_handle.h_cookie;
- for (i = 0; i < lsm->lsm_stripe_count; i++){
+ for (i = 0; i < lsm->lsm_stripe_count; i++) {
struct lov_request *req;
struct lustre_handle *lov_lockhp;
struct lov_oinfo *loi = lsm->lsm_oinfo[i];
@@ -738,7 +734,7 @@ int lov_prep_brw_set(struct obd_export *exp, struct obd_info *oinfo,
/* alloc and initialize lov request */
shift = 0;
- for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++){
+ for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) {
struct lov_oinfo *loi = NULL;
struct lov_request *req;
@@ -840,6 +836,7 @@ static int cb_getattr_update(void *cookie, int rc)
{
struct obd_info *oinfo = cookie;
struct lov_request *lovreq;
+
lovreq = container_of(oinfo, struct lov_request, rq_oi);
return lov_update_common_set(lovreq->rq_rqset, lovreq, rc);
}
@@ -1022,6 +1019,7 @@ static int cb_setattr_update(void *cookie, int rc)
{
struct obd_info *oinfo = cookie;
struct lov_request *lovreq;
+
lovreq = container_of(oinfo, struct lov_request, rq_oi);
return lov_update_setattr_set(lovreq->rq_rqset, lovreq, rc);
}
@@ -1080,7 +1078,7 @@ int lov_prep_setattr_set(struct obd_export *exp, struct obd_info *oinfo,
if (off < 0 && req->rq_oi.oi_oa->o_size)
req->rq_oi.oi_oa->o_size--;
- CDEBUG(D_INODE, "stripe %d has size "LPU64"/"LPU64"\n",
+ CDEBUG(D_INODE, "stripe %d has size %llu/%llu\n",
i, req->rq_oi.oi_oa->o_size,
oinfo->oi_oa->o_size);
}
@@ -1145,6 +1143,7 @@ static int cb_update_punch(void *cookie, int rc)
{
struct obd_info *oinfo = cookie;
struct lov_request *lovreq;
+
lovreq = container_of(oinfo, struct lov_request, rq_oi);
return lov_update_punch_set(lovreq->rq_rqset, lovreq, rc);
}
diff --git a/drivers/staging/lustre/lustre/lov/lproc_lov.c b/drivers/staging/lustre/lustre/lov/lproc_lov.c
index bd7da56b0713..c993f25fb303 100644
--- a/drivers/staging/lustre/lustre/lov/lproc_lov.c
+++ b/drivers/staging/lustre/lustre/lov/lproc_lov.c
@@ -36,8 +36,8 @@
#define DEBUG_SUBSYSTEM S_CLASS
#include <asm/statfs.h>
-#include <lprocfs_status.h>
-#include <obd_class.h>
+#include "../include/lprocfs_status.h"
+#include "../include/obd_class.h"
#include <linux/seq_file.h>
#include "lov_internal.h"
@@ -48,7 +48,7 @@ static int lov_stripesize_seq_show(struct seq_file *m, void *v)
LASSERT(dev != NULL);
desc = &dev->u.lov.desc;
- return seq_printf(m, LPU64"\n", desc->ld_default_stripe_size);
+ return seq_printf(m, "%llu\n", desc->ld_default_stripe_size);
}
static ssize_t lov_stripesize_seq_write(struct file *file, const char *buffer,
@@ -78,7 +78,7 @@ static int lov_stripeoffset_seq_show(struct seq_file *m, void *v)
LASSERT(dev != NULL);
desc = &dev->u.lov.desc;
- return seq_printf(m, LPU64"\n", desc->ld_default_stripe_offset);
+ return seq_printf(m, "%llu\n", desc->ld_default_stripe_offset);
}
static ssize_t lov_stripeoffset_seq_write(struct file *file, const char *buffer,