]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
Tools: hv: vss: fix loop device detection
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 5 Jun 2018 20:37:56 +0000 (13:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jul 2018 11:02:33 +0000 (13:02 +0200)
commit07136793ccad877727afada2b0c926031f10cf52
tree86bbf9cffe842672847c5323e5fc3c09f34f2712
parent8a99c920092f444cf9f1d737ae76527102886d8e
Tools: hv: vss: fix loop device detection

Commit ea81fdf0981d ("Tools: hv: vss: Skip freezing filesystems backed by
loop") added skip for filesystems backed by loop device. However, it seems
the detection of such cases is incomplete.

It was found that with 'devicemapper' storage driver docker creates the
following chain:

NAME MAJ:MIN
loop0 7:0
..docker-8:4-8473394-pool 253:0
  ..docker-8:4-8473394-eac... 253:1

so when we're looking at the mounted device we see major '253' and not '7'.

Solve the issue by walking /sys/dev/block/*/slaves chain and checking if
there's a loop device somewhere.

Other than that, don't skip mountpoints silently when stat() fails. In case
e.g. SELinux is failing stat we don't want to skip freezing everything
without letting user know about the failure.

Fixes: ea81fdf0981d ("Tools: hv: vss: Skip freezing filesystems backed by loop")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/hv/hv_vss_daemon.c