From b6a355c33c622746fd1ca740de5106ea49b4bd11 Mon Sep 17 00:00:00 2001 From: Tycho Andersen Date: Thu, 5 Nov 2015 22:46:33 -0700 Subject: [PATCH] mnt: always_fail should report an error Otherwise, you just see an anonymous failure in the logs, like: (00.244773) mnt: Dumping mountpoints (00.244781) mnt: 253: 42:/ @ ./dev/.lxc (00.244793) mnt: Path `/dev/.lxc' resolved to `./dev/.lxc' mountpoint (00.249039) mnt: 133: 41:/ @ ./dev/hugepages (00.249052) mnt: 116: 40:/ @ ./run/lock (00.249064) mnt: Path `/run/lock' resolved to `./run/lock' mountpoint (00.251948) mnt: 115: 3f:/ @ ./run (00.251970) mnt: Something is mounted on top of ./run (00.264803) mnt: Path `/run' resolved to `./run' mountpoint tar: ./uuidd/request: socket ignored tar: ./dbus/system_bus_socket: socket ignored tar: ./acpid.socket: socket ignored tar: ./systemd/journal/syslog: socket ignored tar: ./systemd/journal/dev-log: socket ignored tar: ./systemd/journal/socket: socket ignored tar: ./systemd/journal/stdout: socket ignored tar: ./systemd/private: socket ignored tar: ./systemd/notify: socket ignored (00.368950) mnt: 113: 3e:/ @ ./dev/shm (00.368978) mnt: Path `/dev/shm' resolved to `./dev/shm' mountpoint (00.371551) mnt: 112: 3d:/ @ ./dev/pts (00.371566) mnt: 249: 28:/ @ ./var/lib/lxcfs (00.371749) Unlock network (00.371762) Running network-unlock scripts (00.371766) Unfreezing tasks into 1 (00.371770) Unseizing 13683 into 1 (00.371784) Unseizing 14839 into 1 (00.371794) Unseizing 15678 into 1 (00.371800) Unseizing 16126 into 1 (00.371805) Unseizing 16177 into 1 (00.371814) Unseizing 16301 into 1 (00.371843) Unseizing 16323 into 1 (00.371854) Unseizing 16414 into 1 (00.371900) Unseizing 16595 into 1 (00.371911) Unseizing 16695 into 1 (00.371942) Unseizing 16744 into 1 (00.371964) Unseizing 16904 into 1 (00.372103) Unseizing 16944 into 1 (00.372140) Unseizing 17558 into 1 (00.372196) Error (cr-dump.c:1631): Dumping FAILED. ...which is hard to debug. Signed-off-by: Tycho Andersen Signed-off-by: Pavel Emelyanov --- mount.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mount.c b/mount.c index aea9807dd..9eb7dc8cf 100644 --- a/mount.c +++ b/mount.c @@ -1390,6 +1390,8 @@ out: */ static int always_fail(struct mount_info *pm) { + pr_err("failed to dump fs %s (%s): always fail\n", pm->mountpoint, + pm->fstype->name); return -1; }