Re: ls -al .zfs/snapshots dir reboots machine

From: Pawel Jakub Dawidek <pjd_at_FreeBSD.org>
Date: Wed, 18 Apr 2007 17:27:50 +0200
On Wed, Apr 18, 2007 at 12:02:06AM +0900, Hidetoshi Shimokawa wrote:
> On 4/17/07, Pawel Jakub Dawidek <pjd_at_freebsd.org> wrote:
> >On Tue, Apr 17, 2007 at 10:51:37AM +0900, Hidetoshi Shimokawa wrote:
> >> I can repoduce this hang.
> >>
> >> # cd /pool/test/.zfs/snapshot
> >> # /bin/ls
> >> snap
> >> # /bin/ls -F
> >> ls: snap: No such file or directory
> >> # /bin/ls -F
> >> (hangs)
> >
> >Are you able to break into debugger? I was able to reproduce it once
> >(but with panic in crdup()), but I can no longer do it...
> 
> In my case, only 'ls' hangs and other part of the system is normal.
> 
> # ps alxg | grep ls
>    0  2129  2118   0  -4  0  6100  1512 zfs    D+    p0    0:00.01 /bin/ls -F
> 
> Once, I got "panic: lockmgr: locking against myself"  10 or 20 min. later
> of "ls -F".
> 
> >> It looks like another name cache problem for me.
> >> I noticed 'cache_purge(vp)' is commented out in domount() in opensolaris_vfs.c.
> >> Shouldn't we need 'dnlc_purge_vp(vp)' here?
> >
> >There is dnlc_purge_vfsp() at the begining of zfs_umount(), which should
> >be sufficient.
> 
> domount() of opensolaris also has dnlc_purge_vp() to invalidate cached
> entry for the mount point. Do you really think it's unnecessary?
> 
> http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/vfs.c#1383

Yes, we don't need it. In Solaris the domount() function is a general
purpose function, but in FreeBSD/ZFS it is only used to mount snapshots
and .zfs/ entires doesn't create namecache entires, so there is nothing
to purge.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd_at_FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

Received on Wed Apr 18 2007 - 13:28:13 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:08 UTC