This allows dracut running inside chroot to properly detect the root filesystem type and include the relevant dracut module.
When going inside chroot only the mounts under it are visible in /proc/mounts
the snashot directory in not a mountpoint itself, it's the upper level subvolume that's mounted. The bind mount to itself solves this issue, and makes it visible inside the chroot.
If there is an x-initrd.mount option in the fstab entry for the rootfs (seems to be the case for prebuilt images) this is not strictly needed, but there isn't one if using .iso and the installer.
This allows dracut running inside chroot to properly detect the root filesystem type and include the relevant dracut module.
When going inside chroot only the mounts under it are visible in /proc/mounts the snashot directory in not a mountpoint itself, it's the upper level subvolume that's mounted. The bind mount to itself solves this issue, and makes it visible inside the chroot.
If there is an x-initrd.mount option in the fstab entry for the rootfs (seems to be the case for prebuilt images) this is not strictly needed, but there isn't one if using .iso and the installer.