MRP-2118 ost: ASSERTION(thread->t_id <= OSS_THREADS_MAX) failed

Thread creation failed due to memory allocation fail, and
t_id is always increasing.

Allocate ost_thread_local_cache using OBD_ALLOC_LARGE()

Change-Id: I39fd7ac44e7bd477bef4d4f1f18ac90bf5237a32
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/3844
Tested-by: Jenkins
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Tested-by: Alexander Lezhoev <alexander_lezhoev@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
MRP-2104 tests: simulate lctl conf_param failure

This adds a test which simulates llog_init_handle() failure. Wrong
handling for the failure may cause endless umount.

Change-Id: I00383a67d9bd1bd832de9340caa43ca090c94a11
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/3800
Reviewed-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
MRP-2104 llog: fix error handling in record_start_log()

Have record_start_log() to call llog_close() if llog_init_handle()
fails and have all record_start_log() callers to return immediately if
it fails.

Change-Id: Id93871cc50933140276fb03ac3d1a57f15e1e6a9
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>                                                                                                                     # Please enter the commit message for your changes. Lines starting
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/3801
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
MRP-2105 tests: two checks added to conf-sanity.sh:test_66

lctl conf_param does not work after lctl replace_nids.
Add check for that.
llog backup is created with wrong size and may get wrong content
after two serial calls to lctl replace_nids.
Add check for that.

Change-Id: I0b03efda165d48976e2f4484a2ab316273aa590c
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/3802
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Reviewed-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
MRP-2105 mgs: Initialize uuid of llogs created by replace_nids

Initialize "Target uuid" with same data as in record_start_log().
This is backport of patch for LU-3357.

Change-Id: Iab42d66dc546cb50b291daa7caff70a89771365d
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/3932
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Sergey Cheremencev <sergey_cheremencev@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
MRP-2105 mgs: fix mgs_backup_llog

-read source/write target loop in mgs_backup_llog is corrected
-writes to llog file go via buffer cache and transactions
 (fsfilt_ldiskfs_write_handle), so before reading the llog file via
 page cache based file read the transactions which wrote the llog file
 are to be flushed (checkpointed, not only committed).
 fs_journal_flush operation is added to struct fsfilt_operations and
 is called before accessing a llog file via file read.

Change-Id: I71dbf6efb9c115587162da6cd0b628674551a803
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/3860
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
MRP-2091 mgs: remove skip records from config file

Configuration logs are append only files of limited size. In course of
time the logs may grow over the limit size. Usually, configuration
logs keep needless records marked as SKIP. The new lctl command
"clear_conf" is added to allow administartors to clear configuration
files by removing mentioned SKIP records.
lctl man page is updated.
conf-sanity test is added to test the new command.

Change-Id: Iee71234442c7e2fcc289955d11e055e2e86377a4
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/4003
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Tested-by: Jenkins
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
MRP-2105 test: EXCLUDE records are not to be deleted

Have conf-sanity.sh:test_66 to add EXCLUDE records to config
file. lctl replace_nids removes those records which lead to problem on
mounting.

Change-Id: I5c08644202c6781b452043fea1082bd80179b768
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Artem Blagodarenko <Artem_Blagodarenko@xyratex.com>
MRP-2105 mgs: do no skip EXCLUDE records on lctl replace_nids

Skip records marked as SKIP instead.

Change-Id: Ia7f9e522d6d94fff345b93b51240006886f543dd
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Artem Blagodarenko <Artem_Blagodarenko@xyratex.com>
Reviewed-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com>
MRP-2091 tests: change test and ioctl number

Have conf-sanity's lctl clear_conf test to used free number.
Have clear_conf ioctl to use free number.

Change-Id: I7246c4410167eabe1d4fce1695b22e4387c70264
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/4279
Tested-by: Jenkins
Tested-by: Alexander Lezhoev <alexander_lezhoev@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
MRP-2189 mdd: fix for wrong memory free

mti_max_lmm is allocated by OBD_ALLOC_LARGE, but
at mdd_key_fini() OBD_FREE is used, instead of OBD_FREE_LARGE.
This bug produce MDS crash with next trace:
[<ffffffffa04d098e>] cfs_free+0xe/0x10 [libcfs]
[<ffffffffa0ca57f1>] mdd_key_fini+0x61/0x2b0 [mdd]
[<ffffffffa066eba0>] key_fini+0x60/0x1e0 [obdclass]
[<ffffffffa066ed5f>] keys_fini+0x3f/0x150 [obdclass]
[<ffffffffa066ee8d>] lu_context_fini+0x1d/0x60 [obdclass]
[<ffffffffa066eeee>] lu_env_fini+0x1e/0x30 [obdclass]
[<ffffffffa0651e32>] obd_setup+0x1e2/0x2f0 [obdclass]
....

Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Change-Id: Id4b23bd5c7ba7b0aa5c9db296d8da09235a83706
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/4292
Tested-by: Jenkins
Reviewed-by: Andriy Skulysh <andriy.skulysh@seagate.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Tested-by: Alexander Lezhoev <alexander_lezhoev@xyratex.com>