Whamcloud - gitweb
LU-7988 hsm: only browse entries of hsd.request when needed 81/19581/15
authorFrank Zago <fzago@cray.com>
Thu, 7 Apr 2016 16:59:52 +0000 (12:59 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 11 Aug 2016 05:50:38 +0000 (05:50 +0000)
commit1a10d9219e966daaf61ea9c42610c22126acd836
tree0aff8210c718159ac8163fe6dd8215a3b1ae6996
parent526ae2f6a383b326da4b7be1623d9fb6563d0d37
LU-7988 hsm: only browse entries of hsd.request when needed

In the coordinator callback, only the entries in hsd.request from 0 to
hsd.request_cnt-1 are used. So use that property instead of walking
the whole array. Consequently, the next entry available in hsd.request
is always at the hsd.request_cnt position, so use it instead of trying
to find an empty slot.

There is no need to reset hsd.request since hsd.request is already
reset in a for loop above. This saves a memset of 16 bytes per
request, each time the arbitor runs.

Test-Parameters: trivial testlist=sanity-hsm
Signed-off-by: frank zago <fzago@cray.com>
Change-Id: I2be0fe5ce918ded028bb260ef345a859b2cc41d4
Reviewed-on: http://review.whamcloud.com/19581
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Vinayak <vinayakswami.hariharmath@seagate.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdt/mdt_coordinator.c