[LU-12951] LL_IOC_GETOBDCOUNT return wrong MDT counts Created: 08/Nov/19  Updated: 17/Dec/19  Resolved: 17/Dec/19

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.14.0

Type: Bug Priority: Minor
Reporter: Wang Shilong (Inactive) Assignee: Wang Shilong (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by LU-12975 A lot of "quotactl mdtXX failed" mess... Closed
Related
is related to LU-12378 sanity-quota test 1 fails with 'proje... Resolved
is related to LU-13079 ost-pools test_23a: Some errors happe... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

We used llapi_get_obd_count() to get MDT/OST counts, which call LL_IOC_GETOBDCOUNT
internally.

However, we return lmv->lmv_mdt_descs.ltd_tgts_size as MDT count, this is not right.
@ltd_tgts_size could be larger than actual MDT count, as we preallocate ltd_tgts and resize it if necessary.



 Comments   
Comment by Gerrit Updater [ 08/Nov/19 ]

Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/36713
Subject: LU-12951 LMV: fix to return correct MDT count
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 4531f44834c8492604bcc8e40a9351eba29eda5c

Comment by Sergey Cheremencev [ 15/Nov/19 ]

Hello, found this only after sending a patch from LU-12975.

Suppose to use https://review.whamcloud.com/#/c/36768/ as more general solution.
It is a regression after "LU-12624 obdclass: lu_tgt_descs cleanup" and ltd_tgts_size should be changed not only in one place.
Please take a look at my patch.

Thanks

Sergey

Comment by Sergey Cheremencev [ 18/Nov/19 ]

Lai pointed to problems at proposed patch https://review.whamcloud.com/#/c/36768/.
So, please ignore my previous comment.

Comment by Gerrit Updater [ 17/Dec/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36713/
Subject: LU-12951 lmv: fix to return correct MDT count
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 3aa8826aabc7ceb16ed5efc8606a243684274982

Comment by Peter Jones [ 17/Dec/19 ]

Landed for 2.14

Generated at Sat Feb 10 02:57:04 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.