mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-04 00:05:26 +00:00
mount: take into account btrfs workaround for converting st_dev to phys_dev
BTRFS returns subvolume dev-id instead of superblock dev-id Signed-off-by: Andrew Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
b664bb142b
commit
ee9258e80f
6
mount.c
6
mount.c
@@ -469,6 +469,7 @@ static struct mount_info *mnt_build_tree(struct mount_info *list)
|
|||||||
*/
|
*/
|
||||||
static int __open_mountpoint(struct mount_info *pm, int mnt_fd)
|
static int __open_mountpoint(struct mount_info *pm, int mnt_fd)
|
||||||
{
|
{
|
||||||
|
dev_t dev;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@@ -490,9 +491,10 @@ static int __open_mountpoint(struct mount_info *pm, int mnt_fd)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (st.st_dev != kdev_to_odev(pm->s_dev)) {
|
dev = phys_stat_resolve_dev(st.st_dev, pm->mountpoint + 1);
|
||||||
|
if (dev != pm->s_dev) {
|
||||||
pr_err("The file system %#x (%#x) %s %s is inaccessible\n",
|
pr_err("The file system %#x (%#x) %s %s is inaccessible\n",
|
||||||
pm->s_dev, (int)st.st_dev, pm->fstype->name, pm->mountpoint);
|
pm->s_dev, (int)dev, pm->fstype->name, pm->mountpoint);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user