[CRIU] [PATCH 5/7] sk-unix: Don't fail if socket path lays on btrfs volume
Cyrill Gorcunov
gorcunov at gmail.com
Wed Dec 4 05:54:16 PST 2013
On Wed, Dec 04, 2013 at 05:51:33PM +0400, Pavel Emelyanov wrote:
>
> - if (st.st_dev != dev)
> + if (phys_stat_dev_match(st.st_dev, dev)
>
> in all the places including ghosts and inotifies, where
>
> bool phys_stat_dev_match(dev_t st_dev, dev_t phys_dev)
> {
> struct mount_info *mi;
>
> if (st_dev == phys_dev)
> return true;
>
> /*
> * comment here about btrfs devs screwup
> */
>
> mi = lookup_mnt_sdev(phys_dev);
> if (!mi)
> /* no mountpoint with this device */
> return false;
>
> if (strcmp(mi->kfstype, "btrfs"))
> /* not btrfs -- no match */
> return false;
>
> if (!mi->private)
> btrfs_lazy_parse_subvol(mi);
btrfs_lazy_parse_subvol _may_ fail, and when it happens you
must exit out with error.
>
> return is_btrfs_subvol(mi->private, st_dev);
> }
>
Cyrill
More information about the CRIU
mailing list