Whamcloud - gitweb
LU-12977 ldiskfs: properly take inode_lock() for truncates 16/37116/5
authorJames Simmons <jsimmons@infradead.org>
Mon, 30 Dec 2019 17:48:05 +0000 (12:48 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 28 Jan 2020 06:03:47 +0000 (06:03 +0000)
Originally Lustre grabbed the inode_lock() but this lead to
deadlocks as described in LU-6446 and LU-4252. The recent work
of LU-10048 changed the truncate code so that it is called
asynchronously from the main transactions. This should avoid
lock ordering issues. It should be safe to take the
inode_lock() around ldiskfs_truncate() and remove the WARN().

Test-Parameters: fstype=ldiskfs testlist=racer

Change-Id: Id7b6d05d054ab041980e946989aa1effae5c7111
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/37116
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

No differences found