[LU-14291] Improve use of HAVE_SERVER_SUPPORT and others for Linux-kernel client Created: 04/Jan/21  Updated: 29/Mar/23

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

Type: Improvement Priority: Minor
Reporter: Neil Brown Assignee: Neil Brown
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Related
is related to LU-12511 Prepare lustre for adoption into the ... Open
is related to LU-8837 Cleanly separate server code from cli... Open
Rank (Obsolete): 9223372036854775807

 Description   

The proposed upstreaming of Lustre to the Linux kernel will start with just the client.  To assist with this the "HAVE_SERVER_SUPPORT" macro is widely used to identify code that is only needed on the server.  However there is a lot of code that could be protected  by this macro, but isn't.

There are also some other aspects of Lustre that will not be going upstream, such as the ability to extract jobid strings from the process environment.  It would help if there were marked for conditional compilation, so they can easily be removed before upstreaming.

Ideally most of the server-only code would go in separate source files so that when server support is later added, we only need to add some files.  We probably cannot move all server code to separate files, but we should move as much as we can, as having #ifdef in C-code files is discouraged upstream.

The goal of this improvement is for all code that won't be upstream initially to with be in separate files, or to be clearly marked with a macro such s HAVE_SERVER_SUPPORT.

 

 



 Comments   
Comment by Gerrit Updater [ 05/Jan/21 ]

Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/41125
Subject: LU-14291 ptlrpc: format UPDATE messages in server-only code
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 85cc666719ad3858553f7c19b7dba1cac6633349

Comment by Gerrit Updater [ 05/Jan/21 ]

Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/41126
Subject: LU-14291 lustre: clean up lustre_eacl.h and make server-only
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 352691600bcd77ed05833586a17d2919bdd414f5

Comment by Gerrit Updater [ 05/Jan/21 ]

Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/41127
Subject: LU-14291 ptlrpc: only build nrs_delay for server builds.
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2a79d476fb553f57bf825b3482e7300efa678095

Comment by Gerrit Updater [ 05/Jan/21 ]

Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/41128
Subject: LU-14291 lustre: only include nrs headers when needed
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 9429b35206923ddcffd79468d358ee42306f4b69

Comment by Gerrit Updater [ 26/Feb/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41127/
Subject: LU-14291 ptlrpc: support nrs_delay for client-only builds
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: daa388b5399b4e2979865717d4cc0ee7cb3fa1db

Comment by Gerrit Updater [ 26/Feb/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41128/
Subject: LU-14291 lustre: only include nrs headers when needed
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 7a8fafe2a10674dae7dc490c45d7bd2e49e1926e

Comment by Gerrit Updater [ 14/Mar/21 ]

Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/42032
Subject: LU-14291 lustre: further cleanup of acl code.
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 757177c5366f169dd8504b9e1a0ec42a02325333

Comment by Gerrit Updater [ 16/Mar/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41126/
Subject: LU-14291 lustre: clean up lustre_eacl.h and make server-only
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 497f520fa341fe2352400c7e5fbc6917b129ff70

Comment by Gerrit Updater [ 16/Mar/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39683/
Subject: LU-14291 build: use tgt_pool for lov layer
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 01d23cc780c6c7fccdbc3e8948ceebbe67b30846

Comment by Gerrit Updater [ 22/Mar/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/42032/
Subject: LU-14291 lustre: further cleanup of acl code.
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 8cdb99aa0a6462a35ac584226ae66841c3b7bc2f

Comment by Gerrit Updater [ 24/Mar/21 ]

James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/43096
Subject: LU-14291 lustre: limit header scope for server only handling
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: d3979cdad6d514198ad7bd8f3d91c4ca7eef3bfe

Comment by Gerrit Updater [ 06/Apr/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41125/
Subject: LU-14291 ptlrpc: format UPDATE messages in server-only code
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 771308ada3895c3ccfeb8e63365089086c1d9fdc

Comment by Gerrit Updater [ 10/May/21 ]

James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/43624
Subject: LU-14291 lustre: rename tgt_pool_* functions.
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: e0bb8a53936df88340cbd34f7e3541ff588ab15d

Comment by Gerrit Updater [ 19/May/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/43096/
Subject: LU-14291 lustre: limit header scope for server only handling
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5ecd5a5ecfb880236b5fbc23621102239de5f5d6

Comment by Gerrit Updater [ 27/May/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/43624/
Subject: LU-14291 lustre: rename tgt_pool_* functions.
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 7f3b06a0ab527c3a45179c6531b444bf8aab79ac

Comment by Peter Jones [ 27/May/21 ]

Landed for 2.15

Comment by Neil Brown [ 27/May/21 ]

There is still plenty of room to improve HAVE_SERVER_SUPPORT.

 

The ideal end-goal is to remove it from all .c files, leaving it only in Makefiles and .h.

This might not be possible to fully achieve, but it would be good to keep this open until we collectively decide that we are close enough.

Comment by Gerrit Updater [ 10/Mar/23 ]

"jsimmons <jsimmons@infradead.org>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50258
Subject: LU-14291 batch: don't include lustre_update.h for client only builds
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 935898aa3f3aa6768165e16f06f1a720f021cdc1

Comment by Gerrit Updater [ 28/Mar/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/50258/
Subject: LU-14291 batch: don't include lustre_update.h for client only builds
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 12c34651994b77ac0cf231cd710f9d511845a4e1

Comment by Peter Jones [ 29/Mar/23 ]

Landed for 2.16

Comment by Neil Brown [ 29/Mar/23 ]

Some patches have landed - yes.  But others haven't even been developed.

I don't think we can really call "time" on this issue until we have demonstrated that everything not protected by HAVE_SERVER_SUPPORT is client-only.  Getting the client code accepted into the Linux kernel would be reasonable way to demonstrate that.

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