Whamcloud - gitweb
LU-6757 ldiskfs: acquire i_mutex lock for ext4_update_i_disksize 12/16012/3
authorJian Yu <jian.yu@intel.com>
Mon, 24 Aug 2015 06:03:02 +0000 (23:03 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 26 Aug 2015 15:31:49 +0000 (15:31 +0000)
commit7417966b6a2ebf56a49dee327f1561f63bf9224b
treebd72dff9905b11ec6af71cc0726641bc41282a01
parentc67434cbf27d9a7bb193c2b64b2a3ed40f48c93b
LU-6757 ldiskfs: acquire i_mutex lock for ext4_update_i_disksize

For RHEL 7.1 kernel version 3.10.0, i_mutex lock needs to be acquired
before calling ext4_update_i_disksize() to avoid races with truncate.

i_size_write() also needs locking around it (normally i_mutex), otherwise
on 32bit/SMP an update of i_size_seqcount can be lost, resulting in
subsequent i_size_read() calls spinning forever.

For large EA support, ext4_xattr_check_names() will return -EIO. This
patch fixes that by checking whether the large EA value is saved in an
external EA inode or not.

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I095246cc1f7457defe87ca246edf98bbc051bc29
Reviewed-on: http://review.whamcloud.com/16012
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: Bob Glossman <bob.glossman@intel.com>
ldiskfs/kernel_patches/patches/rhel7/ext4-large-eas.patch