Re: [PATCH 0/3] fanotify support for btrfs sub-volumes

Christoph Hellwig
2023-11-08T14:07:19Z

On Wed, Nov 08, 2023 at 09:22:33AM +0100, Christian Brauner wrote:
> > /mnt/1/foo to /mnt/2/bar will get your dev 8 for /mnt/2/bar
> >
> > So the device number changes at the mount point here, bind mount or not.
>
> Yes, I know. But /mnt/2/ will have the device number of the
> superblock/filesystem it belongs to and so will /mnt/1. Creating a
> bind-mount won't suddenly change the device number and decoupling it
> from the superblock it is a bind-mount of.

It doesn't any more then just changing st_dev. But at least it aligns
to the boundary that such a change always aligned to in not just Linux
but most (if not all?) Unix variants and thus where it is expected.