LU-2190 utils: Map ldd_params to individual props

At mkfs/tunefs/mount time the configuration utilities will access
a .ldd_params configuraton string.  This string consists of space
delimited key values pairs which must be saved somewhere.

For ldiskfs it makes sense to store this string on disk as part
of the binary lustre_disk_data structure.  But the logical place
for ZFS is to use the user dataset properties where all the other
lustre_disk_data fields are stored.

This patch updates the ZFS portions of the utilities to take the
.ldd_params string and break it apart in to individual key value
pairs which can be stored as user dataset properties.  This is
done by simply appending 'lustre:' to the provided param key.

The original .ldd_params field can then be reconstructed by
fetching all the dataset properties prefixed by 'lustre:' and
appending them with their keys.

The advantage in this approach is new parameters can be added
without the need to update utilties.

Change-Id: Ida1b0e845b27154b209cc807726ae6ed3d22d189
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/5220
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
LU-2859 osc: unplug IO queue async to avoid stack overflow

Otherwise, there is a stack overflow problem with the following
stacktrace:

18 cfs_trace_unlock_tcd at ffffffffa034336c [libcfs]
19 libcfs_debug_vmsg2 at ffffffffa0354038 [libcfs]
20 libcfs_debug_msg at ffffffffa03545f1 [libcfs]
21 osc_key_init at ffffffffa0a90e17 [osc]
22 keys_fill at ffffffffa06d8c3f [obdclass]
23 lu_context_init at ffffffffa06dcc6b [obdclass]
24 lu_env_init at ffffffffa06dce3e [obdclass]
25 cl_env_new at ffffffffa06e40bd [obdclass]
26 cl_env_get at ffffffffa06e4acb [obdclass]
27 lov_sub_get at ffffffffa0b3777d [lov]
28 lov_page_subio at ffffffffa0b37c5d [lov]
29 lov_page_own at ffffffffa0b311af [lov]
30 cl_page_own0 at ffffffffa06e8b5b [obdclass]
31 cl_page_own_try at ffffffffa06e8db3 [obdclass]
32 discard_pagevec at ffffffffa0a926a9 [osc]
33 osc_lru_shrink at ffffffffa0a935d9 [osc]
34 osc_lru_del at ffffffffa0a94aa6 [osc]
35 osc_page_delete at ffffffffa0a951b4 [osc]
36 cl_page_delete0 at ffffffffa06e99e5 [obdclass]
37 cl_page_delete at ffffffffa06e9e62 [obdclass]
38 ll_releasepage at ffffffffa0bfe41b [lustre]
39 try_to_release_page at ffffffff81110070
40 shrink_page_list.clone.0 at ffffffff8112a501
41 shrink_inactive_list at ffffffff8112a8cb
42 shrink_zone at ffffffff8112b5df
43 zone_reclaim at ffffffff8112c384
44 get_page_from_freelist at ffffffff81122834
45 __alloc_pages_nodemask at ffffffff81123ab1
46 kmem_getpages at ffffffff8115e2f2
47 cache_grow at ffffffff8115e95f
48 cache_alloc_refill at ffffffff8115ebb2
49 __kmalloc at ffffffff8115f8d9
50 cfs_alloc at ffffffffa0344c40 [libcfs]
51 ptlrpc_request_alloc_internal at ffffffffa085d407 [ptlrpc]
52 ptlrpc_request_alloc_pool at ffffffffa085d66e [ptlrpc]
53 osc_brw_prep_request at ffffffffa0a8451b [osc]
54 osc_build_rpc at ffffffffa0a8a513 [osc]
55 osc_io_unplug0 at ffffffffa0aa642d [osc]
56 osc_io_unplug at ffffffffa0aa7ce1 [osc]
57 osc_enter_cache at ffffffffa0aa8473 [osc]
58 osc_queue_async_io at ffffffffa0aae916 [osc]
59 osc_page_cache_add at ffffffffa0a94fc9 [osc]
60 cl_page_cache_add at ffffffffa06e61d7 [obdclass]
61 lov_page_cache_add at ffffffffa0b31325 [lov]
62 cl_page_cache_add at ffffffffa06e61d7 [obdclass]
63 vvp_io_commit_write at ffffffffa0c1161d [lustre]
64 cl_io_commit_write at ffffffffa06f5b1d [obdclass]
65 ll_commit_write at ffffffffa0be68be [lustre]
66 ll_write_end at ffffffffa0bfe4e0 [lustre]
67 generic_file_buffered_write at ffffffff81111684
68 __generic_file_aio_write at ffffffff81112f70
69 generic_file_aio_write at ffffffff8111320f
70 vvp_io_write_start at ffffffffa0c11f3c [lustre]
71 cl_io_start at ffffffffa06f244a [obdclass]
72 cl_io_loop at ffffffffa06f6d54 [obdclass]
73 ll_file_io_generic at ffffffffa0bbda7b [lustre]
74 ll_file_aio_write at ffffffffa0bbdce2 [lustre]
75 ll_file_write at ffffffffa0bbeaac [lustre]
76 vfs_write at ffffffff81177b98
77 sys_write at ffffffff811785a1

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Id61b481fe2036a4d7adb7140c39e50fe61c264ba
Reviewed-on: http://review.whamcloud.com/5526
Tested-by: Hudson
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2730 mdt: fix erroneous LASSERT in mdt_reint_opcode

Only set return code err_serious(-EFAULT) when neccessary and do not
run unknown opcode through err_serious.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Iea616d8afd676ee5ccda52cf09b398198f38f992
Reviewed-on: http://review.whamcloud.com/5416
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-2694 test: fix is_empty_fs in t-f

The original is_empty_fs is incorrect, which can cause unexpected
error when running lfsck.sh, because lfsck sets the max error
level based on whether filesystem is empty.

Test-Parameters: testlist=lfsck
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I2269cc41744e3c9fe228898323a1508a03616efe
Reviewed-on: http://review.whamcloud.com/5576
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2694 test: improve lfsck.sh

The test directory of lfsck.sh contains some files referencing
same object, which could cause error when removing the directory
on test cleanup.

Test-Parameters: testlist=lfsck
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I334ff2b7b5f77498eed940f009e4bc18728bb5da
Reviewed-on: http://review.whamcloud.com/5606
Tested-by: Hudson
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2804 mdd: move ACL mode handling to MDD

Move ACL mode handling from OSD to MDD, so both ldiskfs and zfs
can be set mode correctly, and also by this, it can avoid to
transfer the local mask to the remote MDT for fixing the mode.

Move sanity 103 out of sanity SLOW list, so it can be run in the
normal review/landing check, so to avoid regression about ACL.
And also it only take 15 seconds in my local VM run, which probably
not be put to the SLOW list at all.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I73146425baa7d8b712ce46e18955ecaa2a3fd9a4
Reviewed-on: http://review.whamcloud.com/5421
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2899 lod: get ldo_stripenr correctly

Current code relies on lod_statfs_and_check() to count the number of
activated LOD targets, while lod::ldo_stripenr derivation happens
before calling lod_statfs_and_check(), and that makes
lod::ldo_stripenr not accurate.

This patch make sure lod_statfs_and_check() called before updating
::ldo_stripenr. And if there is [de]activation happens on OST target,
client needs wait 2*lod_qos_maxage seconds to get accurate
ld_active_tgt_count number.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I37bebc69f876dd68da609fb5180bc6db36f01e84
Reviewed-on: http://review.whamcloud.com/5573
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>