LU-5126 libcfs: fix illegal page access of tracefiled()

After failure happens and put_pages_back() returns the pages,
tracefiled() should not go on itering on the page list.
Otherwise, some pages might be accessed illegally.

This patch is back-ported from the following one:
Lustre-commit: f111fac3f785400f892ca03bfb9078c6bd091f7d
Lustre-change: http://review.whamcloud.com/10524

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I9f2953e9e0a6473112c7d1ce16375b84c66d622c
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: http://review.whamcloud.com/11454
Tested-by: Jenkins
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5128 obdclass: fix a race in recovery

in "class_export_recovery_cleanup", the check of the flag
"exp->exp_req_replay_needed" should be protected by "exp_lock".

Lustre-commit: 5a7e4480fc519c8df4ca0b11e6d5239956316bd3
Lustre-change: http://review.whamcloud.com/10849

Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Signed-off-by: Wu Libin <lwu@ddn.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ib3c980101f400ce1b9cb0b3d2a4418fbec31b94b
Reviewed-on: http://review.whamcloud.com/11102
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5252 hsm: Do not unconditionally delete the HSM event fifo

The lustreapi HSM library will use a pipe if it already exists.
However the deregistration will unconditionally delete that pipe,
which is not correct.

An admin may want to create the pipe with certain rights/ownership,
which the llapi_hsm_register_event_fifo() doesn't allow. In that case,
llapi_hsm_unregister_event_fifo() should not delete it.

This is a back port to b2_5.

Lustre-change: http://review.whamcloud.com/10809
Lustre-commit: 7b7e6e2fb692eb3fa8d386addbc33763acf1a397

Signed-off-by: frank zago <fzago@cray.com>
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Change-Id: I66e44f21217228c5f425e5a9312d8e381d564c7f
Reviewed-on: http://review.whamcloud.com/11421
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-5415 ldlm: high load because of negative timeout

When the time of LRU resizing exceeds waiting period of
recalculation, the ldlm daemon will keep on resizing without any
interval of rest. That will cause high CPU load.

This patch fixes the problem by setting the recalculation timestamp
after LRU resizing finishes rather than before it. What is more, an
interval of one second is enforced between each recalculation.

Lustre-change: http://review.whamcloud.com/11227/
Lustre-commit: 381492e1fc3f93873bf495885859c4f63ce0f4fe

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I989255eca64d74dfcb2087060f627c2e72615248
Reviewed-on: http://review.whamcloud.com/11414
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5263 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.

This patch is back-ported from the following one:
Lustre-commit: 9e280281b8daf8ad69d04a5371121224ace28fbc
Lustre-change: http://review.whamcloud.com/11181

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I5d319a94435833153c52da6ccc1b20c4952789e9
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: http://review.whamcloud.com/11455
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5252 hsm: make path argument to fifo event a const

Neither llapi_hsm_register_event_fifo() nor
llapi_hsm_unregister_event_fifo() take a const as their argument.
This leads to the following compilation warning when a caller is
using a const char *:

  ... warning: passing argument 1 of ‘llapi_hsm_register_event_fifo’
         discards ‘const’ qualifier from pointer target type
         [enabled by default]
   rc = llapi_hsm_register_event_fifo(lustre_fifo_event);
   ^
  ... note: expected ‘char *’ but argument is of type ‘const char *’
  extern int llapi_hsm_register_event_fifo(char *path);

Making path a const fixes this warning.

This is a backport to b2_5

Lustre-change://review.whamcloud.com/10807
Lustre-commit: 8264927b92b82e5ec6d223523db8680ee8df1da4

Change-Id: Ia2544cafefef8d5d1e4cf4cfc6408aac373c447b
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/10807
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
(cherry picked from commit 8264927b92b82e5ec6d223523db8680ee8df1da4)
Reviewed-on: http://review.whamcloud.com/11363