[LU-8330] Incorrect ioctl definitions declaring a pointer to buffer instead of buffer argument. Created: 26/Jun/16  Updated: 29/Jan/22

Status: In Progress
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Oleg Drokin Assignee: Nathaniel Clark
Resolution: Unresolved Votes: 0
Labels: patch

Issue Links:
Related
is related to LU-8400 Remove OBD_IOC_GET_MNTOPT ioctl as it... Resolved
is related to LU-8329 All structures referenced from IOCTLs... Open
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

There are no visible effects from this bug just yet, but the mechanism for declaring ioctls is used improperly with the below ones.

The structure ioctl is supposedly operates on is passed in as a pointer therefore breaking versioning.

We cannot just change the definition or it would break the old tools, but we can declare an old and new ones alongside and handle them both the same I guess.

#define LL_IOC_HSM_COPY_START           _IOW('f', 214, struct hsm_copy *)
#define LL_IOC_HSM_COPY_END             _IOW('f', 215, struct hsm_copy *)
#define IOC_OBD_STATFS                  _IOWR('f', 164, struct obd_statfs *)
#define IOC_MDC_LOOKUP          _IOWR(IOC_MDC_TYPE, 20, struct obd_device *)
#define IOC_MDC_GETFILESTRIPE   _IOWR(IOC_MDC_TYPE, 21, struct lov_user_md *)
#define IOC_MDC_GETFILEINFO     _IOWR(IOC_MDC_TYPE, 22, struct lov_user_mds_data *)
#define LL_IOC_MDC_GETINFO      _IOWR(IOC_MDC_TYPE, 23, struct lov_user_mds_data *)


 Comments   
Comment by Gerrit Updater [ 13/Jul/16 ]

Nathaniel Clark (nathaniel.l.clark@intel.com) uploaded a new patch: http://review.whamcloud.com/21296
Subject: LU-8330 wiretest: Add IOCTL checking to wiretest
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c25a8fe4591bbe2cf22b8045bfd51fdcf6de2b4e

Comment by Andreas Dilger [ 14/Jul/16 ]

See also https://bugzilla.lustre.org/show_bug.cgi?id=20731 for a discussion of fixing the ioctl definitions.

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