Pawel Jakub Dawidek wrote: >Hi. > >I'm currently working on snapshots and can't understand one thing. > >When someone lookups a snapshot directory it gets automatically mounted >from zfsctl_snapdir_lookup() via domount(). > >Ok, domount() ends up in zfs_domount(). zfs_domount() wants to open >dataset through dmu_objset_open(). >dmu_objset_open() fails at first time returning EROFS, so we retry with >DS_MODE_READONLY, but for me it fails again (EBUSY). > >I investigated that this dataset was DOS_MODE_PRIMARY open on file >system mount, so snapshot cannot DOS_MODE_PRIMARY open it again. > >What am I missing here or what have I messed up? >Any ideas? > >
The mode is staying set after the failed EROFS open? This should have been cleared when the open failed, so the second attempt can succeed. -Mark
