]> git.hungrycats.org Git - linux/commit
Btrfs: don't delay inode ref updates during log replay
authorChris Mason <clm@fb.com>
Wed, 31 Dec 2014 17:18:29 +0000 (12:18 -0500)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Fri, 23 Jan 2015 13:25:31 +0000 (08:25 -0500)
commit3d7b7d122054a4427fac181e1454903f559250cc
treeda6389780330501151130457c8ea6b6caa6b7510
parent4dd17486a94a4bda23bd08dad200b6583f7360f2
Btrfs: don't delay inode ref updates during log replay

Commit 1d52c78afbb (Btrfs: try not to ENOSPC on log replay) added a
check to skip delayed inode updates during log replay because it
confuses the enospc code.  But the delayed processing will end up
ignoring delayed refs from log replay because the inode itself wasn't
put through the delayed code.

This can end up triggering a warning at commit time:

WARNING: CPU: 2 PID: 778 at fs/btrfs/delayed-inode.c:1410 btrfs_assert_delayed_root_empty+0x32/0x34()

Which is repeated for each commit because we never process the delayed
inode ref update.

The fix used here is to change btrfs_delayed_delete_inode_ref to return
an error if we're currently in log replay.  The caller will do the ref
deletion immediately and everything will work properly.

Signed-off-by: Chris Mason <clm@fb.com>
cc: stable@vger.kernel.org # v3.18 and any stable series that picked 1d52c78afbbf80b58299e076a159617d6b42fe3c
(cherry picked from commit 6f8960541b1eb6054a642da48daae2320fddba93)
fs/btrfs/delayed-inode.c