#include <liblustre.h>
#endif
-#include <linux/lustre_net.h>
-#include <linux/obd.h>
-#include <linux/obd_lov.h>
-#include <linux/obd_class.h>
-#include <linux/obd_support.h>
+#include <lustre_net.h>
+#include <obd.h>
+#include <obd_lov.h>
+#include <obd_class.h>
+#include <obd_support.h>
#include <lustre/lustre_user.h>
#include "lov_internal.h"
{
struct lov_ost_data_v1 *lod;
int i;
-
- CDEBUG(level, "objid "LPX64", magic 0x%08X, pattern %#X\n",
+ CDEBUG(level, "objid "LPX64", magic 0x%08x, pattern %#x\n",
le64_to_cpu(lmm->lmm_object_id), le32_to_cpu(lmm->lmm_magic),
le32_to_cpu(lmm->lmm_pattern));
CDEBUG(level,"stripe_size %u, stripe_count %u\n",
RETURN(lmm_size);
}
+/* Find the max stripecount we should use */
int lov_get_stripecnt(struct lov_obd *lov, int stripe_count)
{
if (!stripe_count)
(*lsmp)->lsm_magic = magic;
(*lsmp)->lsm_stripe_count = stripe_count;
(*lsmp)->lsm_maxbytes = LUSTRE_STRIPE_MAXBYTES * stripe_count;
- (*lsmp)->lsm_xfersize = PTLRPC_MAX_BRW_SIZE * stripe_count;
(*lsmp)->lsm_pattern = pattern;
(*lsmp)->lsm_oinfo[0].loi_ost_idx = ~0;
(*lsmp)->lsm_oinfo[0].loi_ost_idx = lum.lmm_stripe_offset;
(*lsmp)->lsm_stripe_size = lum.lmm_stripe_size;
- (*lsmp)->lsm_xfersize = lum.lmm_stripe_size * stripe_count;
RETURN(0);
}
struct lov_obd *lov = &exp->exp_obd->u.lov;
obd_id last_id = 0;
+ ENTRY;
for (i = 0; i < lump->lmm_stripe_count; i++) {
__u32 len = sizeof(last_id);
- oexp = lov->tgts[lump->lmm_objects[i].l_ost_idx].ltd_exp;
+ oexp = lov->lov_tgts[lump->lmm_objects[i].l_ost_idx]->ltd_exp;
rc = obd_get_info(oexp, strlen("last_id"), "last_id",
&len, &last_id);
if (rc)