LU-1337 llite: take trunc_sem outside cl_io_loop for mkwrite

In truncate path it acquires lli_trunc_sem and then dlm lock, so
in page_mkwrite we should take it in the same sequence to avoid
dead lock.

This is a fix for f78805dbf041bb42b250fe754dff7b864856203f .

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Idb5574bffdaf00461befd43b867cdd9b3e549efe
Reviewed-on: http://review.whamcloud.com/4485
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-2284 quota: debug patch for test_7d

Try to collect D_TRACE & D_QUOTA log to see why the setquota failed
with -EINVAL.

This patch improve the test script a bit: fail the test when setquota
failed.

Test-Parameters: testlist=sanity-quota
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ic866dcefcb174bd0128e63f5777824608db52962
Reviewed-on: http://review.whamcloud.com/4510
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
LU-2220 doc: add CLIO notes

Add notes on the CLIO subsystem originally composed by Nikita Danilov
to the lustre/doc directory.  Update document to improve accuracy,
language, and formatting.

Original document URL:
http://wiki.lustre.org/images/3/37/CLIO-TOI-notes.pdf

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I18ac65bc437cf095ac7a897ebd2f8882318d27ad
Reviewed-on: http://review.whamcloud.com/4377
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Ian Colle <Ian.Colle@intel.com>
LU-2156 misc: too noisy messages are suppressed

- number of messages leading to confusion and adding no
  useful information to the customers are suppressed.

- remove KEY_REVIMP_UPD - it's not used with OFD

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I9679b786354a2f4b52c5c13e0e2ec98a5a5b86a9
Reviewed-on: http://review.whamcloud.com/4261
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
LU-2322 quota: OBD_IDX_READ should be handled during recovery

OBD_IDX_READ should be handled during recovery.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I509be43b062943e7601fdfc3a38178acb2d150b0
Reviewed-on: http://review.whamcloud.com/4580
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
LU-1337 llite: kernel 3.2 protects inode->i_nlink

Kernel 3.2 protects inode->i_nlink from direct modification.
Filesystems can only read i_nlink directly and shall use the
(set|clear|inc|drop)_nlink for modification.
See kernel commit a78ef704a8dd430225955f0709b22d4a6ba21deb.

This patch adds LC_HAVE_PROTECT_I_NLINK checking and implements
set_nlink for old kernel, clear/inc/drop_nlink exists after 2.6.18

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Ie958cb308291ecc48d409a1282fed7ea3549a561
Reviewed-on: http://review.whamcloud.com/3577
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>