LU-3226 test: do some cleanup for sanity.sh test_43a/b

This patch includes the following minor fixes for sanity.sh
test_43a/b:
- to remove multiop after the current test and provide a clean env
for the next test;
- to do some style cleanup.

Test-Parameters: clientdistro=fc18 clientarch=x86_64 serverdistro=el6 serverarch=x86_64 testlist=sanity
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: I86221d9dbf1188b553b3c65bb14298e62f19f820
Reviewed-on: http://review.whamcloud.com/6414
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2442 kernel: protect i_dquot with i_lock

Remove dqptr_sem (but kept in struct quota_info to keep kernel ABI
unchanged), and the functionality of this lock is implemented by
other locks:
* i_dquot is protected by i_lock, however only this pointer, the
  content of this struct is by dq_data_lock.
* Q_GETFMT is now protected with dqonoff_mutex instead of dqptr_sem.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I6be343fb7e431bb3b0ce68066a36f621ebdd9df5
Reviewed-on: http://review.whamcloud.com/5010
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3305 quota: avoid unnecessary dqget/dqput calls

Because of the global lock contention inside the dqget()/dqput(),
we'd try to avoid dqget()/dqput() calls in dquot_initialize().

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I4335d880f3b912f3de70816a9bd87841605f8907
Reviewed-on: http://review.whamcloud.com/6440
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-4310 kernel: missed unlock in quota patch

The quota-replace-dqptr-sem.patch introduced a regression which
could miss unlock inode->i_lock in __dquot_alloc_space().

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: If0f240fe76d661909c13b11e3d384e77da1662b1
LU-1458 test: enable lustre_rsync debug log dump

* Make lustre_rsync dump its debug log to help debugging.
* Add debug messages in lr_move().

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I0f26322b3a4677bcb1b09d09e0e7c0ea1b4dbe3d
Reviewed-on: http://review.whamcloud.com/3795
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1458 tests: wait for dbench to start

Use wait_for_function instead of just guessing that 20s will be long
enough for dbench to start.  Wait for up to 6min in 5 second
intervals.  This also ensures that dbench will run for a little while
after it starts.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ic9c61b487c4013cccd620491d617c10e2206fd62
Reviewed-on: http://review.whamcloud.com/7914
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1526 tests: add --index support to the test framework

This patch improves mkfs_opts() in test-framework.sh to
add --index option for MDT and OST targets automatically.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I6a3efd17bbc2396962f860e1a9e0b3149e7302ec
Reviewed-on: http://review.whamcloud.com/4710
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>