Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Nov 2010 13:25:24 +0200
From:      Andriy Gapon <avg@freebsd.org>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        freebsd-fs@freebsd.org, freebsd-stable@freebsd.org
Subject:   Re: 8.1-STABLE: problem with unmounting ZFS snapshots
Message-ID:  <4CDE75A4.8050702@freebsd.org>
In-Reply-To: <20101113112104.GE2392@deviant.kiev.zoral.com.ua>
References:  <D9ABDE54892A4D9285FE7FFA6E1B1B69@vosz.local> <4CDD2F5F.2000902@freebsd.org> <FD7FC6ED159249338A04BE125941D146@vosz.local> <4CDD4EB4.40004@freebsd.org> <4CDDF77B.90708@FreeBSD.org> <4CDE6823.6080907@freebsd.org> <4CDE7133.6010803@FreeBSD.org> <4CDE7203.7090507@freebsd.org> <20101113112104.GE2392@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
on 13/11/2010 13:21 Kostik Belousov said the following:
> On Sat, Nov 13, 2010 at 01:09:55PM +0200, Andriy Gapon wrote:
>> on 13/11/2010 13:06 Martin Matuska said the following:
>>> No, this is not good for us. Solaris does not allow "mounting" of
>>> snapshots on any vnode, like we do. Solaris has them only in
>>> .zfs/snapshots. This allows us to have read-only mounts without even
>>> mounting the parent zfs.
>>>
>>> Before v15 we have been happy with that code and had no issues :-)
>>>
>>> I have a very simple testcase where just fixing the VFS_RELE breaks our
>>> forced unmount. Let's say we use the correct VFS_RELE in zfs_vfsops.c:
>>> VFS_RELE(vfsp->mnt_vnodecovered->v_vfsp);
>>>
>>> Now let's say you have a mounted filesystem (e.g. md) under /mnt:
>>> /dev/md5 on /mnt (ufs, local)
>>>
>>> # mkdir /mnt/test
>>> # mount -t zfs tank@t2 /mnt/test
>>> # umount -f /mnt
>>>
>>> Now you will hang because the second VFS_HOLD.
>>
>> Hang here would be bad, I agree.
>> But I think that the umount shouldn't succeed either, in this case.
> Normal unmount indeed shall not succeed in this case, because mount
> adds a reference to the covered vnode. But forced unmount should be
> allowed to proceed.
> 
> After unmount, you can use fsid to unmount the lower mount point.

Ah, I see now, thank you for the explanation.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CDE75A4.8050702>