From fdad21e286a7eb22154d70a3d0670e5dd33ab275 Mon Sep 17 00:00:00 2001 From: tappro Date: Fri, 12 May 2006 09:32:33 +0000 Subject: [PATCH] lmv_placement_policy creates new dir on another MDS --- lustre/lmv/lmv_obd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index 4573ba9..419320e 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -651,6 +651,7 @@ static int lmv_fids_balanced(struct obd_device *obd) static int lmv_placment_policy(struct obd_device *obd, struct placement_hint *hint) { + struct lmv_obd *lmv = &obd->u.lmv; ENTRY; /* here are some policies to allocate new fid */ @@ -662,7 +663,10 @@ static int lmv_placment_policy(struct obd_device *obd, /* sequences among all tgts are not well balanced, allocate new * fid taking this into account to balance them. */ } - + //stub to place new dir on second MDS + if (hint->ph_opc == LUSTRE_OPC_MKDIR) + RETURN(lmv->desc.ld_tgt_count - 1); + RETURN(0); } -- 1.8.3.1