LU-1346 libcfs: cleanup libcfs atomic primitives

Only libcfs/ directory are converted yet. Other directories
are left for later patches.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ic379ac493ca4ead1ee6aa8aeb52b4017ee65c93c
Reviewed-on: http://review.whamcloud.com/6959
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1346 libcfs: replace CFS_CAP_XXX with kernel definition

Replace CFS_CAP_XXX with kernel standard CAP_XXX flags.
Keep cfs_cap_xxx(raise/lower/raised) wrappers.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I656c41b94e73bf8d03698a8709be999038a50b35
Reviewed-on: http://review.whamcloud.com/4781
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-3664 test: get_param atime_diff returns multiple values

In sanityn test 23, lctl get_param mdd.*. time_diff can
return multiple values. This can happen with there are multiple
MDTs mounted. In order to deal with multiple values, we run the
return value of lctl get_param through "head -1".

Test-Parameters: mdtcount=2 mdscount=2
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ie830429af38e1e4bce084aa1e6490bbadf366920
Reviewed-on: http://review.whamcloud.com/7750
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
LU-3640 test: Sanity test 116a fails when an OST is full

Sanity test 116a looks for the OST with the least amount of free
space and fills it to varying levels. It does not check to see if
the OST is full and fails because of a divide by zero (bytes
available on full OST) error.

This patch adds a check to see if an OST is full and, if so, the test
is now skipped. We also corrected where to look for the qos_prio_free
file from the client to the MDS. A correction was made to how the
number of files written to each OST is calculated. We also added
using qos_threshold_rr to check how uneven the OSTs need to be.

This test is usually skipped since filling large OST takes too much
time. In order to get this test to run faster, we’ve added

1. A check to see if the OST needs to be filled to create uneven
OSTs. For QOS mode, a pair of OSTs must be at least qos_threshold_rr%
off balanced. If the OSTs are already this uneven, we skip
writing files to an OST. If the OSTs do not exceed this threshold,
we write only 2% over the threshold amount to create uneven OSTs.

2. A cap on the number of files written when checking QOS
functionality. The files are small, 200k in size,and we were
writing enough files to fill 25% of the most full OST. Now we
cap the number of file written to at most 600. There’s no meaning
to 600 files, it just seemed like enough files to make sure that
the OST that has the most space available is getting more files.
We could make this number of files dependent on the number of OSTs.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ide1565015ffc26a849adabd0d06285971bcee9f2
Reviewed-on: http://review.whamcloud.com/7132
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
LU-4000 lloop: Fix build failure on ppc64

On ppc64 with 64k pages, we get a build failure in lloop:

drivers/staging/lustre/lustre/llite/lloop.c:527:2:
note: in expansion of macro 'CLASSERT'
CLASSERT(PAGE_CACHE_SIZE < (1 << (sizeof(unsigned short) * 8)));

There's no need to change the queue's logical block size. Even if it could
accept a 64k value, that would result in any file system on top of it
needing to also use 64k blocks. It'd be safe to set it to 4k, but there's
no actual need for it. It's not used to split requests except for WRITE_SAME,
which lloop doesn't implement anyway.

Change-ID: Ib36959ca2323ab0dfdc1fb34aeffb778cffd6c92
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-on: http://review.whamcloud.com/7745
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3349 test: add b2_3/b2_4 image for conf-sanity test_32a

Add 2.3.0 and 2.4.0 ldiskfs filesystem test image
for conf-sanity test_32a

Change-Id: Ic7d130a5eb66ea4b1f57fe9b270ae0ed6bdd1f33
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-on: http://review.whamcloud.com/7091
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
LU-3989 kernel: kernel update [SLES11 SP3 3.0.92-0.8]

Update of config and build files to new kernel version.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I8c77bf3cd4e3dfefd8f85bf1c26241d1f0887f50
Reviewed-on: http://review.whamcloud.com/7752
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3871 osd: Tell QUOTA/NAME_LLOG fid in fid_is_on_ost check

Tell QUOTA/NAME_LLOG fid during fid_is_on_ost check, so
they will not be inserted into /O, which might confuse
e2fsck otherwise.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I4d091393b60c66a554de861359d8f5a32c83029e
Reviewed-on: http://review.whamcloud.com/7527
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>