LU-1421 clio: check cp_owner of cl_page after the page is owned

After page writeback is supported in clio, there exists a short
period that page is unlocked but cp_owner is set. This confuses
the assertion of cl_page_assume(). This problem can be fixed by
checking cp_owner after the page is owned.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Iafcdbb9b0dbb5f081a84c1da1b7ad8051d406988
Reviewed-on: http://review.whamcloud.com/3027
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1286 obdclass: oops in lprocfs_remove_nolock

Move lov /proc entry cleanup from lov_precleanup to
lov_cleanup, so the lov proc entry will be removed after
the pool has been removed, otherwise it will
cause oops during pool proc entry deletion.

Signed-off-by: Di Wang <di.wang@whamcloud.com>
Change-Id: I1d1b03d02348caaa1e421aa1de1535c8cf0ba3f4
Reviewed-on: http://review.whamcloud.com/2450
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
New tag 2.2.55

Change-Id: I61c9699e1a557d3d5c0848c5e8628f70d256c280
Signed-off-by: Oleg Drokin <green@whamcloud.com>
LU-827 tests: fix user ID for sanityn test_60

If sanityn.sh test_60() is run on a test system before any of the
quota users are configured, the test will fail.  The test does not
require that any specific user ID is used, so instead use RUNAS_ID
(which is a numeric value and does not even need to be defined in
/etc/passwd for this test to work).

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iaca88344e0dc615f44417e4175e5cddd146c2a7a
Reviewed-on: http://review.whamcloud.com/3021
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
LU-482 tests: cleanup clients/OSTs after MDS error

If the MDS fails to mount due to LU-482, ensure that the clients
and OSTs are unmounted cleanly.  Otherwise, the normal unmount
will hang on the clients as they wait for the MDS to be recovered.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iccd8f81f714974063eaeec45ffbd80f9cef3242b
Reviewed-on: http://review.whamcloud.com/3019
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-56 ptlrpc: common code to validate nthreads

Add a common function to validate ptlrpc service threads number,
instead of checking it before registration of each service.
This function (ptlrpc_server_nthreads_check) will be enhanced
soon for CPT affinity ptlrpc service.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I5db09396f4a95e36d8f5d38777c51eafb7dea5b1
Reviewed-on: http://review.whamcloud.com/2879
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1513 libcfs: call cfs_alloc with proper masks

Do not use kernel GFP masks directly when call cfs_alloc,
instead, Lustre special flags can be used to control the
allocator's behavior.

cfs_alloc will convert these Lustre special flags to some
kernle GFP masks, then call kmalloc with these GFP masks.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I3189e143ff0cf65a08a1bdf2b8476ab151dc308e
Reviewed-on: http://review.whamcloud.com/3118
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1031: add grouplock test to sanity.sh

add a simple grouplock test to sanity.sh (test_82)
replace hardcoded use of multiop by a $MULTIOP in
test scripts.

Change-Id: I94ba2248b7efafe258873c468e6d0cabdfcb7d09
Signed-off-by: jcl <jacques-charles.lafoucriere@cea.fr>
Reviewed-on: http://review.whamcloud.com/2098
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
2.3.56 tag

Change-Id: Ia76ec8d6266348c1135292d6de4ded530e6a3889
LU-1305 osd: new index flag DT_IND_RANGE

introduced in orion to recognize whether the index support
range lookups (used by fldb)

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I40efa613697ebe8394557d5f687132ca9f542859
Reviewed-on: http://review.whamcloud.com/2883
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1305 osd: lnb_file_offset in struct niobuf_local

introduced in orion so that every buffer can be marked
with a specific offset.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ic8c69fd401300107d589a093023ffe41c0f0eddd
Reviewed-on: http://review.whamcloud.com/2884
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1406 ofd: add DLM and LVB code

OFD dlm and lvb functions

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Ieddd2b16129f62c6e380d007aaa1f2de70e8a9ca
Reviewed-on: http://review.whamcloud.com/2892
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
LU-1406 ofd: IO operations

add IO functions to OFD

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Ie78e92f5f770ff07c94bf87b2d5ee8300673d271
Reviewed-on: http://review.whamcloud.com/2893
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
LU-1406 ofd: add OBD methods to handle OST requests

Finally add OBD handlers to process incoming requests.
Add stub for quota functions, quota is non-functional in OFD.
Fix couple minor issues:
- slot checking in ofd_last_rcvd_update() must check lr_idx
- remove osd_write_locked() assertion from __osd_xattr_set(),
  it is too excessive there

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Iab270cdf5f2ad41df86845190c5c6db3436279c8
Reviewed-on: http://review.whamcloud.com/2894
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
LU-1305 defs: zfs definitions

couple definitions required for osd-zfs

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I994ab7353edef7f4ccc39707534e7c262e635af3
Reviewed-on: http://review.whamcloud.com/2962
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1305 osd: quota support for osd-zfs

export of accouting information and enforcement

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Iac5100960a5107277ccd628ba3a682cb9b03c0ed
Reviewed-on: http://review.whamcloud.com/2970
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1014 mountconf: Revert "MGS should process parameter config"

This reverts commit 6cde8692384a1d3a6d0e8114629fa943c951fe40.

Previous commit is wrong, will fix it in another patch.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I5868cb1908f9b123db5b8bd7be9e364ae9a51d6a
Reviewed-on: http://review.whamcloud.com/2843
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1030 osc: new IO engine implementation

New IO engine to manage dirty pages with osc_extent.

Osc_extent is a data structure to manage a series of contiguous
blocks; however, the pages in an extent is not required to be
contiguous. An extent must be written out in one RPC.

The purpose of introducing extents are:
1. make grants work for extent-based OSD;
2. form better IO by picking up contiguous pages to compose RPC;
3. reimplement ll_writepages() with CIT_FSYNC.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I3ef619c1f07eefd201236ab55e5fd858791d41e0
Reviewed-on: http://review.whamcloud.com/2270
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1305 libcfs: S_OSD subsystem

new definition for osd components

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ia224dbd09caecb5cc31488627bb6a958b680377a
Reviewed-on: http://review.whamcloud.com/3088
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-988 ost: add debugging for inode timestamps

Intermittent test failures for sanity.sh test_39j are showing the
inode timestamps going backward. Add internal debugging to track the
LVB timestamps to see where the old timestamps are coming from, to
determine if this is a problem with the VM environment being used for
testing, or if it is a genuine problem in the Lustre code.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I590d8b28b7a37010af6a43d329917022b840d074
Reviewed-on: http://review.whamcloud.com/3069
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>