aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-12-06posix acls: Remove duplicate xattr name definitionsAndreas Gruenbacher1-2/+2
Remove POSIX_ACL_XATTR_{ACCESS,DEFAULT} and GFS2_POSIX_ACL_{ACCESS,DEFAULT} and replace them with the definitions in <include/uapi/linux/xattr.h>. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: James Morris <james.l.morris@oracle.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-12-06staging/lustre: remove IOC_LIBCFS_PING_TEST ioctlJames Simmons2-18/+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>
2015-11-10Merge branch 'for-4.4/io-poll' of git://git.kernel.dk/linux-blockLinus Torvalds1-2/+3
Pull block IO poll support from Jens Axboe: "Various groups have been doing experimentation around IO polling for (really) fast devices. The code has been reviewed and has been sitting on the side for a few releases, but this is now good enough for coordinated benchmarking and further experimentation. Currently O_DIRECT sync read/write are supported. A framework is in the works that allows scalable stats tracking so we can auto-tune this. And we'll add libaio support as well soon. Fow now, it's an opt-in feature for test purposes" * 'for-4.4/io-poll' of git://git.kernel.dk/linux-block: direct-io: be sure to assign dio->bio_bdev for both paths directio: add block polling support NVMe: add blk polling support block: add block polling support blk-mq: return tag/queue combo in the make_request_fn handlers block: change ->make_request_fn() and users to return a queue cookie
2015-11-07Merge branch 'akpm' (patches from Andrew)Linus Torvalds10-13/+13
Merge second patch-bomb from Andrew Morton: - most of the rest of MM - procfs - lib/ updates - printk updates - bitops infrastructure tweaks - checkpatch updates - nilfs2 update - signals - various other misc bits: coredump, seqfile, kexec, pidns, zlib, ipc, dma-debug, dma-mapping, ... * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (102 commits) ipc,msg: drop dst nil validation in copy_msg include/linux/zutil.h: fix usage example of zlib_adler32() panic: release stale console lock to always get the logbuf printed out dma-debug: check nents in dma_sync_sg* dma-mapping: tidy up dma_parms default handling pidns: fix set/getpriority and ioprio_set/get in PRIO_USER mode kexec: use file name as the output message prefix fs, seqfile: always allow oom killer seq_file: reuse string_escape_str() fs/seq_file: use seq_* helpers in seq_hex_dump() coredump: change zap_threads() and zap_process() to use for_each_thread() coredump: ensure all coredumping tasks have SIGNAL_GROUP_COREDUMP signal: remove jffs2_garbage_collect_thread()->allow_signal(SIGCONT) signal: introduce kernel_signal_stop() to fix jffs2_garbage_collect_thread() signal: turn dequeue_signal_lock() into kernel_dequeue_signal() signals: kill block_all_signals() and unblock_all_signals() nilfs2: fix gcc uninitialized-variable warnings in powerpc build nilfs2: fix gcc unused-but-set-variable warnings MAINTAINERS: nilfs2: add header file for tracing nilfs2: add tracepoints for analyzing reading and writing metadata files ...
2015-11-07Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdmaLinus Torvalds2-19/+22
Pull rdma updates from Doug Ledford: "This is my initial round of 4.4 merge window patches. There are a few other things I wish to get in for 4.4 that aren't in this pull, as this represents what has gone through merge/build/run testing and not what is the last few items for which testing is not yet complete. - "Checksum offload support in user space" enablement - Misc cxgb4 fixes, add T6 support - Misc usnic fixes - 32 bit build warning fixes - Misc ocrdma fixes - Multicast loopback prevention extension - Extend the GID cache to store and return attributes of GIDs - Misc iSER updates - iSER clustering update - Network NameSpace support for rdma CM - Work Request cleanup series - New Memory Registration API" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (76 commits) IB/core, cma: Make __attribute_const__ declarations sparse-friendly IB/core: Remove old fast registration API IB/ipath: Remove fast registration from the code IB/hfi1: Remove fast registration from the code RDMA/nes: Remove old FRWR API IB/qib: Remove old FRWR API iw_cxgb4: Remove old FRWR API RDMA/cxgb3: Remove old FRWR API RDMA/ocrdma: Remove old FRWR API IB/mlx4: Remove old FRWR API support IB/mlx5: Remove old FRWR API support IB/srp: Dont allocate a page vector when using fast_reg IB/srp: Remove srp_finish_mapping IB/srp: Convert to new registration API IB/srp: Split srp_map_sg RDS/IW: Convert to new memory registration API svcrdma: Port to new memory registration API xprtrdma: Port to new memory registration API iser-target: Port to new memory registration API IB/iser: Port to new fast registration API ...
2015-11-07block: change ->make_request_fn() and users to return a queue cookieJens Axboe1-2/+3
No functional changes in this patch, but it prepares us for returning a more useful cookie related to the IO that was queued up. Signed-off-by: Jens Axboe <axboe@fb.com> Acked-by: Christoph Hellwig <hch@lst.de> Acked-by: Keith Busch <keith.busch@intel.com>
2015-11-06mm: page_alloc: remove GFP_IOFSMel Gorman9-12/+12
GFP_IOFS was intended to be shorthand for clearing two flags, not a set of allocation flags. There is only one user of this flag combination now and there appears to be no reason why Lustre had to be protected from reclaim stalls. As none of the sites appear to be atomic, this patch simply deletes GFP_IOFS and converts Lustre to using GFP_KERNEL, GFP_NOFS or GFP_NOIO as appropriate. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-06mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapdMel Gorman1-1/+1
__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>
2015-11-05Merge tag 'locks-v4.4-1' of git://git.samba.org/jlayton/linuxLinus Torvalds1-6/+2
Pull file locking updates from Jeff Layton: "The largest series of changes is from Ben who offered up a set to add a new helper function for setting locks based on the type set in fl_flags. Dmitry also send in a fix for a potential race that he found with KTSAN" * tag 'locks-v4.4-1' of git://git.samba.org/jlayton/linux: locks: cleanup posix_lock_inode_wait and flock_lock_inode_wait Move locks API users to locks_lock_inode_wait() locks: introduce locks_lock_inode_wait() locks: Use more file_inode and fix a comment fs: fix data races on inode->i_flctx locks: change tracepoint for generic_add_lease
2015-10-28Merge branch 'wr-cleanup' into k.o/for-4.4Doug Ledford2-18/+19
2015-10-28Merge branch 'wr-cleanup' of git://git.infradead.org/users/hch/rdma into wr-cleanupDoug Ledford2-18/+19
Signed-off-by: Doug Ledford <dledford@redhat.com> Conflicts: drivers/infiniband/ulp/isert/ib_isert.c - Commit 4366b19ca5eb (iser-target: Change the recv buffers posting logic) changed the logic in isert_put_datain() and had to be hand merged
2015-10-29staging: lustre: cleanup over 80 characters in libcfs_hash.hJames Simmons1-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>
2015-10-29staging: lustre: convert last typedef data types in hash.cJames Simmons1-9/+9
Change the last typedef data types cfs_hash_lookup_intent_t to enum and cfs_hash_cond_arg_t to a structure. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: lustre: change cfs_hash_head*_t to structJames Simmons2-16/+21
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>
2015-10-29staging: lustre: change cfs_hash_dhead*_t to structJames Simmons2-20/+24
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>
2015-10-29staging: lustre: change cfs_hash_ops_t to structJames Simmons10-39/+40
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>
2015-10-29staging: lustre: change cfs_hash_hlist_ops_t to structJames Simmons2-6/+6
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>
2015-10-29staging: lustre: change cfs_hash_lock_ops_t to structJames Simmons2-8/+8
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>
2015-10-29Staging: lustre: Remove unused lustre_lfsck_user.h fileShraddha Barke1-95/+0
Remove the header file lustre_lfsck_user.h since it is not needed Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-28IB/cma: Add support for network namespacesGuy Shapiro1-1/+3
Add support for network namespaces in the ib_cma module. This is accomplished by: 1. Adding network namespace parameter for rdma_create_id. This parameter is used to populate the network namespace field in rdma_id_private. rdma_create_id keeps a reference on the network namespace. 2. Using the network namespace from the rdma_id instead of init_net inside of ib_cma, when listening on an ID and when looking for an ID for an incoming request. 3. Decrementing the reference count for the appropriate network namespace when calling rdma_destroy_id. In order to preserve the current behavior init_net is passed when calling from other modules. Signed-off-by: Guy Shapiro <guysh@mellanox.com> Signed-off-by: Haggai Eran <haggaie@mellanox.com> Signed-off-by: Yotam Kenneth <yotamke@mellanox.com> Signed-off-by: Shachar Raindel <raindel@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
2015-10-27Staging: lustre: lprocfs_status: Remove unused declarationShraddha Barke1-2/+0
Remove declaration of function lprocfs_wr_timeouts from header file since it is not used Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Staging: lustre: lustre_log: Remove unused functionsShraddha Barke1-90/+0
Remove the functions which are defined but not used anywhere Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Staging: lustre: Replace LPROCFS_CLIMP_CHECK with lprocfs_climp_checkKsenija Stanojevic5-22/+58
Static inline functions are preferred over macros. The function is placed in obd_class.h instead lprocfs_status.h because obd_class.h includes header obd.h which contains definition of struct obd_device and in that way avoids build error: Dereferencing pointer to incomplete type. Also remove macro LPROCFS_CLIMP_CHECK since it's no longer used. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: lustre: ptlrpc: Replace seq_printf() with seq_putc()Amitoj Kaur Chawla1-1/+1
Replace seq_printf() with seq_putc() since it is more expensive than seq_putc(). Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: lustre: Replace sscanf with kstrtointCristina Moraru1-6/+4
Replace single variable sscanf with specialized function kstrtoint at the suggestion of checkpatch.pl, to fix 'WARNING: Prefer kstrto<type> to single variable sscanf' Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: lustre: remove unused OBD_PAGE_ALLOC/FREE and friendsMike Rapoport1-30/+0
The OBD_PAGE_ALLOC/FREE and related macros are not used and can be removed Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: lustre: get rid of OBD_PAGE_ALLOC/FREEMike Rapoport1-2/+2
Use alloc_page and __free_page instead Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: lustre: Don't ignore error codeCristina Moraru1-1/+1
Error stored in rc was never reported, so directly return it here. Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Staging: lustre: Remove unused obd_cache.h fileShraddha Barke1-38/+0
Remove the header file obd_cache.h since it is not needed Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Staging: lustre: ptlrpc: Remove EXPORT_SYMBOL for sptlrpc_rule_set_expandShraddha Barke1-1/+0
Since sptlrpc_rule_set_expand is static, export symbol is not needed Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: lustre: ldlm: Do not export static functionAmitoj Kaur Chawla1-1/+0
Remove the export symbol for static function. The semantic patch used to find this is: // <smpl> @r@ type T; identifier f; @@ static T f (...) { ... } @@ identifier r.f; declarer name EXPORT_SYMBOL; @@ -EXPORT_SYMBOL(f); // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Merge 4.3-rc7 into staging-nextGreg Kroah-Hartman1-1/+1
We want the other staging patches in this branch as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: lustre: lnet :socklnd Braces not necessaryNilesh Kokane1-2/+1
Braces not needed for single statement block Signed-off-by: Nilesh Kokane <Nilesh.Kokane05@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24Staging: lustre: lnet :socklnd return statement in void function not usefulNilesh Kokane1-1/+0
Return function in void function is not needed. Signed-off-by: Nilesh Kokane <Nilesh.Kokane05@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24Staging: lustre: lov_obd: fixed a brace coding style issueNilesh Kokane1-3/+2
Fixed a coding style issue. Signed-off-by: Nilesh kokane <Nilesh.Kokane05@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: lustre: o2iblnd: fix misleading indentationLuis de Bethencourt1-14/+14
The code is correct, the indentation is misleading. Only the the return rc is part of the conditional statement if rc != 0. Fix a smatch warning: drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2157 kiblnd_hdev_setup_mrs() warn: curly braces intended? Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: lustre: Use C99 initializers for struct netstrfnsJames Simmons1-137/+51
Update struct netstrfns to use C99 initializers. Remove old LND types from the netstrfns table, as they are long obsolete and shouldn't be needed even for interop anymore. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6210 Reviewed-on: http://review.whamcloud.com/15088 Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: lustre: remove last entry of libcfs_netstrfns[]Frederic Saunier1-8/+3
Currently NID string handling test for the last entry, and last entry has .nf_type == (__u32) -1. If we ask for a non existent LND we hit the last entry which then calls a strlen on a NULL which causes a error. We can avoid this problem if we just remove the last entry since it is not used for anything except as a last entry marker. Signed-off-by: Frederic Saunier <frederic.saunier@atos.net> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6501 Reviewed-on: http://review.whamcloud.com/15424 Reviewed-by: frank zago <fzago@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>
2015-10-24staging: lustre: provide separate buffers for libcfs_*2str()Dmitry Eremin9-96/+121
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-24staging: lustre: add in NID range management for libcfsJoshua Walgenbach2-13/+355
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>
2015-10-24staging: lustre: Avoid nid range related forward declarations in nidstring.cJames Simmons1-387/+395
Since forward declarations are frowned on upstream we move the NID range handling to near the start of the nidstring.c file. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: http://review.whamcloud.com/15086 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: lustre: move cfs_ip_addr_* function from kernel libcfs to LNetJames Simmons4-64/+62
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>
2015-10-24staging: lustre: move struct netstrfns to nidstr.hJames Simmons2-13/+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>
2015-10-24staging: lustre: remove cfs_ip_addr_free wrapperJames Simmons3-9/+1
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>
2015-10-24staging: lustre: remove libcfs_init_string functionJames Simmons3-11/+1
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>
2015-10-24staging: lustre: move nidstring handling to LNet layerJames Simmons4-6/+15
Moved the source file nidstring.c from libcfs to lnet since that is the only place it is used. With the move of nidstring to lnet some functions in libcfs need to be exported. In later patches those functions that are only used by LNet also will be moved to the LNet layer. Also add in missing MAX_NUMERIC_VALUE defination. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: lustre: add a service that prints a nidlistGregoire Pichon4-6/+193
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>
2015-10-24staging: lustre: remove unused OBD_SLAB_ALLOC* and OBD_SLAB_FREE* macrosMike Rapoport1-34/+0
The OBD_SLAB_ALLOC* and OBD_SLAB_FREE* macros are not used and can be removed. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: lustre: replace OBD_SLAB_FREE with kmem_cache_freeMike Rapoport5-11/+9
Use kmem_cache_free directly instead of wrapping macro. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: lustre: replace OBD_SLAB_FREE_PTR with kmem_cache_freeMike Rapoport22-41/+41
Use kmem_cache_free directly instead of wrapping macro. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>