staging: lustre: vvp: Use lockless __generic_file_aio_write
Testing multi-threaded single shard file write performance has shown
the inode mutex to be a limiting factor when using the
generic_file_write_iter function. To work around this bottle neck, this
change replaces the locked version of that call with the lock less
version, specifically, __generic_file_write_iter.
In order to maintain posix consistency, Lustre must now employ it's
own locking mechanism in the higher layers. Currently writes are
protected using the lli_write_mutex in the ll_inode_info structure.
To protect against simultaneous write and truncate operations, since
we no longer take the inode mutex during writes, we must down the
lli_trunc_sem semaphore.
Unfortunately, this change by itself does not garner any performance
benefits. Using FIO on a single machine with 32 GB of RAM, write
performance tests were ran with and without this change applied; the
results are below:
* Test 1: Lustre client running 04ec54f. File per process write
workload. This test was used as a baseline for what we
_could_ achieve in the single shared file tests if the
bottle necks were removed.
* Test 2: Lustre client running 04ec54f. Single shared file
workload, each task writing to a unique region.
* Test 3: Lustre client running 04ec54f + this patch. Single shared
file workload, each task writing to a unique region.
In order to garner any real performance benefits out of a single
shared file workload, the lli_write_mutex needs to be broken up into a
range lock. That would allow write operations to unique regions of a
file to be executed concurrently. This work is left to be done in a
follow up patch.
staging: lustre: llite: Replace write mutex with range lock
Testing has shown the ll_inode_inode's lli_write_mutex to be a
limiting factor with single shared file write performance, when using
many writing threads on a single machine. Even if each thread is
writing to a unique portion of the file, the lli_write_mutex will
prevent no more than a single thread to ever write to the file
simultaneously.
This change attempts to remove this bottle neck, by replacing this
mutex with a range lock. This should allow multiple threads to write
to a single file simultaneously iff the threads are writing to unique
regions of the file.
Performance testing shows this change to garner a significant
performance boost to write bandwidth. Using FIO on a single machine
with 32 GB of RAM, write performance tests were run with and without
this change applied; the results are below:
* Test 1: Lustre client running 04ec54f. File per process write
workload. This test was used as a baseline for what we
_could_ achieve in the single shared file tests if the
bottle necks were removed.
* Test 2: Lustre client running 04ec54f. Single shared file
workload, each task writing to a unique region.
* Test 3: Lustre client running 04ec54f + I0023132b. Single shared
file workload, each task writing to a unique region.
* Test 4: Lustre client running 04ec54f + this patch.
Single shared file workload, each task writing to a unique
region.
Direct IO does not use the page cache like normal IO, so
concurrent direct IO reads of the same pages are not safe.
As a result, direct IO reads must take the range lock
in ll_file_io_generic, otherwise they will attempt to work
on the same pages and hit assertions like:
(osc_request.c:1219:osc_brw_prep_request())
ASSERTION( i == 0 || pg->off > pg_prev->off ) failed:
i 3 p_c 10 pg ffffea00017a5208 [pri 0 ind 2771] off 16384
prev_pg ffffea00017a51d0 [pri 0 ind 2256] off 16384
Signed-off-by: Prakash Surya <surya1@llnl.gov> Signed-off-by: Patrick Farrell <paf@cray.com> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1669
Reviewed-on: http://review.whamcloud.com/6320
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6227
Reviewed-on: http://review.whamcloud.com/14385 Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: Alexander Boyko <alexander.boyko@seagate.com> Reviewed-by: Hiroya Nozaki <nozaki.hiroya@jp.fujitsu.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>
James Simmons [Sun, 18 Sep 2016 20:37:28 +0000 (16:37 -0400)]
staging: lustre: ldlm: restore some of the interval functionality
Earlier a bunch of interval handling got removed since it wasn't
used by the upstream client. Now some of it is needed again for
the client code so this patch restores what is needed.
Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
While clients will resend client->server RPCs, servers would not
resend server->client RPCs such as LDLM callbacks (blocking
or completion callbacks/ASTs). This could result in clients being
evicted from the server if blocking callbacks were dropped by the
network (a failed router or lossy network) and the client did not
cancel the requested lock in time.
In order to fix this problem, this patch adds the ability to resend
LDLM callbacks from the server and give the client a chance to
respond within the timeout period before it is evicted:
- resend BL AST within lock callback timeout period;
- still do not resend CANCEL_ON_BLOCK;
- regular resend for CP AST without BL AST embedded;
- prolong lock callback timeout on resend;
some fixes:
- recovery-small test_10 to actually evict the client
with dropped BL AST;
- ETIMEDOUT to be returned if send limit is expired;
Lai Siyao [Sun, 18 Sep 2016 20:37:25 +0000 (16:37 -0400)]
staging: lustre: statahead: statahead thread wait for RPCs to finish
Statahead thread should wait for inflight stat RPCs to finish in
case statahead RPC callback may access data allocated in statahead
thread context.
ll_sa_entry_fini() should keep old entry if stat RPC is not
finished yet.
Simplify sai refcounting:
* newly allocated sai will hold one refcount, and it will put it
after starting statahead thread.
* statahead thread holds one refcount.
* agl thread holds one refcount.
* stat process calls do_statahead_enter() which will try to get
sai, and if it's valid, it will revalidate from statahead cache,
and put refcount after use.
Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3270
Reviewed-on: http://review.whamcloud.com/9663 Reviewed-by: Fan Yong <fan.yong@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.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>
John L. Hammond [Sun, 18 Sep 2016 20:37:23 +0000 (16:37 -0400)]
staging: lustre: remove RCU2HANDLE macro
Remove RCU2HANDLE macro from lustre_handles.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/11498 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Henri Doreau [Sun, 18 Sep 2016 20:37:22 +0000 (16:37 -0400)]
staging: lustre: mdc: Report D_CHANGELOG messages as D_HSM
Removed the D_CHANGELOG pseudo-debug flag that wasn't actually defined
as a usable one. Report the D_CHANGELOG messages as D_HSM ones instead
since this is the primary user of these messages.
Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5538
Reviewed-on: http://review.whamcloud.com/11558 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: James Nunez <james.a.nunez@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Li Xi [Sun, 18 Sep 2016 20:37:21 +0000 (16:37 -0400)]
staging: lustre: llog: add newly opened llog at tail of handle list
Add newly opened llog handle at the tail of handle list to increase
lookup speed, especially for cancel operation, because the canceled
log will be removed from the list, and lookup is from the beginning.
Signed-off-by: Lai Siyao <lai.siyao@intel.com> Signed-off-by: Li Xi <lixi@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5405
Reviewed-on: http://review.whamcloud.com/11575 Reviewed-by: Ian Costello <costello.ian@gmail.com> Reviewed-by: Mike Pershin <mike.pershin@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>
Andreas Dilger [Sun, 18 Sep 2016 20:37:20 +0000 (16:37 -0400)]
staging: lustre: build: bump build version warnings to x.y.53
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>
John L. Hammond [Sun, 18 Sep 2016 20:37:19 +0000 (16:37 -0400)]
staging: lustre: lmv: release request in lmv_revalidate_slaves()
In lmv_revalidate_slaves() ensure that the request returned by
md_intent_lock() is properly released on all paths.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5452
Reviewed-on: http://review.whamcloud.com/11326 Reviewed-by: wang di <di.wang@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>
Wang Shilong [Sun, 18 Sep 2016 20:37:18 +0000 (16:37 -0400)]
staging: lustre: ptlrpc: fix magic return value of ptlrpc_init_portals
Previously, when running 'modprobe lustre', it hit the following
error message which is becaue of network initialisation failure:
modprobe: ERROR: could not insert 'lustre': Input/output error
However, error code is there, just let it return to caller,
after this patch, error message will be something like:
modprobe: ERROR: could not insert 'lustre': Network is down
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5455
Reviewed-on: http://review.whamcloud.com/11337 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.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>
staging: lustre: fix comparison between signed and unsigned
Cleanup in general headers.
* use size_t in cfs_size_round*()
* make unsigned index and len in lustre_cfg_*()
* make iteration variable the same type as comparing value
* make unsigned pages counters
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5417
Reviewed-on: http://review.whamcloud.com/11327 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Fan Yong <fan.yong@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>
'commit 77605e41a26f ("staging/lustre/clio: add pages into writeback cache
in batches")' adds a page to a list aggregate issuing them to writeback
cache; A page add is referenced in llite/vvp io scope, while writeback
cache commit de-refers it under osc sub io scope, and enabling -lu_ref
will detect this scope mismatch.
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4503
Reviewed-on: http://review.whamcloud.com/8970 Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@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>
John L. Hammond [Sun, 18 Sep 2016 20:37:13 +0000 (16:37 -0400)]
staging: lustre: lmv: release locks if lmv_intent_lock() fails
In lmv_intent_lock() if we will return an error then first release any
locks referenced by the intent.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5431
Reviewed-on: http://review.whamcloud.com/11319 Reviewed-by: wang di <di.wang@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>
John L. Hammond [Sun, 18 Sep 2016 20:37:11 +0000 (16:37 -0400)]
staging: lustre: lmv: fix some byte order issues
In the handler for LL_IOC_LMV_GETSTRIPE convert stripe FIDs from
little to CPU endian when unpacking lmv_user_md. In lmv_unpack_md_v1()
fix a double conversion of the stripe count.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5342
Reviewed-on: http://review.whamcloud.com/11106 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Jian Yu <jian.yu@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>
Bobi Jam [Sun, 18 Sep 2016 20:37:10 +0000 (16:37 -0400)]
staging: lustre: llite: update ras stride offset
When a read ahead does not reach the end of the region reserved from
ras, we'd set ras::ras_next_readahead back to where we left off; For
stride read ahead, it needs to make sure that the offset is no less
than ras_stride_offset, so that the stride read ahead can work
correctly.
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5263
Reviewed-on: http://review.whamcloud.com/11181 Reviewed-by: Fan Yong <fan.yong@intel.com> Reviewed-by: wang di <di.wang@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>
Define new constants LL_LEASE_{RD,WR,UN}LCK for use as the argument to
and return value from the LL_IOC_{GET,SET}_LEASE ioctls. As arguments,
these contants replace the use of F_{RD,WR,UN}LCK from fcntl.h. As
return values they replace the use of FMODE_{READ,WRITE} which are
internal to the Linux kernel source and not under the control of the
Lustre ioctl interface.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5013
Reviewed-on: http://review.whamcloud.com/10233 Reviewed-by: Jinshan Xiong <jinshan.xiong@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>
Umount process relies on lu_site_purge(-1) to purge all
objects before umount, however, if there happen to have a
cache shrinker which calls lu_site_purge(nr) in parallel,
some objects may still being freed by cache shrinker even
after the lu_site_purge(-1) called by umount done.
This can be simply fixed by serializing purge threads,
since it doesn't make any sense to have them in parallel.
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5331
Reviewed-on: http://review.whamcloud.com/11099 Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Mike Pershin <mike.pershin@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>
John L. Hammond [Sun, 18 Sep 2016 20:37:07 +0000 (16:37 -0400)]
staging: lustre: obd: add rnb_ prefix to struct niobuf_remote members
Add the prefix rnb_ to the members of struct niobuf_remote. Delete the
relevant compat macros from ofd_internal.h.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5061
Reviewed-on: http://review.whamcloud.com/10452 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Mike Pershin <mike.pershin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John L. Hammond [Sun, 18 Sep 2016 20:37:06 +0000 (16:37 -0400)]
staging: lustre: obd: add lnb_ prefix to members of struct niobuf_local
Add the prefix lnb_ to the members of struct niobuf_local that do not
already have it. Change the struct dentry *lnb_dentry member to void
*lnb_data as it is not used to hold a pointer to struct dentry.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5061
Reviewed-on: http://review.whamcloud.com/10451 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Mike Pershin <mike.pershin@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>
wang di [Sun, 18 Sep 2016 20:37:05 +0000 (16:37 -0400)]
staging: lustre: lmv: Do not ignore ENOENT in lmv_unlink
Return correct value (rc) in lmv_unlink. In lmv_unlink,
-ENOENT might be ingored for local directory unlink.
Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5371
Reviewed-on: http://review.whamcloud.com/11170 Reviewed-by: John L. Hammond <john.hammond@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>
two optimizations in the busy loop wait in class_cleanup():
(1) remove unnecessary spinlocks protecting obd_conn_inprogress
access
(2) replace cond_resched by more suitable yield to unconditionally
yield the CPU if the condition check fails.
Signed-off-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5397
Xyratex-bug-id: MRP-1991
Reviewed-on: http://review.whamcloud.com/11198 Reviewed-by: Andreas Dilger <andreas.dilger@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>
wang di [Sun, 18 Sep 2016 20:37:03 +0000 (16:37 -0400)]
staging: lustre: lmv: honor MDT index when creating volatile file
LMV should honor MDT index embedded in the name of volatile
file, then during hsm restore, the file under striped dir can
be restored to the right MDT.
Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4691
Reviewed-on: http://review.whamcloud.com/10866 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Henri Doreau <henri.doreau@cea.fr> 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>
Li Xi [Sun, 18 Sep 2016 20:37:00 +0000 (16:37 -0400)]
staging: lustre: llite: fix ll_statahead_thread() problems on failure
When ll_prep_md_op_data() fails, ll_statahead_thread() does not
release reference of sai and parent dentry. It does not wake
up parent thread either. This patch fixes these problems.
Signed-off-by: Li Xi <lixi@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5274
Reviewed-on: http://review.whamcloud.com/10940 Reviewed-by: John L. Hammond <john.hammond@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>
This patch compresses the return logic into a single statement
and removes the now unused return variable.
Done using coccinelle:
@@
type T;
identifier r;
@@
- T r;
... when !=r
- r =
+ return
...;
- return r;
staging: ks7010: Remove space after '(' and before ')'
The patch fixes the following errors detected by checkpatch.pl:
ERROR: space prohibited before that close parenthesis ')'
ERROR: space prohibited after that open parenthesis '('
staging: media: davinci_vpfe: Use BIT macro instead of left shifting 1
This patch replaces left shifts on 1 with the BIT(x) macro, as suggested
by checkpatch.pl.
This was done using coccinelle script:
@@
constant c;
@@
- (1 << c)
+ BIT(c)
Staging: ks7010: Remove extern keyword from function declaration
Remove extern specifier from function declaration as they have
it by default. Also move extern declaration from .c files to
their respective header file 'ks_hostif.h'. Coccinelle was used
to remove extern and other changes were done by hand.
Script:
@@
identifier func;
type T;
@@
- extern
T func(...);
staging: lustre: lmv: mark symbols static where possible
We get a few warnings when building kernel with W=1:
drivers/staging/lustre/lustre/lmv/lmv_obd.c:1640:1: warning: no previous prototype for 'lmv_locate_target_for_name' [-Wmissing-prototypes]
drivers/staging/lustre/lustre/lmv/lmv_obd.c:2421:5: warning: no previous prototype for 'lmv_read_page' [-Wmissing-prototypes]
....
In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.
staging/lustre: clean function declaration in cl_io.c up
We get 1 warning when building kernel with W=1:
drivers/staging/lustre/lustre/obdclass/cl_page.c:488:6: warning: no previous prototype for 'cl_page_disown0' [-Wmissing-prototypes]
In fact, this function is declared in
drivers/staging/lustre/lustre/obdclass/cl_io.c, but should be
removed in a header file. thus can be recognized in other file.
So this patch moves the declaration into
drivers/staging/lustre/lustre/include/cl_object.h.
staging: lustre: obdclass: clean function declarations in obd_config.c and class_obd.c up
We get 3 warnings when building kernel with W=1:
drivers/staging/lustre/lustre/obdclass/obd_mount.c:705:5: warning: no previous prototype for 'lustre_check_exclusion' [-Wmissing-prototypes]
drivers/staging/lustre/lustre/obdclass/obd_mount.c:1226:5: warning: no previous prototype for 'lustre_register_fs' [-Wmissing-prototypes]
drivers/staging/lustre/lustre/obdclass/obd_mount.c:1231:5: warning: no previous prototype for 'lustre_unregister_fs' [-Wmissing-prototypes]
In fact, the first function is declared in
drivers/staging/lustre/lustre/obdclass/obd_config.c,
and the other two functions are declared in
drivers/staging/lustre/lustre/obdclass/class_obd.c,
but all of these functions should be declared in
a header file, thus can be recognized in other file.
So this patch moves the declarations into
drivers/staging/lustre/lustre/include/obd_class.h.
staging/lustre: clean function declaration in super25.c up
We get 1 warning when building kernel with W=1:
drivers/staging/lustre/lustre/obdclass/obd_config.c:719:6: warning: no previous prototype for 'lustre_register_client_process_config' [-Wmissing-prototypes]
In fact, this function is declared in
drivers/staging/lustre/lustre/llite/super25.c, but should be
moved into a header file, thus can be recognized in other file.
So this patch moves the declaration into
drivers/staging/lustre/lustre/include/lprocfs_status.h.
staging: lustre: clean function declaration in super25.c up
We get 1 warning when building kernel with W=1:
drivers/staging/lustre/lnet/selftest/conctl.c:804:1: warning: no previous prototype for 'lstcon_ioctl_entry' [-Wmissing-prototypes]
In fact, this function is declared in
drivers/staging/lustre/lustre/llite/super25.c, but should be
moved into a header file, thus can be recognized in other file.
So this patch moves the declaration into
drivers/staging/lustre/lnet/selftest/console.h
Staging: ks7010: Replace memset with eth_zero_addr
Use eth_zero_addr to assign zero address to the given address array
instead of memset when the second argument in memset is address
of zero. Coccinelle was used to do the replacement and add the
header file linux/etherdevice.h if not already present.
Script:
@header@
@@
#include <linux/etherdevice.h>
staging: wilc1000: Use sizeof type *pointer instead of sizeof type
The patch uses the size of the dereference to a variable instead of it's type,
to make the code more resistant to type changes in the future. The type of the
pointer variable here is the same as the type in the argument that is being
replaced in sizeof().
Staging: comedi: s626: Remove all unused functions
Remove all #ifdef'ed static functions as they are not used anywhere
in the kernel. Some functions were detected using Coccinelle but removed by
hand and some were removed as the functions in which they were getting
used were also unused functions.
Script:
The newly added Hi6220 Ion code fails to build when the ION_OF helpers
are not present:
drivers/staging/android/ion/hisilicon/hi6220_ion.o: In function `hi6220_ion_remove':
hi6220_ion.c:(.text.hi6220_ion_remove+0x4c): undefined reference to `ion_destroy_platform_data'
drivers/staging/android/ion/hisilicon/hi6220_ion.o: In function `hi6220_ion_probe':
hi6220_ion.c:(.text.hi6220_ion_probe+0x5c): undefined reference to `ion_parse_dt'
hi6220_ion.c:(.text.hi6220_ion_probe+0xf8): undefined reference to `ion_destroy_platform_data'
This selects the symbol when needed.
Fixes: 2b40182a19bc ("staging: android: ion: Add ion driver for Hi6220 SoC platform") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Laura Abbott <labbott@redhat.com> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: android: ion: Fix return value check in hi6220_ion_probe()
In case of error, the function ion_device_create() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().
Instead of storing the return value of a function call into a variable and
then returning it, we can club the two into a single return statement. This
change was made using the following semantic patch by Coccinelle:
add braces to if/else clause to fix the checkpatch issue braces {}
should be used on all arms of if/else block. Does not affect flow
because only single statement inside if/else block.
staging: gs_fpgaboot: Remove FSF address from GPL notice
This patch fixes the checkpatch.pl warning:
CHECK: Do not include the paragraph about writing to the Free Software
Foundation's mailing address from the sample GPL notice. The FSF has
changed addresses in the past, and may do so again. Linux already
includes a copy of the GPL.
The function xlr_wakeup_queue is not used anywhere in the kernel.
Therefore, remove it. The static unused functions were detected
using Coccinelle but the change was done by hand.
Script used: