]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/xfs/xfs_fsops.c
xfs: issue log message on user force shutdown
authorDave Chinner <dchinner@redhat.com>
Thu, 18 Oct 2018 06:20:39 +0000 (17:20 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 18 Oct 2018 06:20:39 +0000 (17:20 +1100)
commit56668a5cc420818b8e9c2197281d068552f80e46
treeda5ebb43e62ed26409fd3f99e15264154ceacbdd
parent38b6238eb6b4f4b7fe5442670156c81b21516bee
xfs: issue log message on user force shutdown

The kernel only issues a log message that it's been shut down when
the filesystem triggers a shutdown itself. Hence there is no trace
in the log when a shutdown is triggered manually from userspace.
This can make it hard to see sequence of events in the log when
things go wrong, so make sure we always log a message when a
shutdown is run.

While there, clean up the logic flow so we don't have to continually
check if the shutdown trigger was user initiated before logging
shutdown messages.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_fsops.c