LU-5227 build: build dkms using lbuild

To include dkms build in lbuild
1. before build lustre, generate lustre-dkms.spec with configure
2. use rpmbuild to build the src
3. rebuild dkms using the src

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: Iac71d20110fe0f84b3bfffb071f3e3b84c7f5f17
Reviewed-on: http://review.whamcloud.com/10747
Tested-by: Jenkins
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5270 obdclass: do not lock repetitively when geting jobid

When trying to get customized job ID, cfs_get_environ() tries to
lock/unlock mmap_sem for two times, which is unnecessary.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: Iae8a45d87508e3c465c0424d5fa54e294d4fb2b1
Reviewed-on: http://review.whamcloud.com/10890
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4921 lmv: try all stripes for unknown hash functions

For unknown hash type, LMV should try all stripes to locate
the name entry. But it will only for lookup and unlink, i.e.
we can only list and unlink entries under striped dir with
unknown hash type.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ifeed7131c24e48277a6cc8fd4c09b7534e31079f
Reviewed-on: http://review.whamcloud.com/10041
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-4018 tests: improve racer file_create workload

Use larger writes and smaller files, so that the racer file_create.sh
workload does not get bogged down with many threads stuck on sub-page
writes to the same file (causing excruciating 1kB-per-RPC sync writes
to disk on the OST).

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I173c155dfe4044f89deb8f2d8a7c3be4a28ce763
Reviewed-on: http://review.whamcloud.com/7951
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4984 llite: check for integer overflow in hsm user request

Check to make sure total size of request does not overflow when
calculated.  Return -1 from hur_len() if it does overflow.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I6a3ca50c53ff38dab4165f20dac6fa00eb888df2
Reviewed-on: http://review.whamcloud.com/10615
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-4694 hsm: Cleanup codes about return value

errno migh be zero when llapi_hsm_action_get_fd() returns a failure.
ct_archive() does not handle it correctly, which might cause HSM take
the operation as successful even if it actually fails.

The patch also cleanup other codes about return value.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I625da68836f98346b104533a556c72f06232e3ef
Reviewed-on: http://review.whamcloud.com/9455
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5053 libcfs: clean up cfs_crypto_hash code

Remove <libcfs/libcfs_crypto.h> from <libcfs/libcfs.h> and only
include it into the places where it is actually needed.  This
works out to be the same places as <obd_cksum.h>, so put it there.

Fix the cfs_crypto_hash_* functions to take enum cfs_crypto_hash_alg
as the algorithm type, instead of an unsigned char.  Return
CFS_HASH_ALG_UNKOWN for unknown hash names instead of "0xFF".

Rename some variables to be consistent across functions.

Add comment blocks for cfs_crypto_hash_*() in linux-crypto.c.  Some
of these functions could be shared with user-crypto.c in a common
crypto.c file, but the code shuffling should be done separately.

Change cfs_crypto_hash_final() to always clean up the hash descrptor
instead of not doing this in error cases.  All of the callers were
just calling cfs_crypto_hash_final() immediately to clean up the
descriptor anyway, and the old behaviour is unlike other init/fini
functions, and prone to memory leaks and other incorrect usage.  The
callers can call cfs_crypto_digest_size() to determine the hash size
in advance if needed, and avoid complexity in cfs_crypto_hash_final().

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I79884eb2ee31a2b375420cf62af5ce8ff22e0e75
Reviewed-on: http://review.whamcloud.com/9990
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4933 osc: Automatically increase the max_dirty_mb

When RPC size or the max RPCs in flight is increased, the actual
limit might be max_dirty_mb. This patch automatically increases
the max_dirty_mb value at connection time and when the related
values are tuned manually by proc file system.

this patch also changes the unit of "cl_dirty" and "cl_dirty_max"
in client_obd from byte to page.

Change-Id: Ieaea7660caa8008365b38f548b4ecba4027e080b
Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/10446
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-5262 osd: only allow set size for regular file

Otherwise, set size for other non-regular file (such as directory)
will cause the object data corruption.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I44092796961ef26d47ee9c210f52fa451084bd44
Reviewed-on: http://review.whamcloud.com/10870
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4478 ldiskfs: fix problem when ldiskfs_acct_on() fails

ldiskfs_fill_super() does not handle the failure that
ldiskfs_acct_on() returns correctly. This patch fixes
the problem.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I70afca523cee1d9fe7e0b9c5ffc122fbfd6c34aa
Reviewed-on: http://review.whamcloud.com/8829
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Revert "LU-1538 tests: keep /sbin/mount.lustre until cleanup"

This change totally breaks my testing complaining about /sbin/mount.lustre being on a readonly filesystem.

This reverts commit 2ade2c4e1481c4bacf49e871cbd299cfc2ccc3b3.

Change-Id: Id8292f7e6328caca540808ab42f885289229f96b
Reviewed-on: http://review.whamcloud.com/10911
Tested-by: Jenkins
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>