我有一个从 Arch Linux 上的 USB 设备上的 LUKS 加密分区安装的 XFS 文件系统。
有时它可以正常工作,但偶尔在写入设备时会挂起(或变得非常慢?)几分钟。但它最终会恢复,通常是在我终止写入过程之后。它说的dmesg
是:
[579742.480204] XFS (dm-3): Mounting V5 Filesystem
[579742.571959] XFS (dm-3): Ending clean mount
[579925.430501] INFO: task xfsaild/dm-3:15682 blocked for more than 120 seconds.
[579925.430508] Tainted: G W OE 4.19.41-1-lts #1
[579925.430510] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[579925.430512] xfsaild/dm-3 D 0 15682 2 0x80000080
[579925.430516] Call Trace:
[579925.430526] ? __schedule+0x29b/0x860
[579925.430530] schedule+0x28/0x80
[579925.430589] xfs_log_force+0x163/0x2d0 [xfs]
[579925.430595] ? wake_up_q+0x70/0x70
[579925.430648] xfsaild+0x1ac/0x7b0 [xfs]
[579925.430703] ? xfs_trans_ail_cursor_first+0x80/0x80 [xfs]
[579925.430707] kthread+0x112/0x130
[579925.430710] ? kthread_park+0x80/0x80
[579925.430713] ret_from_fork+0x35/0x40
并journald
说
Jul 10 15:59:27 <username> kernel: INFO: task xfsaild/dm-3:15682 blocked for more than 120 seconds.
Jul 10 15:59:27 <username> kernel: Tainted: G W OE 4.19.41-1-lts #1
Jul 10 15:59:27 <username> kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Jul 10 15:59:27 <username> kernel: xfsaild/dm-3 D 0 15682 2 0x80000080
Jul 10 15:59:27 <username> kernel: Call Trace:
Jul 10 15:59:27 <username> kernel: ? __schedule+0x29b/0x860
Jul 10 15:59:27 <username> kernel: schedule+0x28/0x80
Jul 10 15:59:27 <username> kernel: xfs_log_force+0x163/0x2d0 [xfs]
Jul 10 15:59:27 <username> kernel: ? wake_up_q+0x70/0x70
Jul 10 15:59:27 <username> kernel: xfsaild+0x1ac/0x7b0 [xfs]
Jul 10 15:59:27 <username> kernel: ? xfs_trans_ail_cursor_first+0x80/0x80 [xfs]
Jul 10 15:59:27 <username> kernel: kthread+0x112/0x130
Jul 10 15:59:27 <username> kernel: ? kthread_park+0x80/0x80
Jul 10 15:59:27 <username> kernel: ret_from_fork+0x35/0x40
Jul 10 16:00:54 <username> sudo[17962]: <username> : TTY=pts/12 ; PWD=/home/<username> ; USER=root ; COMMAND=/usr/bin/kill -SIGKILL 17936
Jul 10 16:00:54 <username> sudo[17962]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jul 10 16:00:54 <username> sudo[17962]: pam_unix(sudo:session): session closed for user root
Jul 10 16:01:42 <username> systemd[1]: mnt-backupd.mount: Succeeded.
Jul 10 16:01:42 <username> systemd[523]: mnt-backupd.mount: Succeeded.
Jul 10 16:03:33 <username> kernel: INFO: task xfsaild/dm-3:15682 blocked for more than 120 seconds.
Jul 10 16:03:33 <username> kernel: Tainted: G W OE 4.19.41-1-lts #1
Jul 10 16:03:33 <username> kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Jul 10 16:03:33 <username> kernel: xfsaild/dm-3 D 0 15682 2 0x80000080
Jul 10 16:03:33 <username> kernel: Call Trace:
Jul 10 16:03:33 <username> kernel: ? __schedule+0x29b/0x860
Jul 10 16:03:33 <username> kernel: schedule+0x28/0x80
Jul 10 16:03:33 <username> kernel: xfs_log_force+0x163/0x2d0 [xfs]
Jul 10 16:03:33 <username> kernel: ? wake_up_q+0x70/0x70
Jul 10 16:03:33 <username> kernel: xfsaild+0x1ac/0x7b0 [xfs]
Jul 10 16:03:33 <username> kernel: ? xfs_trans_ail_cursor_first+0x80/0x80 [xfs]
Jul 10 16:03:33 <username> kernel: kthread+0x112/0x130
Jul 10 16:03:33 <username> kernel: ? kthread_park+0x80/0x80
Jul 10 16:03:33 <username> kernel: ret_from_fork+0x35/0x40
Jul 10 16:03:55 <username> kernel: XFS (dm-3): Unmounting Filesystem
我想知道这是什么意思,以及这是从哪里来的。或者,我如何进一步调查这个问题。
我认为,即使设置有点不合常规(USB -> LUKS -> XFS),也不会导致这样的影响。我能找出这是否是硬件问题吗?或者,如果是软件方面的问题,我该如何解决。
答案1
我也遇到过这种情况,在花了很多时间处理这个问题之后,我也使用了 Btrfs,并使用程序 blktrace 来比较文件系统、LUKS 卷和我的物理驱动器在块级别发生的请求,我得出结论,这是一个 XFS 错误。我已经回到了 Btrfs,所以真的不会再继续处理这个问题了,但我给 XFS 邮件列表发了电子邮件,所以如果你仍然遇到这个问题,你可以在那里报告你的问题。我使用的是三星 970 Evo 1TB NVMe,也使用 LUKS,并且我在 QEMU 虚拟机中。请参阅https://www.spinics.net/lists/linux-xfs/msg31927.html