LU-1842 quota: add per-filesystem information

Add a global list to track per-filesystem quota information which
will be used by slaves to determine whether quota enforcement is
enabled.
This patch also enables test 22 in sanity-quota.sh which should now
pass and avoids spurious test failures due to sync_all_data.

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I336e7704d3e16dc3f5a92350c652cd6f2f25f25a
Reviewed-on: http://review.whamcloud.com/4156
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1943 fld: Simplify transaction handling in FID/FLD

This is port of ORI-107 to the master
- cleanup FID/FLD transaction handling, fix IGIF_FLD_RANGE start value
- use th_local in all places where transno is not needed
- remove mti_no_need_transno flag

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I4647dd7f8cd33b836cc959a9f74610c9fbc0e29c
Reviewed-on: http://review.whamcloud.com/4172
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1581 tests: restore CONF_SANITY_EXCEPT handling

Commit 6a6561972406043efe41ae43b64fd278f360a4b9 removed the check in
conf-sanity.sh for a global test exception list.  This prevents
skipping tests from conf-sanity.sh when it is being run as part of a
larger set of tests, such as acceptance-small.sh.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I822cf5e9f873710c35321a88c94e576f15500c1e
Reviewed-on: http://review.whamcloud.com/4138
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1952 tests: fix sanity test_51b on small MDTs

Running sanity.sh test_51b() fails when the MDT filesystem is 256MB,
because the filesystem can create fewer than 64k directories consume
at 4kB each, even if there are enough inodes.  The following
test_51bb() fails if NUMTEST is reduced in test_51b(), because this is
done inside the subshell, and does not get propagated to the next
test.

Add an additional check that there are enough free blocks in the
filesystem for creating subdirectories, or reduce the subdirectory
count appropriately.   Also, write the actual number of subdirectories
created into a temporary file in test_51b() and then read it back in
test_51bb() so that the test completes correctly.

Do some minor cleanup of test style to match current guidelines.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I36119be4006d8a1d2b5034045b075c81de500c1e
Reviewed-on: http://review.whamcloud.com/4005
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1028 tests: regrab some grant after oos test

After out-of-space test, the client can see a state that avail_grant,
dirty_bytes and lost_grant are zero. In this case, page_mkwrite()
won't work because it can't allocate any grant and this affects fsx
test.

This problem is unlikely to be seen in real world. Therefore, we
wrote a small piece of data to each OSTs through each client mount
to reallocate grant.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I1d71af0a80491855cf6328a407dd417954c4e60e
Reviewed-on: http://review.whamcloud.com/3711
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
LU-1842 quota: add quotactl support on qmt

This patch implements quotactl ({get,set}{quota,info}) support on the
QMT. This involves defining the lqe operations for the qmt as well as
pool operations in order to support per-pool quota in the future.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I122e7cb85eb6d1d3460e86217e2a6723763c8cbf
Reviewed-on: http://review.whamcloud.com/4160
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>