LU-3219 ost: Ensure dirty flushed on fiemap ioctl

Data corruption is possible if cp(coreutils) uses FIEMAP to obtain
data holes in shared file, since there could be dirty cache on
other clients which hasn't been flushed back.

To ensure all the dirty on remote clients being flushed back on
fiemap ioctl, we'd acquire ldlm lock on server side for fiemap,
unless the local client (which invoke fiemap) has cached lock.

Xyratex-bug-id: MRP-1001
Signed-off-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I67fe05bac1ce75f98c3d3806a4d08f6cb02048e6
Reviewed-on: http://review.whamcloud.com/6127
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2915 lfsck: NO scrub for agent inode and remote parent

Under DNE case, for the object on remote MDT, there will be an agent
inode on the local MDT where the name entry resides. We do NOT build
OI mapping for such agent inode, so OI scrub should skip it.The same
for the "/REMOTE_PARENT_DIR".

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I164473bcba80043800d491639c027e7c13f30bd9
Reviewed-on: http://review.whamcloud.com/6332
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-3328 osp: Only signal thread completion when we are done

IT seems that by signalling the completion of a thread before
we are done inspecting it's memory is racy and could cause access
to freed memory.

Change-Id: Ia992e9c7d0d78fca1afbfc98f51c5df3f6dc3a28
Signed-off-by: Oleg Drokin <green@intel.com>
Reviewed-on: http://review.whamcloud.com/6329
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-3279 changelog: fix CL_LAYOUT comment, string

Fix the CL_LAYOUT comment, since it is possible that layout swap
could be used in cases where the file content is changed.  I don't
think there are any real world use cases for this, but that depends
on what tools are being used on the filesystem.

Also change the "LAYOUT" string for this ChangeLog record type to
be "LYOUT" to match the convention of other strings to only be
5 characters long.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ibf9a57216e0c45a1e15cef9cfe5ee7f509500c1e
Reviewed-on: http://review.whamcloud.com/6338
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3036 mdt: set ATTR_xTIME_SET to make atime update properly

To make atime update properly between 1.8 client and 2.x server,
this patch includes the following fixes:
- if MDS_ATTR_xTIME is set without MDS_ATTR_xTIME_SET and the client
  does not have OBD_CONNECT_FULL20, convert it to LA_xTIME in
  mdt_setattr_unpack().
- set both MDS_ATTR_xTIME | MDS_ATTR_xTIME_SET for timestamps in
  ll_prepare_close(). This allows us to fix the server-side timestamp
  setting in the future.
- remove attr_unpack() and convert the flags from MDS_ATTR_ to LA_*
  directly in mdt_attr_valid_xlate() instead.
- improve sanityn.sh test_23().

Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: I9454d7689243a268ebd4f40566f77e4f53996d5f
Reviewed-on: http://review.whamcloud.com/6327
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-3292 build: kernel update for 3.0.74-0.6.6 sles11sp2

Delete base and ldiskfs patches that are now obsolete
in the latest kernel update version for SLES11 SP2.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I9a5ef1347afb228453db79b213e3881c6a112938
Reviewed-on: http://review.whamcloud.com/6293
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
New tag 2.4.50

After branching off b2_4, master becomes 2.5.0 development branch.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>

Change-Id: I1c8207394016d793a64f57d410d33c43ac96b34c