summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lustre/obdclass/obd_mount.c
AgeCommit message (Collapse)Author
2018-06-05staging: lustre: delete the filesystem from the tree.Greg Kroah-Hartman
The Lustre filesystem has been in the kernel tree for over 5 years now. While it has been an endless source of enjoyment for new kernel developers learning how to do basic codingstyle cleanups, as well as an semi-entertaining source of bewilderment from the vfs developers any time they have looked into the codebase to try to figure out how to port their latest api changes to this filesystem, it has not really moved forward into the "this is in shape to get out of staging" despite many half-completed attempts. And getting code out of staging is the main goal of that portion of the kernel tree. Code should not stagnate and it feels like having this code in staging is only causing the development cycle of the filesystem to take longer than it should. There is a whole separate out-of-tree copy of this codebase where the developers work on it, and then random changes are thrown over the wall at staging at some later point in time. This dual-tree development model has never worked, and the state of this codebase is proof of that. So, let's just delete the whole mess. Now the lustre developers can go off and work in their out-of-tree codebase and not have to worry about providing valid changelog entries and breaking their patches up into logical pieces. They can take the time they have spend doing those types of housekeeping chores and get the codebase into a much better shape, and it can be submitted for inclusion into the real part of the kernel tree when ready. Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-25staging: lustre: remove libcfs_all.h from lustre/include/*.hNeilBrown
Instead of the catch-all libcfs_all.h, just include the files actually needed in different places. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: lustre: obd_mount: use correct niduuid suffix.NeilBrown
Commit 4f016420d368 ("Staging: lustre: obdclass: Use kasprintf") moved some sprintf() calls earlier in the code to combine them with memory allocation and create kasprintf() calls. In one case, this code movement moved the sprintf to a location where the values being formatter were different. In particular sprintf(niduuid, "%s_%x", mgcname, i); was move from *after* the line i = 0; to a location where the value of 'i' was at least 1. This cause the wrong name to be formatted, and triggers CERROR("del MDC UUID %s failed: rc = %d\n", niduuid, rc); at unmount time. So use '0' instead of 'i'. Fixes: 4f016420d368 ("Staging: lustre: obdclass: Use kasprintf") Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08staging: lustre: obd_mount: fix possible race with module unload.NeilBrown
lustre_fill_super() calls client_fill_super() without holding a reference to the module containing client_fill_super. If that module is unloaded at a bad time, this can crash. To be able to get a reference to the module using try_get_module(), we need a pointer to the module. So replace lustre_register_client_fill_super() and lustre_register_kill_super_cb() with a single lustre_register_super_ops() which also passed a module pointer. Then use a spinlock to ensure the module pointer isn't removed while try_module_get() is running, and use try_module_get() to ensure we have a reference before calling client_fill_super(). Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08staging: lustre: obdclass: remove vfsmount option from client_fill_superNeilBrown
This arg is always NULL and is never used. So discard it from this and related functions. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08staging: lustre: obdclass: remove pointless struct lustre_mount_data2NeilBrown
This is used to pass a void* and NULL to lustre_fill_super(). It is easier just to pass the void*. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08staging: lustre: obdclass: discard FS_NEEDS_DEV flag.NeilBrown
Lustre mounts do not need a dev, as we can see from lustre_mount() calling mount_nodev(). So remove the flag which could cause confusion elsewhere. Also format lustre_fs_types so that fields line up. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-11staging: lustre: add SPDX identifiers to all lustre filesGreg Kroah-Hartman
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/staging/lustre files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: James Simmons <jsimmons@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-22staging: lustre: obdclass: add include path to MakefileJames Simmons
Rationalize include paths in the obdclass source code files. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-22staging: lustre: uapi: migrate remaining uapi headers to uapi directoryJames Simmons
Move all the remaining lustre headers shared between user land and kernel space to the uapi directory. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/25246 Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr> Reviewed-by: Ben Evans <bevans@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-22staging: lustre: uapi: don't memory allocate in UAPI headerJames Simmons
The inline function lustre_cfg_new() calls kzalloc() but this is a UAPI header. Remove kzalloc() and rename the function to lustre_cfg_init(). The lustre kernel code that was calling lustre_cfg_new() can doing the memory allocation and pass the new buffer to lustre_cfg_init() to fill in. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/26966 Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr> Reviewed-by: Ben Evans <bevans@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-22staging: lustre: uapi: remove lustre_cfg_free wrapperJames Simmons
Replace all lustre_cfg_free() calls with direct kfree() call. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/26966 Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr> Reviewed-by: Ben Evans <bevans@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-22staging: lustre: uapi: move lustre_param.h to uapi directoryJames Simmons
Move the header lustre_param.h to proper uapi directory. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24325 Reviewed-by: Ben Evans <bevans@cray.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: obd: move s3 in lmd_parse to inner loopJames Simmons
Building the lustre client with W=1 reports the following error: obdclass/obd_mount.c: In function lmd_parse: obdclass/obd_mount.c:880: warning: variable set but not used The solution is to move s3 to the inner loop where it is only used. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8378 Reviewed-on: https://review.whamcloud.com/23820 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14staging: lustre: ptlrpc: mbits is sent within ptlrpc_bodyLiang Zhen
ptlrpc is using rq_xid as matchbits of bulk data, which means it has to change rq_xid for bulk resend to avoid several bulk data landing into the same buffer from different resends. This patch uses one of reserved __u64 of ptlrpc_body to transfer mbits to peer, matchbits is now separated from xid. With this change, ptlrpc can keep rq_xid unchanged on resend, it only updates matchbits for bulk data. This protocol change is only applied if both sides of connection have OBD_CONNECT_BULK_MBITS, otherwise, ptlrpc still uses old approach and update xid while resending bulk. Signed-off-by: Liang Zhen <liang.zhen@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3534 Reviewed-on: http://review.whamcloud.com/15421 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14staging: lustre: llite: support SELinux context labellingAndrew Wellington
SELinux contexts are applied by the kernel if mount options are not binary. As we don't use any binary mount options in Lustre, remove the binary mount option flag. Signed-off-by: Andrew Wellington <andrew.wellington@anu.edu.au> Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6950 Reviewed-on: http://review.whamcloud.com/15840 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging: lustre: obd: remove unused LSM parametersJohn L. Hammond
Remove unused struct lov_stripe_md * parameters from obd_get_info(), mgc_enqueue(), and osc_brw_prep_request(). Signed-off-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814 Reviewed-on: http://review.whamcloud.com/13426 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-19staging: lustre: remove lustre/include/linux/John L. Hammond
Merge the contents of lustre/include/linux/lvfs.h into lustre/include/lvfs.h. Merge lustre/include/linux/lustre_user.h into lustre/include/lustre/lustre_user.h. Move lustre_compat25.h and lustre_patchless_compat.h from lustre/include/linux/ to lustre/include/ and rename lustre_compat25.h to lustre_compat.h. Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675 Reviewed-on: http://review.whamcloud.com/13271 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Amir Shehata <amir.shehata@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-19staging: lustre: build: bump build version warnings to x.y.53Andreas Dilger
Move the LUSTRE_VERSION_CODE checks to trigger on x.y.53 instead of x.y.50, so that it is into the development cycle that they are hit instead of right at the start. In many cases, the #warning has been removed (to prevent build errors) and instead the code is just disabled outright. The dead code can be seen easily and removed in the future with less interruption to the development process. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Emoly Liu <emoly.liu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4217 Reviewed-on: http://review.whamcloud.com/8630 Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Tested-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-01staging/lustre: release MGC device if connect failsJohn L. Hammond
In lustre_fill_super() if lustre_start_mgc() fails then call lustre_common_put_super() to release a reference on the MGC device attached to the LSI. Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/20851 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8297 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Mike Pershin <mike.pershin@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21staging/lustre: Make alignment match open parenthesisOleg Drokin
This patch fixes most of checkpatch occurences of "CHECK: Alignment should match open parenthesis" in Lustre code. Signed-off-by: Emoly Liu <emoly.liu@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21staging/lustre: Add spaces preferred around that '{+, -, *, /, |, <<, >>, &}'Oleg Drokin
This patch fixes all checkpatch occurences of "CHECK: spaces preferred around that '{+,-,*,/,|,<<,>>,&}' (ctx:VxV)" in Lustre code. Signed-off-by: Emoly Liu <emoly.liu@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21staging/lustre: Fix unnecessary parentheses around variablesEmoly Liu
This patch fixes all checkpatch occurences of "CHECK: Unnecessary parentheses around xxx" in Lustre code. Signed-off-by: Emoly Liu <emoly.liu@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21staging: lustre: obdclass: compile issues with variable not being initializedJames Simmons
One of the versions of gcc I have refuses to build obd_mount.c due to index not be initialized in function lmd_make_exclusion before it is used. Signed-off-by: James Simmons <uja.ornl@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629 Reviewed-on: http://review.whamcloud.com/10705 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21staging: lustre: obdclass: bug fixes for lu_device_type handlingFan Yong
There was no protection when inc/dec lu_device_type::ldt_device_nr, which may caused the ldt_device_nr to be wrong and trigger assert. This patch redefine lu_device_type::ldt_device_nr as atomic type. There was no protection when add/del lu_device_type::ldt_linkage into/from the global lu_device_types list, which may caused bad address accessing. This patch uses the existing obd_types_lock to protect related operations. We do NOT need lu_types_stop() any longer. Such function scans the global lu_device_types list, and for each type item on it which has zerod lu_device_type::ldt_device_nr, call its stop() method. In fact, the lu_device_type::ldt_device_nr only will be zero when the last lu_device_fini() is called, and at that time, inside the lu_device_fini(), its stop() method will be called. So it is unnecessary to call the stop() again via lu_types_stop(). Signed-off-by: Fan Yong <fan.yong@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4604 Reviewed-on: http://review.whamcloud.com/8694 Reviewed-by: Jian Yu <jian.yu@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21staging: lustre: obdclass: fix lmd_parse() to handle comma-separated NIDsJian Yu
This patch handles the upgrade situation that old mountdata already contains comma-separated NIDs. The correct way to fix the original issue is to parse comma-separated NIDs in lmd_parse(). Signed-off-by: Jian Yu <jian.yu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4460 Reviewed-on: http://review.whamcloud.com/8918 Reviewed-by: Niu Yawei <yawei.niu@intel.com> Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/lustre: Replace sun.com GPLv2 URL with gnu.org one.Oleg Drokin
http://www.sun.com/software/products/lustre/docs/GPLv2.pdf is no longer around, so replae it with (hopefully more permanent) http://http://www.gnu.org/licenses/gpl-2.0.html Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/lustre: Remove the "Please contact SUN for GPL" from headersOleg Drokin
Since SUN is no longer around and there's no point in contacting them, just remove that whole thing. Copy of GPL is available online anyway (URLs to be updated in next patch). This patch was generated with: find drivers/staging/lustre -name "*.[ch]" -exec perl -0777 -i -pe 's/ \* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,\n \* CA 95054 USA or visit www.sun.com if you need additional information or\n \* have any questions.\n \*\n//igs' {} \; Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-07staging: lustre: set function scope with staticTobin C Harding
A number of function definitions were found to be candidates for static scoping. This patch adds static to these functions. Signed-off-by: Tobin C Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09staging: lustre: debug: clean up console messagesAndreas Dilger
Clean up overly verbose console error messages, improve others. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1095 Reviewed-on: http://review.whamcloud.com/8617 Reviewed-by: Faccini Bruno <bruno.faccini@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-26staging: lustre: obd: MDT mount fails on MDS w/o MGS on itBobi Jam
If we specify multiple --mgsnode for a MDT, when we start MDS upon it while MGS is no the other node, the MGC import connection will always select the local nid (which is one of the candidate mgsnode) since it think its the closest connection. This patch treats further --mgsnode nids as failover nids, so that multiple import connections are added for the MGC import. Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3829 Reviewed-on: http://review.whamcloud.com/7509 Reviewed-by: Liang Zhen <liang.zhen@intel.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01staging/lustre/obdclass: Fix style vs open parenthesis alignmentOleg Drokin
This mostly fixes checkpatch complaints about "Alignment should match open parenthesis" Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25staging/lustre/obdclass: Adjust comments to better conform to coding styleOleg Drokin
This patch fixes "Block comments use a trailing */ on a separate line" warnings from checkpatch Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging: lustre: obdclass: obd_mount: Declare function as staticAmitoj Kaur Chawla
Declare lustre_mount() function static since it is defined and called in this file only. This fixes the following sparse warning: drivers/staging/lustre/lustre/obdclass/obd_mount.c:1169:15: warning: symbol 'lustre_mount' was not declared. Should it be static? Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging/lustre/obdclass: Adjust NULL comparison codestyleOleg Drokin
All instances of "x == NULL" are changed to "!x" and "x != NULL" to "x" Also remove some redundant assertions. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21staging: lustre: update Intel copyright messages 2015Andreas Dilger
Update copyright messages in files modified by Intel employees in 2015 by non-trivial patches. Exclude patches that are only deleting code, renaming functions, or adding or removing whitespace. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7243 Reviewed-on: http://review.whamcloud.com/16758 Reviewed-by: James Nunez <james.a.nunez@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: lustre: fix buffer overflow of string bufferDmitry Eremin
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> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629 Reviewed-on: http://review.whamcloud.com/9389 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: lustre: provide separate buffers for libcfs_*2str()Dmitry Eremin
Provide duplicates with separate buffers for libcfs_*2str() functions. Replace libcfs_nid2str() with libcfs_nid2str_r() function in critical places. Provide buffer size for nf_addr2str functions. Use __u32 as nf_type always Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6070 Reviewed-on: http://review.whamcloud.com/13185 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16Staging: lustre: obdclass: Remove unnecessary cast on void pointerShraddha Barke
void pointers do not need to be cast to other pointer types. Semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: lustre: remove multiple blank linesMike Rapoport
Fixes checkpatch.pl CHECK:LINE_SPACING: Please don't use multiple blank lines. The patch is generated using checkpatch.pl --fix-inplace: for f in $(find drivers/staging/lustre/ -type f) ; do ./scripts/checkpatch.pl --types "LINE_SPACING" --test-only=multiple \ --fix-inplace -f $f done Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: lustre: add missing blank line after declarationsMike Rapoport
Fixes checkpatch.pl WARNING:LINE_SPACING: Missing a blank line after declarations. The patch is generated using checkpatch.pl --fix-inplace: for f in $(find drivers/staging/lustre/ -type f) ; do ./scripts/checkpatch.pl --types "LINE_SPACING" --test-only=Missing \ --fix-inplace -f $f done Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04Staging: lustre: obdclass: obd_mount: Declare as staticShraddha Barke
Declare lustre_fs_type, do_lcfg, lustre_fill_super, lustre_put_lsi, lustre_init_lsi, lustre_start_simple, server_name2index and server_name2fsname as static since they are used only in this particular file.Also remove corresponding declarations from header files. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging/lustre: Remove unused function server_name2svname()Oleg Drokin
All users are only in the server code Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16staging/lustre: remove IS_MDS|IS_OST|IS_MGS defines and usersOleg Drokin
These could only happen on the server, so they make no sense on the client. Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16staging/lustre: Remove IS_SERVER and all usersOleg Drokin
Since the client can never be server, this is all dead code. Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: lustre: fix TRAILING_STATEMENTS checkpatch errorsMike Rapoport
Move trailing statements to be on the next line to fix the TRAILING_STATEMENTS checkpatch error. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05Staging: lustre: obdclass: Use kasprintfShraddha Barke
This patch uses kasprintf which combines kzalloc and sprintf. kasprintf also takes care of the size calculation. Semantic patch used is as follows: @@ expression a,flag; expression list args; statement S; @@ a = - \(kmalloc\|kzalloc\)(...,flag) + kasprintf (flag,args) <... when != a if (a == NULL || ...) S ...> - sprintf(a,args); Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31staging/lustre: Drop FS_HAS_FIEMAP compat macroOleg Drokin
FS_HAS_FIEMAP was some sort of old RHEL5 construct that's not really important anymore Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-13staging: lustre: obdclass: Use !x to check for kzalloc failureJulia Lawall
!x is more normal for kzalloc failure in the kernel. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x; statement S1, S2; @@ x = kzalloc(...); if ( - x == NULL + !x ) S1 else S2 // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08Staging: lustre: Clean up Coding style FixPrasanna Karthik
Preferred use of '*' is adjacent to the data name or function name Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>