LU-8191 liblustre: add missing functions to header A number of functions were missing from lustreapi.h, causing them to be marked incorrectly as functions that could be made static. They have been added to the header so applications can use them. Static analysis shows that a number of functions could be made static. This patch also declares several functions in liblustre static. liblustreapi_nodemap.c and liblustreapi_ioctl.c were missing an internal header, causing some functions to be incorrectly flagged. This patch also adds that header. Initialize a previously uninitialized variable in llapi_fid_to_handle(). Test-Parameters: trivial Signed-off-by: Timothy Day <timday@amazon.com> Change-Id: I67b9c59418b62602ffe36eb4284eb1e8d4a3b19b Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51434 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-8854 llapi: remove lustre specific strlcpy & strlcat functions In the days when lustre supported many more platforms some of those platforms natively support strl[cpy|cat] but Linux has always lack these functions. So lustre ended up providing its own versions of these functions to fill in this functionality. Today Lustre only supports the Linux platforms which has a version of libc that will most likely never support strl[cat|cpy]. Since this is the case we can remove the AC_CHECK_FUNCS since they only test against libc. We could support detecting strl[cpy|cat] in another library but many libraries provide their own version so the chances of collision are high. The best solution is remove strlcpy and strlcat by replacing those functions with string functions that are always provided by the standard c library. Change-Id: I72df93c8f83ed1aad80653fe0d1c4d54d1d8e2f2 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/29798 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Sebastien Buisson <sbuisson@ddn.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-8901 misc: update Intel copyright messages for 2016 Update copyright messages for files updated in 2016, excluding trivial patches. Add trivial patches to updatecw.sh script exclude list. Improve the output of patches causing the most changes to include the patch summary instead of just the hash. Test-Parameters: trivial Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Change-Id: Ifb098e8126f698ea975e10ba13f5f47c449ae4ad Reviewed-on: https://review.whamcloud.com/24233 Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Tested-by: Oleg Drokin <oleg.drokin@intel.com>
LU-6401 lustre: make lustre_user.h compile in user space While building my own lustre dependent application on Ubuntu I discovered that lustre_user.h does not compile due to libcfs/types.h not being packaged. So instead of fixing the packaging just remove the libcfs/type.h dependency from lustre_user.h which needs to be done anyways. Change-Id: Iecb62ca3b1aa727d1b7a01132e7074ee9079d0d4 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: http://review.whamcloud.com/16494 Reviewed-by: Frank Zago <fzago@cray.com> Tested-by: Jenkins Reviewed-by: John L. Hammond <john.hammond@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-6245 utils: remove libcfs.h from lustre utilities code Since user land libcfs is mostly gone libcfs.h can be removed from the code that is used to create the lustre utilities such as lfs and mount.lustre. Change-Id: I5e0dd7d9ad44e988b2045906d2179dc3e2538d38 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: http://review.whamcloud.com/15217 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.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-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-4961 lustre: remove liblustre.h and obd.h from userspace In lustre/tests/ and lustre/utils/ replace inclusion of liblustre.h and obd.h with libcfs/libcfs.h and lustre/lustre_idl.h. In obd.h raise a preprocessod error if being compiled in userspace. Replace the contents of liblustre.h with a single preprocessor error moving what few functions were still in use to their files of use. Signed-off-by: John L. Hammond <john.hammond@intel.com> Change-Id: I778b3207ce561d8adef6f7ecbbc899654c23b9d6 Reviewed-on: http://review.whamcloud.com/10194 Tested-by: Jenkins Reviewed-by: Bob Glossman <bob.glossman@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Robert Read <robert.read@intel.com>
LU-4724 hsm: Safe copytool event logging Protect against concurrent event log writes by multiple threads within a copytool process. Fixes sanity-hsm test_71 failures. Signed-off-by: Michael MacDonald <michael.macdonald@intel.com> Change-Id: Ie18f7368f386acf0949a038e6bdb2ba7dca5c3a3 Reviewed-on: http://review.whamcloud.com/9553 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4020 hsm: allow copytool event monitoring with JSON Adds hooks into various llapi_hsm_* functions to emit JSON-formatted event messages for consumption by a monitoring agent. The copytool needs to be supplied with an optional --event-fifo argument to enable this feature. Incorporates the following work done by Bruno Faccini: * Put all JSON routines in a separate file/lib to allow for LGPL licensing. * Major code cleanup to follow best practices and address review concerns. Signed-off-by: Michael MacDonald <michael.macdonald@intel.com> Signed-off-by: Bruno Faccini <bruno.faccini@intel.com> Change-Id: I1fecfb8e60ef091c6d37d16dc1faf40be45c5ee2 Reviewed-on: http://review.whamcloud.com/7790 Tested-by: Jenkins Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>