Whamcloud - gitweb
LU-4277 lod: handle os_state as a flag, check READONLY 78/8378/2
authorAndreas Dilger <andreas.dilger@intel.com>
Sat, 23 Nov 2013 00:53:43 +0000 (17:53 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 2 Dec 2013 13:25:49 +0000 (13:25 +0000)
commit7b124fef762f5adc4cf5fcf7fa21987655493e19
tree7f1ab3c0fcfdac0990d02e0723f4d5adea0d084d
parent22af4dcd80c3f6fb47080e2d39e6f165f70e7472
LU-4277 lod: handle os_state as a flag, check READONLY

Handle the osfs->os_state values as flags instead of as values.
Otherwise, if an OSD has OS_STATE_DEGRADED and another flag set
it will not match to skip the OST during object allocation.

Similarly, there was no check for the OS_STATE_READONLY flag in
the create path, which should be used to always skip an OST for
object creation until it is cleared.

These flags are not yet set by osd-zfs, only by osd-ldiskfs so far.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I0ef59a9fd631a6942d963e37cfce2bfe183ebbe5
Reviewed-on: http://review.whamcloud.com/8378
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lod/lod_qos.c