Whamcloud - gitweb
LU-2960 lmv: typo fix for output of "lfs mdts"
authorwangdi <di.wang@whamcloud.com>
Thu, 2 Jan 2014 09:10:05 +0000 (01:10 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 25 Mar 2013 18:13:38 +0000 (14:13 -0400)
Using ltd_idx(in lmv_tgt_descs) directly for the output of
lctl get_params lustre.lmv.*-clilmv-*.target_obd.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I6a4ff4b82e4d413baf1f36f85764d3c11cd82435
Reviewed-on: http://review.whamcloud.com/5782
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/lmv/lproc_lmv.c

index 65d1bd2..bde45c6 100644 (file)
@@ -179,14 +179,11 @@ static void *lmv_tgt_seq_next(struct seq_file *p, void *v, loff_t *pos)
 static int lmv_tgt_seq_show(struct seq_file *p, void *v)
 {
        struct lmv_tgt_desc     *tgt = v;
-       struct obd_device       *dev = p->private;
-       struct lmv_obd          *lmv = &dev->u.lmv;
-       int                      idx = tgt - lmv->tgts[0];
 
        if (tgt == NULL)
                return 0;
-       return seq_printf(p, "%d: %s %sACTIVE\n", idx, tgt->ltd_uuid.uuid,
-                         tgt->ltd_active ? "" : "IN");
+       return seq_printf(p, "%d: %s %sACTIVE\n", tgt->ltd_idx,
+                         tgt->ltd_uuid.uuid, tgt->ltd_active ? "" : "IN");
 }
 
 struct seq_operations lmv_tgt_sops = {