Whamcloud - gitweb
LU-3083 lmv: swap layout & DNE
authorjcl <jacques-charles.lafoucriere@cea.fr>
Mon, 1 Apr 2013 22:42:01 +0000 (00:42 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 7 Apr 2013 22:55:04 +0000 (18:55 -0400)
If DNE is on, swap layout RPC must be send to the right MDT
and not always to MDT0

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: If57ef688c7628bb15a06e1ba6905d3154a204c8d
Reviewed-on: http://review.whamcloud.com/5912
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
lustre/lmv/lmv_obd.c

index e55f4a0..15aa738 100644 (file)
@@ -947,11 +947,11 @@ static int lmv_iocontrol(unsigned int cmd, struct obd_export *exp,
                if ((tgt1->ltd_exp == NULL) || (tgt2->ltd_exp == NULL))
                        RETURN(-EINVAL);
 
                if ((tgt1->ltd_exp == NULL) || (tgt2->ltd_exp == NULL))
                        RETURN(-EINVAL);
 
-               /* only files on same MDT can be have their layouts swapped */
+               /* only files on same MDT can have their layouts swapped */
                if (tgt1->ltd_idx != tgt2->ltd_idx)
                        RETURN(-EPERM);
 
                if (tgt1->ltd_idx != tgt2->ltd_idx)
                        RETURN(-EPERM);
 
-               rc = obd_iocontrol(cmd, lmv->tgts[0]->ltd_exp, len, karg, uarg);
+               rc = obd_iocontrol(cmd, tgt1->ltd_exp, len, karg, uarg);
                break;
        }
        default:
                break;
        }
        default: