LU-9859 libcfs: remove workitem. There are no more users of the "workitem" code so it can be removed. Lustre uses Linux workqueues instead. Test-Parameters: trivial Signed-off-by: Mr NeilBrown <neilb@suse.de> Change-Id: I392ab73cdd38bc2927e0626d83a6f838dfd8113c Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50462 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Aurelien Degremont <adegremont@nvidia.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-14487 libcfs: remove references to Sun Trademark. "lustre" is no longer a Trademark of Sun Microsystems. There is no need to acknowledge the trademark in every file, so just remove all these claims. Test-Parameters: trivial Signed-off-by: Mr NeilBrown <neilb@suse.de> Change-Id: Ife96ed8a26fd56a3c91933ae0a6b96784a8cc70a Reviewed-on: https://review.whamcloud.com/42137 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org>
LU-14159 build: fix gcc8 warnings on kthread_run calls Fixes warnings from gcc8 about kthread_run calls with no format parameter. Signed-off-by: Quentin Bouget <quentin.bouget@cea.fr> Signed-off-by: Sebastien Piechurski <sebastien.piechurski@atos.net> Change-Id: I30a68a1d0e318c98f2da547ece8018564ced69c0 Reviewed-on: https://review.whamcloud.com/40790 Tested-by: jenkins <devops@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Neil Brown <neilb@suse.de> Reviewed-by: James Simmons <jsimmons@infradead.org> Tested-by: Maloo <maloo@whamcloud.com>
LU-9859 libcfs: remove unnecessary cfs_block_allsigs() calls Threads started by kthread_run() ignore all signals, as kthreadd() calls ignore_signals(), and this is inherited by all children. So there is no need to call cfs_block_allsigs() in functions that are only run from kthread_run(). For the case of lnet_ping_md_unlink() it is not from a kernel thread but nothing in that function should be affected by signals so it is safe to remove. For lnet_ping() we need to manually block signals since LNetEQPool() can unconditionally abort when a signal is recieved. Linux-commit: 1b2dad1459e480028a2714439048d8a634132857 Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Change-Id: I124dccf78a3187d5f4a31c7b76db5369aaafc369 Reviewed-on: https://review.whamcloud.com/35350 Tested-by: jenkins <devops@whamcloud.com> Reviewed-by: Neil Brown <neilb@suse.de> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Jian Yu <yujian@whamcloud.com> Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-12930 various: use schedule_timeout_*interruptible The construct: set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(time); Is more clearly expressed as schedule_timeout_uninterruptible(time); And similarly with TASK_INTERRUPTIBLE / schedule_timeout_interruptible() Establishing this practice makes it harder to forget to call set_current_state() as has happened a couple of times - in lnet_peer_discovery and mdd_changelog_fini(). Also, there is no need to set_current_state(TASK_RUNNABLE) after calling schedule*(). That state is guaranteed to have been set. In mdd_changelog_fini() there was an attempt to sleep for 10 microseconds. This will always round up to 1 jiffy, so just make it schedule_timeout_uninterruptible(1). Finally a few places where the number of seconds was multiplied by 1, have had the '1 *' removed. Test-Parameters: trivial Signed-off-by: Mr NeilBrown <neilb@suse.de> Change-Id: I01b37039de0bf7e07480de372c1a4cfe78a8cdd8 Reviewed-on: https://review.whamcloud.com/36656 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-9679 general: avoid bare return; at end of void function Having: return; } at the end of a void function is unnecessary noise. Where it is the *only* statement in the function, it can be useful, so that remain unchanged. The rest have been removed. Test-Parameters: trivial Signed-off-by: Mr NeilBrown <neilb@suse.de> Change-Id: If02f6f5b91d4134cf95a68ebccc83df28c360fb2 Reviewed-on: https://review.whamcloud.com/36654 Tested-by: jenkins <devops@whamcloud.com> Reviewed-by: Shaun Tancheff <stancheff@cray.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com> Reviewed-by: Ben Evans <bevans@cray.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1095 misc: quiet console messages at startup Some modules print less-than-useful messages on every load. Turn these into internal debug messages to reduce noise. The message in gss_init_svc_upcall() should also be quieted, but it exposes that this function is waiting 1.5s on each module load for lsvcgssd to start. This should be fixed separately. Test-Parameters: trivial Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Change-Id: Ib51ce0e9a88a94d8d2d5eb0906abef0f544cab07 Reviewed-on: https://review.whamcloud.com/33281 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Nathaniel Clark <nclark@whamcloud.com> Reviewed-by: Sebastien Buisson <sbuisson@ddn.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-10308 misc: update Intel copyright messages for 2017 Update copyright messages for files updated in 2016, excluding trivial patches. Add trivial patches to updatecw.sh script exclude list. Revert some changes that were incorrectly attributed to the 2016 (d10200a80770f0029d1d665af954187b9ad883df) and 2015 (0754bc8f2623bea184111af216f7567608db35b6) copyright update patches themselves, since they were not in the exclude list when the subsequent script was run. Test-Parameters: trivial Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Change-Id: I82f21c30c4dac75792bb49fc139bee2ca51f5545 Reviewed-on: https://review.whamcloud.com/30341 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Jian Yu <jian.yu@intel.com> Reviewed-by: James Nunez <james.a.nunez@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4423 libcfs: remove IS_PO2 and __is_po2 Removes IS_PO2 and __is_po2 since the uses of IS_PO2 have been replaced by is_power_of_2 Linux-commit: d4891039904fa25edf1ca793a0469633ed81df3f The following commit message is the same for the following patches: hash.c: Replace IS_PO2 by is_power_of_2 Linux-commit: 71872e9cc2af4dca1903ebc57daa15f08c795d86 selftest.h: replace IS_PO2 by is_power_of_2 Linux-commit: b3367164f4ff8ff2c1aa8bd79c7548f113b62b83 workitem.c: replace IS_PO2 by is_power_of_2 Linux-commit: 57b573d14b0fb9f83575a2cf155862d251c8f0d1 ldlm_extent.c: replace IS_PO2 by is_power_of_2 Linux-commit: 5f4179e04b31441b0b7995d14320a457aafba01b Replaces IS_PO2 by is_power_of_2. It is more accurate to use is_power_of_2 since it returns 1 for numbers that are powers of 2 only whereas IS_PO2 returns 1 for 0 and numbers that are powers of 2. Change-Id: Ic8bb40394b46ea433e3096c878abe467eacc7996 Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/24577 Tested-by: Jenkins Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Jian Yu <jian.yu@intel.com>
LU-8703 libcfs: fix error messages Don't treat unability to set CPU partition affinity as error. Change-Id: I9ccbef76e05f1a5f75b648610b5a71389ed0d6e1 Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-on: https://review.whamcloud.com/23307 Reviewed-by: Patrick Farrell <paf@cray.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-8648 all: remove all Sun license and URL references The link to the GPL license at Sun is no longer there. Also Sun Inc is gone so lets remove all references to it in our source code. Test-Parameters: trivial Change-Id: Ib47d07dcef49a1ef624d0d8a4a91b9731f486278 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: http://review.whamcloud.com/22800 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Frank Zago <fzago@cray.com>
LU-4423 libcfs: remove some unused code and wrappers in libcfs Remove code that is not used by anyone anymore in the libcfs module. Also simplify the code by removing several one line wrappers. This is a collection of work done upstream by Shraddha Barke. The linux commits are: Linux-commit : 8eefa1c028f5b16f33ce1b3c7bbabdf74efc63b1 Linux-commit : d11f8cc4bb7ff4ee8cc89d2799cdda206da0f434 Linux-commit : 7fb6f46b14d01a185dfe563a8ba20cda514d4f9a Linux-commit : 7cbf673d8b4a68916fe362fe9a9c3a55a604700e Linux-commit : e4ce7f7779313ff23f958049b91cc7ac1b24d8e8 Linux-commit : 5a2f464af23bc90a77df6b9b30815e602efb99af Linux-commit : 87af1d2e0c29ce4f025da0cdbb9c74a3958fd71d Linux-commit : 9561c25c590afdcb27002dc168bcecbf5a757308 Linux-commit : 7d6e398ca61427e903246f1c11853f6f967bbb5e Linux-commit : 90f8b4643023b23061a15229c0c0b8ee747438a8 Linux-commit : a2aadf23d1437ddcce86fa0673a6ecb5f932d3ec Signed-off-by: James Simmons <uja.ornl@yahoo.com> Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Change-Id: I667f98b3c73d4ac9e884d6ada6fed0733a3f6451 Reviewed-on: http://review.whamcloud.com/17375 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-6245 libcfs: remove typedefs in libcfs source code Convert most of the typdefs used in libcfs source code to a standard struct. Only a few left which will be completely removed in later patches. The typedef function pointers will be the only ones remaining. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Change-Id: I5c9efa10d23904c456154d5afbb80c4197e91641 Reviewed-on: http://review.whamcloud.com/17202 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-6245 libcfs: remove last of user land code in libcfs module Currently user land code still exist in libcfs source for workitems and some of the linux specific debug code. We can now safely remove the last bit of this code. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Change-Id: Id137071f52cbce3a4c6de323b5412976fb687c54 Reviewed-on: http://review.whamcloud.com/15197 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-6245 libcfs: remove prim wrappers for libcfs The libcfs layer contains wrappers to handle primitive management for both kernel space and user land. Since libcfs is no longer built for user land we can remove the wrappers. For linux-prim.h we kept only what is needed to deal with different kernel versions. Also we separated out libcfs_string.h to util/string.h so we can remove the wrappers no longer needed. Signed-off-by: James Simmons <uja.ornl@gmail.com> Change-Id: I0bad836f20ef29bf2ed17f1f4e5e1234d193868e Reviewed-on: http://review.whamcloud.com/13874 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-6068 misc: update Intel copyright messages 2014 Update the copyright messages for changes made in 2014. In some cases, changes made in 2013 did not generate an updated copyright message, so these files are updated accordingly. In some cases there were no licenses on newly-added files, so add them (either with new copyrights, or including copyrights from the source files). Some types of changes that are not actually changing the code (e.g. whitespace, mass changes to add or remote prefixes, patches updating the copyright messages, patch reversions and the reverted patch, patches that only delete code, etc.) have been excluded. The updatecw.sh script was updated to fix a number of problems: - it now handles comments in nroff (man page) files properly - remove need to handle non-Intel copyrights specially - allow subdirectory to be specified on command-line - improve script debugging when running with "sh -vx" - print patches changing the most files, to catch mass replacements There are still a few cases that need to be fixed up by hand (e.g. files split up and "git log --follow" can't find the original). Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Change-Id: Ib4875400a4908dc79ddc8b82ab0fe3ee903ebbe5 Reviewed-on: http://review.whamcloud.com/13174 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5396 libcfs: make some functions static Some functions and variables are only used in their C file, so reduce their scope. This reduces the code size, and fixes sparse warnings such as: warning: symbol 'proc_lnet_routes' was not declared. Should it be static? warning: symbol 'proc_lnet_routers' was not declared. Should it be static? Some prototypes were removed from C files and added to the proper header. Signed-off-by: Frank Zago <fzago@cray.com> Change-Id: I5bdf94633fb94e435d32691d521ad7c1234018aa Reviewed-on: http://review.whamcloud.com/12207 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4629 libcfs: fix buffer overflow of string buffer Buffer overflow of string buffer due to non null terminated string. Use strlcpy() when it's justifiable. Use sizeof(var) instead of constants. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Change-Id: Ib8d5493898a292e3c764170d0a0870bee26b23a0 Reviewed-on: http://review.whamcloud.com/9389 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3963 libcfs: cleanup list operations Cleanup list operations (libcfs/include/libcfs/list.h) All typed list operations for the libcfs core are converted to the kernel APIs. Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: James Simmons <uja.ornl@gmail.com> Change-Id: Ibcb92e5133312e8db4fdf2f9fa1b68a8c68a2e74 Reviewed-on: http://review.whamcloud.com/4780 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Peng Tao <bergwolf@gmail.com>
LU-2074 build: fix 'copy into fixed size buffer' errors Fix 'copy into fixed size buffer' defects found by Coverity version 6.0.3: Copy into fixed size buffer (STRING_OVERFLOW) The fixed-size string might be overrun by copying without checking the length. Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net> Change-Id: Ia47e6ae132fe476fce202ce06d6fc655f9855012 Reviewed-on: http://review.whamcloud.com/4154 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>