LU-10391 obdclass: handle large NIDs for mount strings Mount strings support using ':' as a delimiter but this is also a part of the some NID strings like IPv6, so rework class_parse_value() to only look at ':' when it occurs after '@'. The mount utilities use the function convert_hostnames() to ensure the mount string containing an NID is valid. This only works for small size nids so migrate the function to handle large NIDs. This should allow mounting with IPv6 or other large NID addresses. In testing the userland libcfs_ip_str2addr_size() had bugs that rendered incorrect NID strings. Fix those issues. Fixes: b6c702df5d4 ("LU-10391 libcfs: add large-nid string conversion functions.") Change-Id: Ic9b2a368456ba75ceb5911ac7f75ae00d6123870 Signed-off-by: James Simmons <jsimmons@infradead.org> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50362 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Nathaniel Clark <nclark@whamcloud.com> Reviewed-by: Chris Horn <chris.horn@hpe.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-16524 nodemap: add rbac property to nodemap Add new rbac property to nodemap. Internally this is a mask of allowed roles. Externally it defaults to all, which means all roles are allowed, and it can take the following values (multiple can be specified, comma separated), with the semantic: - byfid_ops, to allow operations by FID (e.g. 'lfs rmfid'). - chlg_ops, to allow access to Lustre Changelogs. - dne_ops, to allow operations related to DNE (e.g. 'lfs mkdir'). - file_perms, to allow modifications of file permissions and owners. - quota_ops, to allow quota modifications. Apart from all, any role not explicitly specified is forbidden. And to forbid all roles, use 'none' value. Update lctl-nodemap-modify man page to mention this new property. Signed-off-by: Sebastien Buisson <sbuisson@ddn.com> Change-Id: I4cedf03c75948f4b1e9b55292414ab9110701874 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49873 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: Alex Zhuravlev <bzzz@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-8837 utils: move lustre_disk_data back to lustre_disk.h This patch moves struct lustre_disk_data from mount_utils.h back to lustre_disk.h so that it can be used in other codes without including mount_utils.h. Fixes: d62efba975d2 ("LU-8837 utils: make tools lightweight for lustre clients") Change-Id: I589da2710e3cbe7d93a59928143f2b5cac955e6e Signed-off-by: Jian Yu <yujian@whamcloud.com> Reviewed-on: https://review.whamcloud.com/44829 Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
LU-14093 utils: trivial changes to support gcc10 just to fix gcc10 complains. Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com> Change-Id: I8390d28fe78c9dad15a41301cc2b6d6184fdc330 Reviewed-on: https://review.whamcloud.com/40485 Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com>
LU-14487 lustre: remove references to Sun Trademark. "lustre" is no longer a Trademark of Sun Microsystems. There is no need to acknowledge the trademark is every file, so just remove all these claims. Test-Parameters: trivial Signed-off-by: Mr NeilBrown <neilb@suse.de> Change-Id: I214670b39c5718f2b691193f268a64856e0cd743 Reviewed-on: https://review.whamcloud.com/41880 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-6142 misc: declare static chars as const where possible. When a char * is statically initialized to a literal string, it is best if the char is declared 'const' to ensure that literal string can never be changed, and to allow it to be stored in read-only memory. Unfortunately this is not possible for strings used as module parameters. Similarly osd_0copy_tag in osd-zfs cannot be made const, so that is change to a simple array (no pointer). But in many other places it is possible, and it requires all ultimate users of the string to declare that they are working with const chars. This patch changes a collection of static char*s to const, and in many cases arrays of char * to "const char * const", and then propagates the 'const' annotion as needed. Test-Parameters: trivial Signed-off-by: Mr NeilBrown <neilb@suse.de> Change-Id: I3185a6cd0d1b8a7dbd83698f456f65f47b4f2954 Reviewed-on: https://review.whamcloud.com/38421 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1365 utils: allow set block size for ldiskfs backend Add “-b” option to mkfs.lustre that allows to set backend block size. Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Signed-off-by: Artem Blagodarenko <c17828@cray.com> Change-Id: I83fc76f64ce2a0b4bf500841b695d64d3dea78de Reviewed-on: https://review.whamcloud.com/33757 Tested-by: Jenkins Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Li Dongyang <dongyangli@ddn.com>
LU-10520 mkfs: enable extents for big MDT Enable extents while MDT size is big than 16T. Test-Parameters: trivial testlist=conf-sanity Signed-off-by: Yang Sheng <yang.sheng@intel.com> Change-Id: Iccd39c48e715a3f084cb5ee803be0541563f5d10 Reviewed-on: https://review.whamcloud.com/31037 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Mike Pershin <mike.pershin@intel.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-8837 utils: make tools lightweight for lustre clients Currently the lustre tools are built for the server target even for the case of clients rpms. Rework the tools so server specific code is not built for the client only case. The UAPI headers lustre_log_user.h, lustre_barrier_user.h, and lustre_disk.h are server specific and are not available in the upstream client. So make our tools not to depend on those headers in the client case. With this change it is simple step to make our tools buildable against upstream. Last move user land specific code from lustre_disk.h to mount_utils.h. Don't install server UAPI headers on client targets. Change-Id: I6b2b780ac0e7338a085ee6a8747097f0097efca1 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/28315 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.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-6401 uapi: migrate remaining uapi headers to uapi directory Move all the remaining lustre headers shared between user land and kernel space to the uapi directory. OBD_MAX_IOCTL_BUFFER can be removed since the utilites don't even acknowledge it value. Change-Id: I6dcdf3f824dae6bc8a0786f0e61787ca68c10bd8 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/25246 Tested-by: Jenkins Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Ben Evans <bevans@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-7356 build: handle configure options for mount plugin Currently if you build lustre with configure options --disable-shared and/or --disable-static it will fail to build in the case of the mount plugins. The mount plugins are always built to be sharable code using libtool but this is not compatiable with the confiure --disable-share option. The solution was to create a temporary static library and for the static case we directly link into the lustre utilites. If shared libraries are enabled then that temporary library is turned into a dynamic plugin. The lustre utilites was updated to handle both cases. Test-Parameters: trivial Change-Id: I0eec25c8bce71c0e5c533ff3dfbe752677f37a26 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Reviewed-on: https://review.whamcloud.com/17581 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-6401 uapi: turn lustre_param.h into a proper UAPI header Move all the kernel specific function prototypes from lustre_param.h into obd_config.h which is a kernel only header. The inline functions lustre_is_*_valid are used only by user land so we can remove them. Remove the user land error checking with lustre_is_*_valid() since its the job of the kernel to validate the date passed in. The libcfs.h header shouldn't be exposed to user land so remove it. Change-Id: I6b6b4fe8f4d6799608c0e74318afecb85168ad54 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/24325 Tested-by: Jenkins Reviewed-by: Ben Evans <bevans@cray.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-6401 uapi: split lustre_disk.h into two headers The header lustre_disk.h is used by both user and kernel space but it contains kernel specific material. Split out the material that is used by both user land and kernel space into a new header. Change the utilities over to using this new UAPI header while the lustre kernel code keeps using the kernel version of lustre_disk.h. Change-Id: I2cc75e4e465e17cc45bebb3b61e2e16d4bd615f0 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/25194 Tested-by: Jenkins Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-7131 utils: add "--erase-param" option to tunefs.lustre This patch is to fix the following issues: - A new option "--erase-param" is added to tunefs.lustre, which allows to remove all instances of a specific parameter. - The behavior of option "--param" is improved a little. It will erase all previously stored instances of the parameter, and then store all new values specified in the command line. - For zfs only, the patch introduces a "null value" rule in the form of "<key>=" to mark a property to be removed from dataset by zfs_write_ldd() finally. - To keep the right semantics, if "--erase-params" is specified, all old parameters should be erased before any new changes are done. - test_89 conf-sanity.sh is added to verify these new features. Seagate-bug-id: MRP-153 Signed-off-by: Nikitas Angelinas <nikitas.angelinas@seagate.com> Signed-off-by: Emoly Liu <emoly.liu@intel.com> Change-Id: Ibc8d81227045471b8e5c56c7faf1275ad8bbbf86 Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com> Reviewed-by: Artem Blagodarenko <artem.blagodarenko@seagate.com> Reviewed-by: Alexey Lyashkov <alexey.lyashkov@seagate.com> Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com> Reviewed-on: https://review.whamcloud.com/16359 Reviewed-by: Bobi Jam <bobijam@hotmail.com> Tested-by: Jenkins Reviewed-by: Fan Yong <fan.yong@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-8900 snapshot: rename filesysetem fsname Introuduce new tunefs options "--rename" for renaming the existing Lustre filesystem fsname with configuration/parameters preserved. Usage: tunefs.lustre --fsname $NEW_FSNAME --rename $OLD_FSNAME ... NEW_FSNAME is the new fsname, must be specified. OLD_FSNAME is the old fsname, it is optional if the MGS and the MDT are combined together. It shares the functionality of fork/erase Lustre configuration logs in kernel. Signed-off-by: Fan Yong <fan.yong@intel.com> Change-Id: Ic9aaf6ed6209c7580bfabd4b660a6a7667576484 Reviewed-on: https://review.whamcloud.com/24268 Reviewed-by: Niu Yawei <yawei.niu@intel.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Tested-by: Oleg Drokin <oleg.drokin@intel.com>
LU-9132 utils: tuning max_sectors_kb on mount Sometimes user doesn't want the max_sectors_kb being overwritten on MDT/OST mount, we should provide a way for user to have more control over this important parameter, a new mount option 'max_sectors_kb' is introduced: - When max_sectors_kb isn't specified on mount, change the max_sectors_kb to max_hw_sectors_kb, it's default behavior suited for most users; - When max_sectors_kb is specified as zero, leave the old setting of max_sectors_kb untouched; - When max_sectors_kb is specified as a positive number, change the max_sectors_kb to this number arbitrarily; Signed-off-by: Niu Yawei <yawei.niu@intel.com> Change-Id: I251d75bbdf16d8cb6d503bbbfc69fb18993f7a3e Reviewed-on: https://review.whamcloud.com/25483 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Gu Zheng <gzheng@ddn.com> Reviewed-by: Andreas Dilger <andreas.dilger@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-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-3289 gss: don't build SSK if libssl-1.0+ not available The SSK functionality depends on libssl 1.0 or newer to have the proper HMAC support. If that is not available (e.g. SLES11) then don't try to build this feature at all. Rename the configure check to be OPENSSL_SSK since this is used in several places, and is more clear than HAVE_INT_OPENSSL_HMAC_FUNCS. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Change-Id: I3b15f819bba421539664e629a4017599e23ebbe5 Reviewed-on: http://review.whamcloud.com/22806 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Minh Diep <minh.diep@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>