Whamcloud - gitweb
LU-2871 lod: stripe data across the OSTs correctly
authorEmoly Liu <emoly.liu@intel.com>
Wed, 13 Mar 2013 15:51:37 +0000 (23:51 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 15 Mar 2013 05:27:30 +0000 (01:27 -0400)
commit20baff1f7f77b02f629e5f7980807ad151423b3b
treef2d169f90a6f7572af719d2f4fb6203c4723c74b
parent08f093ce2c799faf7a580f53850ecb13d2b71603
LU-2871 lod: stripe data across the OSTs correctly

Since the ost-in-use array is initialized with 0 and isn't set with
OST index number correctly, OST0 is always skipped when allocating
objects on OSTs with specific stripe offset (offset > 0).

For example, when running command "lfs setstripe -c -1 -i 2 testfile"
on 4 OSTs, we will get a wrong layout, like
        obdidx           objid           objid           group
             2               3            0x3                0
             3               3            0x3                0
             1               4            0x4                0
             2               4            0x4                0

To fix the problem, we initialize the array with -1 instead, and store
the correct OST index number in it.

Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: I5eeced6b66ae40771f8896204c5a6ed8e6663e57
Reviewed-on: http://review.whamcloud.com/5554
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
lustre/lod/lod_qos.c
lustre/tests/sanity.sh