Whamcloud - gitweb
LU-2681 fld: shrink seq_type in lsr_flags
authorwangdi <di.wang@whamcloud.com>
Fri, 24 Jan 2014 22:31:52 +0000 (14:31 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 11 Apr 2013 19:37:42 +0000 (15:37 -0400)
commitec0c7b569d5a2f25c8ea80f515d2bdc853abc7df
tree4d67abd546524d4d524d334c242a35cac4a494d4
parentcb3a0c7e12c76cbee842beb053a4c2eaa2ea00e6
LU-2681 fld: shrink seq_type in lsr_flags

In lu_seq_range, lsr_flags is treated to only hold LU_SEQ_RANGE_MDT,
LU_SEQ_RANGE_OST or LU_SEQ_RANGE_ANY.  Because they can fit into two
bits, using lsr_flags(32 bits) is clearly unnecessary.

This patch will shrink the current seq_type to 2 bits, so other flags
can be used in lsr_flags in future.  Add wrapper functions to access
and set the flags:

 fld_range_set_mdt(), fld_range_set_ost(), fld_range_set_any()
 fld_range_is_mdt(), fld_range_is_ost(), fld_range_is_any()

If another target type were needed, it could potentially use
LU_SEQ_RANGE_FOO 0x2, which is currently unused.

Signed-off-by: Wang Di <di.wang@intel.com>
Change-Id: I721c9fe5778ee331d3f77ac885f3b482e2322c85
Reviewed-on: http://review.whamcloud.com/5999
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
lustre/fid/fid_request.c
lustre/fld/fld_handler.c
lustre/fld/fld_request.c
lustre/include/lustre/lustre_idl.h
lustre/include/lustre_fld.h
lustre/lod/lod_dev.c
lustre/mdd/mdd_compat.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_oi.c
lustre/osd-zfs/osd_oi.c