From 4bf9f7bbbfcd897bc9674edda700d182d9576b7f Mon Sep 17 00:00:00 2001 From: tappro Date: Fri, 23 Jun 2006 20:15:35 +0000 Subject: [PATCH] root_get() makes sense only on master MDS --- lustre/cmm/cmm_device.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lustre/cmm/cmm_device.c b/lustre/cmm/cmm_device.c index 9e8c87a..123770a 100644 --- a/lustre/cmm/cmm_device.c +++ b/lustre/cmm/cmm_device.c @@ -58,9 +58,12 @@ static int cmm_root_get(const struct lu_context *ctx, struct md_device *md, struct lu_fid *fid) { struct cmm_device *cmm_dev = md2cmm_dev(md); - - return cmm_child_ops(cmm_dev)->mdo_root_get(ctx, + /* valid only on master MDS */ + if (cmm_dev->cmm_local_num == 0) + return cmm_child_ops(cmm_dev)->mdo_root_get(ctx, cmm_dev->cmm_child, fid); + else + return -EINVAL; } static int cmm_statfs(const struct lu_context *ctxt, struct md_device *md, -- 1.8.3.1