[LU-8945] Stop building ptlrpc/layout.c in userland Created: 15/Dec/16  Updated: 18/Jan/17  Resolved: 18/Jan/17

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

Type: Improvement Priority: Minor
Reporter: James A Simmons Assignee: James A Simmons
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-6401 Untangle lustre userland and kernel h... Resolved
Rank (Obsolete): 9223372036854775807

 Description   

Currently a user land utility req-layout does evil things like include layout.c from the ptlrpc layout into its user land source file. This ends up pull lots of unnecessary kernel code into user land as well as libcfs kernel headers. If we really need the req-layout tool this it would be better to export the data via debugfs. The question also is this utility really needed anymore. The other option is to delete req-layout.c



 Comments   
Comment by Andreas Dilger [ 16/Dec/16 ]

While req_layout appears to be somewhat interesting (I didn't know this existed) I don't think anyone is actually using it. We would be far better off to do this kind of structure decoding in wireshark, and this utility can almost certainly be removed.

Comment by Andreas Dilger [ 16/Dec/16 ]

PS: it wouldn't be terrible to run it once and post the output in a comment here for posterity, since this might be useful for anyone looking at RPC structures.

Comment by James A Simmons [ 16/Dec/16 ]

True, wireshark is a much better solution. Here is a sample of the output, otherwise it is too long.

L OBD_PING (1/1)
FC 0 [000] ptlrpc_body (184)
-----------------------------------
FS 0 [000] ptlrpc_body (184)

L OBD_SET_INFO (3/1)
FC 0 [000] ptlrpc_body (184)
FC 1 [184] setinfo_key (var)
FC 2 [184 + ...] setinfo_val (var)
-----------------------------------
FS 0 [000] ptlrpc_body (184)

L OBD_IDX_READ (2/2)
FC 0 [000] ptlrpc_body (184)
FC 1 [184] idx_info (080)
-----------------------------------
FS 0 [000] ptlrpc_body (184)
FS 1 [184] idx_info (080)

L SEC_CTX (1/1)
FC 0 [000] ptlrpc_body (184)
-----------------------------------
FS 0 [000] ptlrpc_body (184)

L MGS_TARGET_REG (2/2)
FC 0 [000] ptlrpc_body (184)
FC 1 [184] mgs_target_info (4544)
-----------------------------------
FS 0 [000] ptlrpc_body (184)
FS 1 [184] mgs_target_info (4544)

Comment by Gerrit Updater [ 16/Dec/16 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/24396
Subject: LU-8945 ptlrpc : remove userland usage from ptlrpc
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: f2eb7f40c489344e43c4a15b93f53cc89b239953

Comment by James A Simmons [ 16/Dec/16 ]

This cleanup is one of the last blockers of completely removing the libcfs headers from userland.

Comment by Gerrit Updater [ 18/Jan/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/24396/
Subject: LU-8945 ptlrpc : remove userland usage from ptlrpc
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: fb403f8b5f8ba61fe0da28e7f7c5e01776717750

Comment by Peter Jones [ 18/Jan/17 ]

Landed for 2.10

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