LU-4629 utils: fix array overflow

Array 'argv' of size 512 may use index value(s) 512.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I808b6f52f0e8b548978290dd08f1f5fc3ce929a1
Reviewed-on: http://review.whamcloud.com/10135
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4985 kernel: Store kthread_run result in task_struct ptr

The fix for LU-3498 changed most invocations of kthread_run to store
the result in a variable of task_struct pointer type and check whether
kthread_run returned an error using IS_ERR.  This change updates the
remaining calls to kthread_run to do this as well for consistency.

Signed-off-by: Ryan Haasken <haasken@cray.com>
Change-Id: I18edab018080ec51e9979164234e5bcd02a04f88
Reviewed-on: http://review.whamcloud.com/10266
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
LU-2675 obd: decruft md_enqueue() and md_intent_lock()

Remove the lmm and lmmsize parameters from both functions, storing
that data in md_op_data when needed. Remove the unused lookup_flags
parameter from md_intent_lock(), and the unused reqp parameter from
md_enqueue(). Add a union ldlm_policy_data * parameter to
md_enqueue(). Remove the unused function lmv_enqueue_remote().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ia914318a7c7cbeb59fe86d4a169559cd86f3ad57
Reviewed-on: http://review.whamcloud.com/10205
Tested-by: Jenkins
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4832 ptlrpc: fix incorrect name string in nrs_tbf

Mismatched entry name strings between lproc entry creation
and lproc entry removal led to noisy warnings a umount time.
This fix corrects the code to use "nrs_tbf_rule" for both calls.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I806b87d4571fb307d8199628e00261162f0fa089
Reviewed-on: http://review.whamcloud.com/10241
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4713 tests: fix fhandle syscall test progarm

Replace the incorrect local definitions in the fhandle test program
with more correct and current ones from SLES #include files.
Local defintions are only used in the case where the fhandle syscall
feature is present in the kernel, but support isn't present in glibc.
For now that particular config is only seen in SLES11SP3,
so the internal and local definitions must match the ones
from that distribution.

Test-Parameters: clientdistro=sles11sp3 testlist=sanity envdefinitions=ONLY=237
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ie2106325ecc2b2d2e6aeaba1cc3f8b995f503ba8
Reviewed-on: http://review.whamcloud.com/10189
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5048 ldiskfs: SLES ext4-mballoc-extra-checks patch fix

Original SLES patch version, from LU-1812, was missing a latest hunk.
This caused OSTs to be put in read-only mode due to wrong
inconsistencies detected.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I9eb948a7ffbc6dbd11598d11ba94f51902e1e71e
Reviewed-on: http://review.whamcloud.com/10294
Tested-by: Jenkins
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-4977 llite: Fix the deadlock in balance_dirty_pages()

If the page is already dirtied in ll_write_end() and kernel tries
to call balance_dirty_pages() to write back dirty pages in the same
thread, this is deadlock case if the page is already held by clio.

This can also fix the issue of LU-4873.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Iae7f6bd8956e5fc134568d776c9aa3a6b68b1ec5
Reviewed-on: http://review.whamcloud.com/10149
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2099 osd: clear iobuf up on I/O completion

it was a bad idea to clear iobuf on buffer release because the
same buffers can be used few times in case of transient ENOSPC.

Change-Id: Ic1d2ddaa0794f2f6f7d1ba71620e06b4ea7a99d2
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/10305
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Tested-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>