LU-4768 tests: Update ost-survey script

Currently, ost-survey hangs due to calling
'lfs setstripe' in an old (positional) style and
setting max_cached_mb to zero.

The call to 'lfs setstripe' is updated to use the
'-S', '-i' and '-c' flags. max_cached_mb is now
set to pagesize * 256 (in MB). The patch also gets
parameters for the correct file system if more
than one Lustre file system is mounted, and
corrects a few typos in comments.

In ll_max_cached_mb_seq_write(), the number of
pages requested is set to the max of pages requested
or PTLRPC_MAX_BRW_PAGES to allow the client to make
well formed RPCs.

This is a backport to b2_5
Lustre-change: http://review.whamcloud.com/#/c/11971/4
Lustre-commit: 46bec835ac726aa2d06024b197002be7b112e192

with some changes to ost-survey from
Lustre-change: http://review.whamcloud.com/#/c/10534/8
Lustre-commit: fe3ddff77475dd487873e2f873835455aab7aa38

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ia9f22c19f95b85d14687bdaf70cad05ca3a3f455
Reviewed-on: http://review.whamcloud.com/12240
Tested-by: Jenkins
Reviewed-by: Cliff White <cliff.white@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-4629 osd-ldiskfs: Fix use after free

Object 'dir' was dereferenced at line 3343 after being freed
by calling 'kfree' at line 3332.

Lustre-commit: f4842b027ee57969fa1b01b90d5f23aed18b5eb5
Lustre-change: http://review.whamcloud.com/10609

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I5e27f4555bda6144be5e5fcb9d0f00916512020a
Reviewed-on: http://review.whamcloud.com/12096
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>