summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/include
Commit message (Collapse)AuthorAgeFilesLines
...
* staging: lustre: Use kernel's strncasecmp and remove cfs_get_blocked_sigsJames Simmons2016-02-032-3/+0
| | | | | | | | | | | | | | | | Remove libcfs function cfs_strncasecmp() since the kernel already has its own strncasecmp(). Lastly remove from libcfs.h cfs_get_blocked_sigs() since this function no longer exist. Signed-off-by: James Simmons <uja.ornl@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3963 Reviewed-on: http://review.whamcloud.com/13070 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Patrick Farrell <paf@cray.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>
* staging: lustre: add debugging ability for LFSCKFan Yong2016-02-031-1/+1
| | | | | | | | | | | | Add the ability to debug LFSCK to libcfs. This is broken out of patch http://review.whamcloud.com/6321. Signed-off-by: Fan Yong <fan.yong@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2914 Reviewed-on: http://review.whamcloud.com/6321 Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: Remove unused memhog functionalityNiranjan Dighe2016-02-031-5/+0
| | | | | | | | | | | Remove IOC_LIBCFS_MEMHOG ioctl functionality as it is no longer needed thereby making functions like - kportal_memhog_alloc(), kportal_memhog_free() and type - struct libcfs_device_userstate unused. Signed-off-by: Niranjan Dighe <ndighe@visteon.com> Acked-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tree wide: use kvfree() than conditional kfree()/vfree()Tetsuo Handa2016-01-221-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are many locations that do if (memory_was_allocated_by_vmalloc) vfree(ptr); else kfree(ptr); but kvfree() can handle both kmalloc()ed memory and vmalloc()ed memory using is_vmalloc_addr(). Unless callers have special reasons, we can replace this branch with kvfree(). Please check and reply if you found problems. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Jan Kara <jack@suse.com> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Acked-by: "Rafael J. Wysocki" <rjw@rjwysocki.net> Acked-by: David Rientjes <rientjes@google.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: Boris Petkov <bp@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Staging: lustre: lnet: Remove functions LNetEQWait and LNetEQGetShraddha Barke2015-12-211-6/+0
| | | | | | | | Functions LNetEQWait and LNetEQGet are defined but not used. Thus remove it. Also remove corresponding declarations from header file. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: libcfs.h: remove IS_PO2 and __is_po2Aya Mahfouz2015-12-211-7/+0
| | | | | | | | Removes IS_PO2 and __is_po2 since the uses of IS_PO2 have been replaced by is_power_of_2 Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: update Intel copyright messages 2015Andreas Dilger2015-12-216-6/+7
| | | | | | | | | | | | | | | 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>
* Merge 4.4-rc5 into staging-nextGreg Kroah-Hartman2015-12-131-1/+0
|\ | | | | | | | | | | We want those fixes in here for testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging/lustre: remove IOC_LIBCFS_PING_TEST ioctlJames Simmons2015-12-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The ioctl IOC_LIBCFS_PING_TEST has not been used in ages. The recent nidstring changes which moved all the nidstring operations from libcfs to the LNet layer but this ioctl code was still using an nidstring operation that was causing a circular dependency loop between libcfs and LNet. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | staging: lustre: remove libcfs_debug_set_level prototype from libcfs_private.hfrank zago2015-11-151-2/+0
| | | | | | | | | | | | | | | | | | The function libcfs_debug_set_level is used only internally so no reason to expose it in libcfs_private.h. This is broken out from LU-5829 patch http://review.whamcloud.com/13319. Signed-off-by: frank zago <fzago@cray.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: lustre: libcfs: Remove unused functionsShraddha Barke2015-11-151-7/+0
| | | | | | | | | | | | | | | | The functions cfs_hash_bd_findadd_locked and cfs_hash_bd_finddel_locked are not used anywhere. Thus remove these functions. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: lustre: move linux hash.h header to start of libcfs_hash.hJames Simmons2015-11-151-2/+3
| | | | | | | | | | | | | | | | Minor style cleanup to put hash.h header to the top of the libcfs_hash.h file. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: lustre: remove obsolete comment in libcfs_hash.hJames Simmons2015-11-151-7/+0
| | | | | | | | | | | | | | Remove comment hash_long which was removed long ago. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: lustre: remove white space in libcfs_hash.hJames Simmons2015-11-151-65/+70
| | | | | | | | | | | | | | Cleanup all the unneeded white space in libcfs_hash.h. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: lustre: potential underflow in libcfs_kkuc_group_add()Dan Carpenter2015-11-151-1/+1
|/ | | | | | | | | | | My static checker says that "group" is a user controlled number that can be negative leading to an array underflow. I have looked at it, and I'm not an expert enough in lustre to say for sure if it is really a bug. Anyway, it's simple enough to make the variable unsigned which pleases the static checker and makes it easier to audit. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mm, page_alloc: distinguish between being unable to sleep, unwilling to ↵Mel Gorman2015-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sleep and avoiding waking kswapd __GFP_WAIT has been used to identify atomic context in callers that hold spinlocks or are in interrupts. They are expected to be high priority and have access one of two watermarks lower than "min" which can be referred to as the "atomic reserve". __GFP_HIGH users get access to the first lower watermark and can be called the "high priority reserve". Over time, callers had a requirement to not block when fallback options were available. Some have abused __GFP_WAIT leading to a situation where an optimisitic allocation with a fallback option can access atomic reserves. This patch uses __GFP_ATOMIC to identify callers that are truely atomic, cannot sleep and have no alternative. High priority users continue to use __GFP_HIGH. __GFP_DIRECT_RECLAIM identifies callers that can sleep and are willing to enter direct reclaim. __GFP_KSWAPD_RECLAIM to identify callers that want to wake kswapd for background reclaim. __GFP_WAIT is redefined as a caller that is willing to enter direct reclaim and wake kswapd for background reclaim. This patch then converts a number of sites o __GFP_ATOMIC is used by callers that are high priority and have memory pools for those requests. GFP_ATOMIC uses this flag. o Callers that have a limited mempool to guarantee forward progress clear __GFP_DIRECT_RECLAIM but keep __GFP_KSWAPD_RECLAIM. bio allocations fall into this category where kswapd will still be woken but atomic reserves are not used as there is a one-entry mempool to guarantee progress. o Callers that are checking if they are non-blocking should use the helper gfpflags_allow_blocking() where possible. This is because checking for __GFP_WAIT as was done historically now can trigger false positives. Some exceptions like dm-crypt.c exist where the code intent is clearer if __GFP_DIRECT_RECLAIM is used instead of the helper due to flag manipulations. o Callers that built their own GFP flags instead of starting with GFP_KERNEL and friends now also need to specify __GFP_KSWAPD_RECLAIM. The first key hazard to watch out for is callers that removed __GFP_WAIT and was depending on access to atomic reserves for inconspicuous reasons. In some cases it may be appropriate for them to use __GFP_HIGH. The second key hazard is callers that assembled their own combination of GFP flags instead of starting with something like GFP_KERNEL. They may now wish to specify __GFP_KSWAPD_RECLAIM. It's almost certainly harmless if it's missed in most cases as other activity will wake kswapd. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Christoph Lameter <cl@linux.com> Cc: David Rientjes <rientjes@google.com> Cc: Vitaly Wool <vitalywool@gmail.com> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* staging: lustre: cleanup over 80 characters in libcfs_hash.hJames Simmons2015-10-291-69/+93
| | | | | | | | | Fix up all the over 80 character line issues in libcfs_hash.h reported by checkpatch.pl. At the same time update this header to match what is in the OpenSFS lustre branch. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: change cfs_hash_head*_t to structJames Simmons2015-10-291-2/+2
| | | | | | | | Change cfs_hash_head_t and cfs_head_head_dep_t from typedef to true structures. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: change cfs_hash_dhead*_t to structJames Simmons2015-10-291-2/+2
| | | | | | | | Change cfs_hash_dhead_t and cfs_head_dhead_dep_to from typedef to true structures. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: change cfs_hash_ops_t to structJames Simmons2015-10-291-10/+11
| | | | | | | Change cfs_hash_ops_t to struct cfs_hash_ops. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: change cfs_hash_hlist_ops_t to structJames Simmons2015-10-291-2/+2
| | | | | | | Change cfs_hash_hlist_ops_t to struct cfs_hash_hlist_ops. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: change cfs_hash_lock_ops_t to structJames Simmons2015-10-291-2/+2
| | | | | | | Change cfs_hash_lock_ops_t to struct cfs_hash_lock_ops. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: provide separate buffers for libcfs_*2str()Dmitry Eremin2015-10-241-7/+24
| | | | | | | | | | | | | | | | | | 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>
* staging: lustre: add in NID range management for libcfsJoshua Walgenbach2015-10-241-0/+3
| | | | | | | | | | | | | | | This is a partial backport of the NID range management added in for nodemap. We only backport the libcfs related parts here. Signed-off-by: Joshua Walgenbach <jjw@iu.edu> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3527 Reviewed-on: http://review.whamcloud.com/8057 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Ken Hornstein <kenh@cmf.nrl.navy.mil> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: move cfs_ip_addr_* function from kernel libcfs to LNetJames Simmons2015-10-242-2/+2
| | | | | | | | | | | | | | | | Both of cfs_ip_addr_parse and cfs_ip_addr_match which are located in libcfs kernel module are used only for LNet so move this into the nidstring handling code where it belongs. Also create user land versions of these functions in the libcfs user land library. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/15085 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: move struct netstrfns to nidstr.hJames Simmons2015-10-241-0/+13
| | | | | | | | | | | | | | | | | The reason struct netstrfns exist in nidstrings.c was to avoid forward decleration errors. The best way to handle this instead is to move this structure to a header file. Since this structure is used in the userland utilities as well so we place it in nidstr.h which is exposed to userland. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/15083 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: remove cfs_ip_addr_free wrapperJames Simmons2015-10-241-1/+0
| | | | | | | | | No need to have a one line wrapper in libcfs that only is used to delete a list which is only done once in the LNet layer. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: remove libcfs_init_string functionJames Simmons2015-10-241-2/+0
| | | | | | | | | All the function libcfs_init_string did was initialize a spinlock. We can initialize the spinlock statically instead. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: add a service that prints a nidlistGregoire Pichon2015-10-242-0/+4
| | | | | | | | | | | | | | | | | | | | | | The libcfs already provides services to parse a string into a nidlist and to match a nid into a nidlist. This patch implements a service that prints a nidlist into a buffer. This is required for instance to print the nosquash_nids parameter of the MDT procfs component. Additionally, this patch fixes a bug in return code of parse_addrange() routine, so that parsing of nids including a * character works fine ('*@elan' for instance). Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1778 Reviewed-on: http://review.whamcloud.com/9221 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Liang Zhen <liang.zhen@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: remove multiple blank linesMike Rapoport2015-10-131-3/+0
| | | | | | | | | | | | | | | 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>
* staging/lustre: remove CFS_TIME_T definitionArnd Bergmann2015-09-291-1/+0
| | | | | | | | | | | | | | The CFS_TIME_T macro serves no real purpose as we stopped using time_t and changed over to time64_t, so we can remove the last remaining uses of this. Two uses of this macro are incorrect and refer to jiffies values rather than time_t, and one refers to an inode timespec that gets changed separately. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre: remove unused time handling functionsArnd Bergmann2015-09-292-66/+0
| | | | | | | | | | A bunch of API functions deal with time values but are now completely unused in lustre. This removes them in order to remove all references to time_t from the header files. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre: remove wrappers for timer functionsArnd Bergmann2015-09-292-15/+0
| | | | | | | | | | | | | | This is a simple cleanup that I did after noticing that the abstraction for the timer functions in completely pointless, and the one user (ptlrpc) can just as well call the native Linux functions. For good measure, this also removes the empty libcfs_arch_init() and libcfs_arch_cleanup() functions that are defined in the same file. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre: use 64-bit time for ni_last_aliveArnd Bergmann2015-09-291-1/+1
| | | | | | | | | | | The ni_last_alive member of lnet_ni uses a 'long' to store a timestamp, which breaks on 32-bit systems in 2038. This changes it to use time64_t and the respective functions for it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre: use jiffies_to_*() instead of cfs_duration_usecArnd Bergmann2015-09-291-15/+0
| | | | | | | | | | | | | | | | | | | The cfs_duration_usec() function has a timeval as its output, which we want to avoid in general because of the y2038 problem. There are only two locations remaining in lustre, so we can for now replace one with jiffies_to_timeval(), which is a generic kernel function that does the same thing, the other can just use jiffies_to_usecs() and completely avoid the timeval. This is not a full solution yet, but it's a small step that lets us build a larger portion of lustre without this reference to timeval in a header file, and avoid triggering automated checking tools that wants to warn about timeval. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre: use 'long' return type for cfs_duration_sec()Arnd Bergmann2015-09-291-1/+1
| | | | | | | | | | | | The cfs_duration_sec() converts a relative jiffies value into seconds, and returns that number as a time_t. We know that a 32-bit type is enough here, because the result is order of magnitudes smaller than the difference in jiffies that is also expressed as a 'long', so we can safely replace the time_t type with long as well. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre: tracefile: document seconds overflowArnd Bergmann2015-09-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The lustre tracefile has a timestamp defined as __u32 ph_sec; __u64 ph_usec; which seems completely backwards, as the microsecond portion of a time stamp will always fit into a __u32 value, while the second portion will overflow in 2038 or 2106 (in case of unsigned seconds). Changing this would unfortunately change the format in an incompatible way, breaking all existing user space tools that access the data. This uses ktime_get_real_ts64() to replace the insufficient do_gettimeofday() and then truncates the seconds portion to an u32 type, along with comments to explain the result. A possible alternative would be the use of ktime_get_ts64() to read a monotonic timestamp that never overflows, but this would trigger a check in user space 'hdr->ph_sec < (1 << 30)' that attempts to ensure that the values are within a reasonable range. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre: use jiffies for lp_last_query timesArnd Bergmann2015-09-291-1/+1
| | | | | | | | | | | | | | | | The recently introduced lnet_peer_set_alive() function uses get_seconds() to read the current time into a shared variable, but all other uses of that variable compare it to jiffies values. This changes the current use to jiffies as well for consistency. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: af3fa7c71bf ("staging/lustre/lnet: peer aliveness status and NI status") Cc: Liang Zhen <liang.zhen@intel.com> Cc: James Simmons <uja.ornl@gmail.com> Cc: Isaac Huang <he.huang@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre: use __noreturn for lbug_with_locJuston Li2015-09-161-1/+1
| | | | | | | | | | | | | | | fixes sparse error: drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c:149:6: error: symbol 'lbug_with_loc'redeclared with different type (originally declared at drivers/staging/lustre/lustre/libcfs/linux/../../../include/linux/libcfs/libcfs_private.h:82) - different modifiers Use the __noreturn macro instead of __attribute__((noreturn)) The macro is exactly that but its usage seems more common and it is bit more readable. Signed-off-by: Juston Li <juston.h.li@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre/libcfs: remove unused cfs_timer_doneJames Simmons2015-09-151-1/+0
| | | | | | | | | | | | | Remove the cfs_timer_done function in the libcfs kernel module since it is not used anywhere. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Signed-off-by: frank zago <fzago@cray.com> Reviewed-on: http://review.whamcloud.com/13917 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre/lnet: Reenable lnet router debugfsOleg Drokin2015-09-152-2/+10
| | | | | | | | | It looks like router proc files were defined out, so I missed them during debugfs conversion. Reenable the code and move all the variables to debugfs. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: include: put constant on the right of binary operatorJulia Lawall2015-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move constants to the right of binary operators. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ constant c; expression e; binary operator b = {==,!=,&,|}; @@ ( - c + e b - e + c | - c < e + e > c ) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre-libcfs: fix sparse warningPatrick Boettcher2015-08-141-0/+13
| | | | | | | | | Fix sparse warnings of the following type: warning: symbol '....' was not declared. Should it be static? Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: staging: Drop unlikely before IS_ERR(_OR_NULL)Viresh Kumar2015-07-311-1/+1
| | | | | | | | | | | IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there is no need to do that again from its callers. Drop it. This also replaces an IS_ERR(x) + (x == NULL) check to IS_ERR_OR_NULL check. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: Replace strtoul with simple_strtoulGuenter Roeck2015-07-241-2/+0
| | | | | | | | | | | | | | | | | | Defining and using strtoul in lustre code results in the following compile warnings (arm64:allmodconfig). include/linux/libcfs/libcfs_string.h:105:0: warning: "strtoul" redefined #define strtoul(str, endp, base) simple_strtoul(str, endp, base) include/acpi/platform/aclinux.h:122:0: note: this is the location of the previous definition #define strtoul simple_strtoul Remove the definition and use simple_strtoul() directly. Note that we can not replace simple_strtoul with kstrtoul since the end pointer is used by the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: libcfs: move assignment out of conditionalPerry Hooker2015-07-131-8/+10
| | | | | | | Found by checkpatch.pl Signed-off-by: Perry Hooker <perry.hooker@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre/libcfs: Remove unneeded lnet watchdog_ratelimit sysctlDmitry Eremin2015-07-131-1/+0
| | | | | | | It is no longer used anywhere. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/lustre/libcfs: Remove redundant enums and sysctl moduleparamsDmitry Eremin2015-07-131-27/+1
| | | | | | | | | /proc/sys/lnet/lnet_memused Remove memory tracking for LNet. Remove redundant enums definition. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:lustre: Update license and copyright for the LNET headersJames Simmons2015-06-118-55/+28
| | | | | | | Point to the right place for GNU license. Update Intel copyright. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:lustre: LNet header code cleanup - indentation etcJames Simmons2015-06-116-538/+595
| | | | | | | | | Handle all the style issues reported by checkpatch.pl. Remove general white spaces, spaces in function calls, alignments etc. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud