Whamcloud - gitweb
LU-11850 lov: migrate completely to lu_tgt_descs API 59/51959/42
authorJames Simmons <jsimmons@infradead.org>
Wed, 5 Mar 2025 19:50:53 +0000 (14:50 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Mar 2025 23:31:49 +0000 (23:31 +0000)
commitf70332330acaff7d52a21700726e7f89a85789b2
treed58050d24e8e89f2216d3c784d26ab64f264cdf7
parent799b533c34f468b3d094bf10453307beed409214
LU-11850 lov: migrate completely to lu_tgt_descs API

The lov target handling was written before the generic lu_tgt
was written. Migrate to this newer API so lov can be treated
the same like lmv and lod. With the changes we have the new
lov_foreach_tgt() macro that tranverses all the registered
targets of total amount ltd->ltd_tgts_size. Also lov_tgt()
was created to extract a target by its index. Internally
a bitmap is used to tell if the tgt has been setup and
ltd->ltd_tgts_size defines the largest possible index.

Another change is that since that largest OST offset that
a striped lustre file can have is 65503 we reduce the
largest index possible for an OST since the last OSTs
could never be used.

Fixes: 1a6ef725c2 ("LU-16938 utils: setstripe overstripe multiple OST count")
Change-Id: If3f53b2a4589f93a024fa026ba377e2175282c29
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51959
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Feng Lei <flei@ddn.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 files changed:
lustre/include/lu_object.h
lustre/include/obd.h
lustre/lod/lod_lov.c
lustre/lov/lov_cl_internal.h
lustre/lov/lov_dev.c
lustre/lov/lov_ea.c
lustre/lov/lov_internal.h
lustre/lov/lov_obd.c
lustre/lov/lov_object.c
lustre/lov/lov_pack.c
lustre/lov/lov_pool.c
lustre/lov/lov_request.c
lustre/lov/lproc_lov.c
lustre/obdclass/lu_tgt_descs.c
lustre/tests/conf-sanity.sh
lustre/utils/liblustreapi.c
lustre/utils/mkfs_lustre.c