Date: Mon, 23 Jun 2008 06:13:03 GMT From: Masakazu Asama <m-asama@ginzado.ne.jp> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/124899: [patch] Reboot hangs after ZFS snapshot directory lookup Message-ID: <200806230613.m5N6D3nN088430@www.freebsd.org> Resent-Message-ID: <200806230620.m5N6K1on084868@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 124899 >Category: kern >Synopsis: [patch] Reboot hangs after ZFS snapshot directory lookup >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 23 06:20:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Masakazu Asama >Release: FreeBSD 7.0-STABLE (GENERIC) >Organization: Ginzado Co., Ltd. >Environment: FreeBSD xxx 7.0-STABLE FreeBSD 7.0-STABLE #1: Sat Jun 21 17:27:55 JST 2008 root@xxx:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Reboot hangs after ZFS snapshot directory lookup. In zfsctl_snapdir_lookup(zfs_ctldir.c) line at 681, macro ZFS_ENTER called, but ZFS_EXIT missing case exists. When unmounting ZFS snapshot directory, zfs_umount(zfs_vfsops.c) line at 737 going infinit loop, because zfsvfs_t->z_op_cnt never to zero. >How-To-Repeat: [root@srv2 ~]# zpool create tank da0s1d [root@srv2 ~]# zfs create tank/vol01 [root@srv2 ~]# zfs snapshot tank/vol01@snap01 [root@srv2 ~]# df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/da0s1a 5077038 3983846 687030 85% / devfs 1 1 0 100% /dev tank 2047872 128 2047744 0% /tank tank/vol01 2047872 128 2047744 0% /tank/vol01 [root@srv2 ~]# ls /tank/vol01/.zfs/snapshot/snap01 [root@srv2 ~]# df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/da0s1a 5077038 3983846 687030 85% / devfs 1 1 0 100% /dev tank 2047872 128 2047744 0% /tank tank/vol01 2047872 128 2047744 0% /tank/vol01 tank/vol01@snap01 2047872 128 2047744 0% /tank/vol01/.zfs/snapshot/snap01 [root@srv2 ~]# cd / [root@srv2 /]# shutdown -r now hangs... >Fix: Apply the patch. Patch attached with submission follows: --- /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c.orig 2008-04-17 10:23:33.000000000 +0900 +++ /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c 2008-06-24 23:06:00.000000000 +0900 @@ -734,6 +734,7 @@ if (err == 0) vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, curthread); mutex_exit(&sdp->sd_lock); + ZFS_EXIT(zfsvfs); /* * If we had an error, drop our hold on the vnode and >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806230613.m5N6D3nN088430>
