[LU-4961] utils and test should not depend on obd.h or liblustre.h Created: 25/Apr/14  Updated: 31/Jan/22  Resolved: 09/May/14

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.6.0

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: RoDC

Issue Links:
Related
is related to LU-1606 lustre_idl.h does not compile in user... Closed
is related to LU-4983 deprecate struct obd_ioctl_data Open
Severity: 3
Rank (Obsolete): 13724

 Description   

Mostly this means reshuffling headers. There are a few uses of ext2_test_bit(). The worst offender is obd.c which passes a lov_stripe_md from userspace to kernelspace. This can be handled by adding a new ioctl (OBD_IOC_CREATE3) which accepts a struct lov_user/mds_md_v3.



 Comments   
Comment by Robert Read (Inactive) [ 25/Apr/14 ]

It would also be nice make lustre_idl.h usable when building outside the tree or move the ioctl interface to more userspace friendly headers.

Comment by Andreas Dilger [ 26/Apr/14 ]

I already have a patch to remove LASSERT() and LPx64 from lustre_user.h - http://review.whamcloud.com/6156 but it probably needs a refresh. Something similar should be done for lustre_idl.h also.

As for the passing of lov_stripe_md from userspace - could you please point out the particulars to me? This of course seems totally wrong, and it may be that it is obsolete and we can just get rid of it entirely instead of making a new ioctl.

Comment by John Hammond [ 26/Apr/14 ]

> I already have a patch to remove LASSERT() and LPx64 from lustre_user.h - http://review.whamcloud.com/6156 but it probably needs a refresh. Something similar should be done for lustre_idl.h also.

Indeed. And as Robert noted the ioctls should be consolidated into lustre_user.h, lustre_idl.h, or a new shared file.

> As for the passing of lov_stripe_md from userspace - could you please point out the particulars to me? This of course seems totally wrong, and it may be that it is obsolete and we can just get rid of it entirely instead of making a new ioctl.

See lustre/utils/obd.c:jt_obd_create() which uses OBD_IOC_CREATE and passes a lov_stripe_md() to the echo client module. When I asked about this a while ago I sort of understood that it was still in use but no one knew the details.

See http://review.whamcloud.com/10114 for a preliminary cut.

Comment by John Hammond [ 28/Apr/14 ]

http://review.whamcloud.com/10139 moves ioctls to lustre_ioctl.h and disincludes obd.h from utils and test.

Comment by John Hammond [ 01/May/14 ]

http://review.whamcloud.com/#/c/10194/ LU-4961 lustre: remove liblustre.h and obd.h from userspace

Comment by John Hammond [ 09/May/14 ]

Patch landed to master.

Generated at Sat Feb 10 01:47:20 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.