dmesg“内核:[3179429.878254] loop5:检测到容量变化从 0 到 325360”?

dmesg“内核:[3179429.878254] loop5:检测到容量变化从 0 到 325360”?

Ubuntu 22.04

我在 dmesg 中发现这个:

kernel: [3179429.878254] loop5: detected capacity change from 0 to 325360

昨天有一条类似的消息,但针对的是循环 2。这说明什么?谢谢。

答案1

set_capacity_and_notify该消息是从内核源代码树中文件 (gendisk 处理)中的函数打印出来的block/genhd.c。在您的上下文中,调用来自文件drivers/block/loop.c。请参见人循环有关循环设备的更多详细信息,但第一部分已复制并粘贴在此处:

循环设备是一种块设备,它不将其数据块映射到物理设备(如硬盘或光盘驱动器),而是映射到文件系统中常规文件的块或另一个块设备。这很有用,例如,可以为存储在文件中的文件系统映像提供块设备,以便可以使用 mount(8) 命令挂载它。

其中有多次对 的调用loop_set_size,而该调用又调用set_capacity_and_notifydrivers/block/loop.c因此我们需要更多详细信息以了解您正在做什么来进一步隔离。

尝试该losetup命令来了解有关潜在/dev/loop#设备的更多信息:例如:

doug@desk-jj:~$ /sbin/losetup --list
NAME        SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE                                        DIO LOG-SEC
/dev/loop1          0      0         1  1 /var/lib/snapd/snaps/core_16202.snap               0     512
/dev/loop8          0      0         1  1 /var/lib/snapd/snaps/gnome-3-38-2004_137.snap      0     512
/dev/loop6          0      0         1  1 /var/lib/snapd/snaps/firefox_3252.snap             0     512
/dev/loop13         0      0         1  1 /var/lib/snapd/snaps/gtk-common-themes_1534.snap   0     512
/dev/loop4          0      0         1  1 /var/lib/snapd/snaps/core20_2015.snap              0     512
/dev/loop11         0      0         1  1 /var/lib/snapd/snaps/snap-store_959.snap           0     512
/dev/loop2          0      0         1  1 /var/lib/snapd/snaps/core20_1852.snap              0     512
/dev/loop0          0      0         1  1 /var/lib/snapd/snaps/bare_5.snap                   0     512
/dev/loop9          0      0         1  1 /var/lib/snapd/snaps/gnome-42-2204_141.snap        0     512
/dev/loop7          0      0         1  1 /var/lib/snapd/snaps/firefox_3290.snap             0     512
/dev/loop14         0      0         1  1 /var/lib/snapd/snaps/gnome-3-38-2004_143.snap      0     512
/dev/loop5          0      0         1  1 /var/lib/snapd/snaps/core22_864.snap               0     512
/dev/loop12         0      0         1  1 /var/lib/snapd/snaps/snap-store_638.snap           0     512
/dev/loop3          0      0         1  1 /var/lib/snapd/snaps/core_14946.snap               0     512
/dev/loop10         0      0         1  1 /var/lib/snapd/snaps/gtk-common-themes_1535.snap   0     512

答案2

我还没有确定的答案,但我认为这些循环容量变化通知只是 snapd 正在做的事情的一部分。以下是今天的 dmesg 输出的一部分:

Dec 10 11:48:48 AirchainProcessor snapd[825]: storehelpers.go:773: cannot refresh: snap has no updates available: "bare", "chromium", "core20", "core22", "gnome-3-38-2004", "gnome-42-2204", "gtk-common-themes", "snapd"
Dec 10 16:23:48 AirchainProcessor snapd[825]: storehelpers.go:773: cannot refresh: snap has no updates available: "bare", "chromium", "core22", "gnome-3-38-2004", "gnome-42-2204", "gtk-common-themes", "snapd"
Dec 10 16:23:53 AirchainProcessor kernel: [3407112.772338] loop1: detected capacity change from 0 to 130888
Dec 10 16:23:54 AirchainProcessor snapd[825]: storehelpers.go:773: cannot refresh snap "core20": snap has no updates available
Dec 10 20:43:48 AirchainProcessor snapd[825]: storehelpers.go:773: cannot refresh: snap has no updates available: "bare", "chromium", "core20", "core22", "gnome-3-38-2004", "gnome-42-2204", "gtk-common-themes", "snapd"

因此这里可能没什么可看的。

相关内容