[LU-3963] cleanup libcfs wrappers Created: 16/Sep/13  Updated: 06/Jul/16  Resolved: 04/Dec/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.4.0, Lustre 2.5.0
Fix Version/s: Lustre 2.7.0

Type: Improvement Priority: Minor
Reporter: Peng Tao Assignee: Nathaniel Clark
Resolution: Fixed Votes: 0
Labels: emc, patch

Issue Links:
Duplicate
duplicates LU-1346 cleanup libcfs Resolved
Related
is related to LU-5018 e2fsprogs build failed Resolved
is related to LU-2245 failure on sanity.sh test_101c: Small... Resolved
is related to LU-5411 cfs_hlist_for_each_entry() not workin... Resolved
is related to LU-8354 soft lockup in ldlm_plain_compat_queue Resolved
Epic: client
Rank (Obsolete): 10533

 Description   

Migrate libcfs to emulate Linux kernel APIs, so that when submitting Linux client to upstream kernel, we don't need the abstraction layer which will be rejected by kernel maintainers. The majority of libcfs are cfs_* or ll_* wrappers, and can be cleaned up with scripts doing like "s/cfs_spin_lock/spin_lock". For other functions that cannot be cleaned up this way, we need to look at them in a case-by-case basis.



 Comments   
Comment by Jodi Levi (Inactive) [ 16/Sep/13 ]

This ticket is for the follow on work in LU-1346 that will continue into 2.6 so that LU-1346 can be closed in 2.5.
Any further patches for this should be submitted under this ticket.

Comment by Andreas Dilger [ 27/Nov/13 ]

It would be great to get the base patch for cfs_list conversion (to rename base cfs_list_* functions and add compat wrappers for other arches) so that new patches that are landing can use the list_* versions and avoid increasing the number of functions that need to be converted.

Comment by James A Simmons [ 27/Nov/13 ]

http://review.whamcloud.com/#/c/4780 has been updated. The patch now only changes the libcfs core. It also defines linux api's for non-linux systems and still support the current cfs_* wrappers.

Comment by James A Simmons [ 05/Dec/13 ]

Here is something strange. Maloo test for http://review.whamcloud.com/#/c/7803 report conf-sanity and sanity as failing but when you examine the logs all the test passed. The link for the maloo test results is https://maloo.whamcloud.com/test_sessions/fa54b9f0-5daa-11e3-a404-52540035b04c

Comment by James A Simmons [ 06/Dec/13 ]

Patches for atomic conversion to linux api.

http://review.whamcloud.com/#/c/7072
http://review.whamcloud.com/#/c/7073
http://review.whamcloud.com/#/c/7074
http://review.whamcloud.com/#/c/7075
http://review.whamcloud.com/#/c/7076
http://review.whamcloud.com/#/c/7077

Comment by James A Simmons [ 02/Jan/14 ]

The following Ppatches for atomic conversion are ready for inspection:

http://review.whamcloud.com/#/c/7072
http://review.whamcloud.com/#/c/7074

Comment by James A Simmons [ 21/Jan/14 ]

Both patches 7072 and 7074 are merged. The patches left to support linux atomics are:

http://review.whamcloud.com/#/c/7073
http://review.whamcloud.com/#/c/7077

Comment by Nathaniel Clark [ 31/Mar/14 ]

Merged to head

Comment by James A Simmons [ 31/Mar/14 ]

Patch 7073 is still outstanding. Also we have the cfs_list to convert. Please reopen this ticket.

Comment by Nathaniel Clark [ 02/Apr/14 ]

James, Sorry about that.

Comment by James A Simmons [ 27/Apr/14 ]

List cleanup patches:

http://review.whamcloud.com/#/c/9369
http://review.whamcloud.com/#/c/9904
http://review.whamcloud.com/#/c/9944

Comment by Nathaniel Clark [ 08/May/14 ]

http://review.whamcloud.com/10247

Comment by James A Simmons [ 20/May/14 ]

http://review.whamcloud.com/#/c/10387
http://review.whamcloud.com/#/c/10525
http://review.whamcloud.com/#/c/10526

Comment by Jian Yu [ 02/Aug/14 ]

The patches for replacing direct HZ access with Linux kernel APIs will be tracked in LU-5443.

Comment by James A Simmons [ 02/Sep/14 ]

http://review.whamcloud.com/#/c/11725 - Empty file removal

http://review.whamcloud.com/#/c/11729 - Removal last of cfs wrappers for SMP handling.

Comment by James A Simmons [ 07/Sep/14 ]

Last two patches posted have been merged. One last patch for cfs list wrrappers is here:

http://review.whamcloud.com/#/c/11797

Comment by James A Simmons [ 17/Sep/14 ]

Phase I of this work is complete. No more cfs_list or cfs_atomic etc. Now we are unto phase II which is putting libcfs on a diet. Lots of wrappers still exist that are no longer needed so we will now start that cleanup. First patch for that cleanup is here:

http://review.whamcloud.com/#/c/11963

Comment by James A Simmons [ 03/Dec/14 ]

All the wrappers have been cleaned up. It is best if the phase II work would be done under a new ticket for 2.8. Peter you can close this ticket.

Comment by Gerrit Updater [ 15/Dec/14 ]

James Simmons (uja.ornl@gmail.com) uploaded a new patch: http://review.whamcloud.com/13070
Subject: LU-3963 libcfs: Use kernel's strncasecmp and remove cfs_get_blocked_sigs
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 1a5bf3003002e317c5e103ad8bb15bf2ab29e030

Comment by James A Simmons [ 15/Dec/14 ]

Sorry but I included one last patch to complete the SFS-DEV-004 contract. See http://wiki.opensfs.org/index.php?title=Contract_SFS-DEV-004 for details.

Comment by Gerrit Updater [ 18/Dec/14 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13070/
Subject: LU-3963 libcfs: Use kernel's strncasecmp and remove cfs_get_blocked_sigs
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: d97075bb9644dba102491280690e58ad8caf1acf

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