[LU-16803] uapi guid_t removed in commit v6.2-rc5-72-g5e6a51787fef Created: 07/May/23  Updated: 19/May/23  Resolved: 19/May/23

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

Type: Improvement Priority: Minor
Reporter: Shaun Tancheff Assignee: Shaun Tancheff
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Need to check user space has guid_t from uapi linux headers and fallback to uuid_le when guid_t is not present.



 Comments   
Comment by Gerrit Updater [ 07/May/23 ]

"Shaun Tancheff <shaun.tancheff@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50878
Subject: LU-16803 build: Decouple guid_t and uuid_le
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c3970b49fd60ed58f7e1aba0c4c055fc50815f86

Comment by Shaun Tancheff [ 08/May/23 ]

The issue is resolved in LU-16739 switching to uuid_le

Comment by Shaun Tancheff [ 08/May/23 ]

With LU-16739 ("uapi: make lustre_disk.h buildable in user land") applied the user space compile failure when 6.4 kernel-headers are installed is resolved.

Unfortunately we get a new issue:

/home/shaun/lustre-release/lustre/include/uapi/linux/lustre/lustre_disk.h:410:2: error: unknown type name ‘uuid_le’
  410 |  uuid_le sf_uuid;      /* 128-bit uuid for volume */
      |  ^~~~~~~ 

If including the new header <linux/mei_uuid.h> resolves the above, however a new problem appears due to guid_t and uuid_le not being the same type:

/home/shaun/lustre-release/lustre/obdclass/scrub.c: In function ‘scrub_file_to_cpu’:
/home/shaun/lustre-release/lustre/obdclass/scrub.c:50:12: error: passing argument 1 of ‘guid_copy’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   50 |  guid_copy(&des->sf_uuid, &src->sf_uuid);
      |            ^~~~~~~~~~~~~
      |            |
      |            uuid_le * {aka struct <anonymous> *}
In file included from /home/shaun/lustre-release/lustre/include/lustre_scrub.h:36,
                 from /home/shaun/lustre-release/lustre/obdclass/scrub.c:38:
include/linux/uuid.h:51:38: note: expected ‘guid_t *’ {aka ‘struct <anonymous> *’} but argument is of type ‘uuid_le *’ {aka ‘struct <anonymous> *’}
   51 | static inline void guid_copy(guid_t *dst, const guid_t *src)
      |                              ~~~~~~~~^~~
/home/shaun/lustre-release/lustre/obdclass/scrub.c:50:27: error: passing argument 2 of ‘guid_copy’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   50 |  guid_copy(&des->sf_uuid, &src->sf_uuid);
      |                           ^~~~~~~~~~~~~
      |                           |
      |                           uuid_le * {aka struct <anonymous> *}
In file included from /home/shaun/lustre-release/lustre/include/lustre_scrub.h:36,
                 from /home/shaun/lustre-release/lustre/obdclass/scrub.c:38:
 
Comment by Gerrit Updater [ 08/May/23 ]

"Shaun Tancheff <shaun.tancheff@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50885
Subject: LU-16803 build: Map uuid_le to guid_t for in-kernel APIs
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 31816ebe32f6b5c52a86c2503b30a9f1370e20a8

Comment by Gerrit Updater [ 19/May/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/50885/
Subject: LU-16803 build: Map uuid_le to guid_t for in-kernel APIs
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 674aaa08011a8c04856069e55e91b43354d670ae

Comment by Peter Jones [ 19/May/23 ]

Landed for 2.16

Generated at Sat Feb 10 03:30:08 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.