[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250103155406.GC1284777@mit.edu>
Date: Fri, 3 Jan 2025 10:54:06 -0500
From: "Theodore Ts'o" <tytso@....edu>
To: Jan Kara <jack@...e.cz>
Cc: Baokun Li <libaokun1@...wei.com>,
"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>,
Christian Brauner <brauner@...nel.org>, sunyongjian1@...wei.com,
Yang Erkun <yangerkun@...wei.com>, linux-fsdevel@...r.kernel.org,
linux-xfs@...r.kernel.org
Subject: Re: [BUG REPORT] ext4: “errors=remount-ro” has become “errors=shutdown”?
On Fri, Jan 03, 2025 at 10:35:17AM -0500, Theodore Ts'o wrote:
> I don't see how setting the shutdown flag causes reads to fail. That
> was true in an early version of the ext4 patch which implemented
> shutdown support, but one of the XFS developers (I don't remember if
> it was Dave or Cristoph) objected because XFS did not cause the
> read_pages function to fail. Are you seeing this with an upstream
> kernel, or with a patched kernel? The upstream kernel does *not* have
> the check in ext4_readpages() or ext4_read_folio() (post folio
> conversion).
OK, that's weird. Testing on 6.13-rc4, I don't see the problem simulating an ext4 error:
root@...-xfstests:~# mke2fs -t ext4 -Fq /dev/vdc
/dev/vdc contains a ext4 file system
last mounted on /vdc on Fri Jan 3 10:38:21 2025
root@...-xfstests:~# mount -t ext4 -o errors=continue /dev/vdc /vdc
[ 24.780982] EXT4-fs (vdc): mounted filesystem f8595206-fe57-486c-80dd-48b03d41ebdb r/w with ordered data mode. Quota mode: none.
root@...-xfstests:~# cp /etc/motd /vdc/motd
root@...-xfstests:~# echo testing > /sys/fs/ext4/vdc/trigger_fs_error
[ 42.943141] EXT4-fs error (device vdc): trigger_test_error:129: comm bash: testing
root@...-xfstests:~# cat /vdc/motd
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@...-xfstests:~#
HOWEVER, testing with shutdown ioctl, both ext4 and xfs are failing with EIO:
root@...-xfstests:~# mount /dev/vdc /vdc
[ 7.969168] XFS (vdc): Mounting V5 Filesystem 7834ea96-eab0-46c5-9b18-c8f054fa9cf4
[ 7.978539] XFS (vdc): Ending clean mount
root@...-xfstests:~# cp /etc/motd /vdc
root@...-xfstests:~# /root/xfstests/src/godown -v /vdc
Opening "/vdc"
Calling XFS_IOC_GOINGDOWN
[ 29.354609] XFS (vdc): User initiated shutdown received.
[ 29.356123] XFS (vdc): Log I/O Error (0x6) detected at xfs_fs_goingdown+0x55/0xb0 (fs/xfs/xfs_fsops.c:452). Shutting down filesystem.
[ 29.357092] XFS (vdc): Please unmount the filesystem and rectify the problem(s)
root@...-xfstests:~# cat /vdc/motd
cat: /vdc/motd: Input/output error
root@...-xfstests:~#
So I take back what I said earlier, but I am a bit confused why it
worked after simulating an file system error using "echo testing >
/sys/fs/ext4/vdc/trigger_fs_error".
- Ted
Powered by blists - more mailing lists