Bug 124899 - [zfs] [patch] Reboot hangs after ZFS snapshot directory lookup
Summary: [zfs] [patch] Reboot hangs after ZFS snapshot directory lookup
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.0-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-23 07:20 UTC by Masakazu Asama
Modified: 2009-05-29 00:21 UTC (History)
0 users

See Also:


Attachments
file.diff (424 bytes, patch)
2008-06-23 07:20 UTC, Masakazu Asama
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Masakazu Asama 2008-06-23 07:20:01 UTC
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 infinite loop, because zfsvfs_t->z_op_cnt never to zero.

Fix: Apply the patch.


Patch attached with submission follows:
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...
Comment 1 dfilter service freebsd_committer freebsd_triage 2008-09-15 12:27:52 UTC
pjd         2008-09-15 11:27:25 UTC

  FreeBSD src repository

  Modified files:
    sys/cddl/contrib/opensolaris/uts/common/fs/zfs zfs_ctldir.c 
  Log:
  SVN rev 183037 on 2008-09-15 11:27:25Z by pjd
  
  Add missing ZFS_EXIT().
  
  PR:             kern/124899
  Submitted by:   Masakazu Asama <m-asama@ginzado.ne.jp>
  
  Revision  Changes    Path
  1.11      +1 -0      src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 2 Brooks Davis freebsd_committer freebsd_triage 2008-10-17 15:21:21 UTC
Responsible Changed
From-To: freebsd-bugs->pjd

pjd committed the patch to assign to him for MFC.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2009-05-28 23:23:46 UTC
Responsible Changed
From-To: pjd->freebsd-fs

With pjd's permission, reassing ZFS-related PRs to freebsd-fs.
Comment 4 K. Macy freebsd_committer freebsd_triage 2009-05-29 00:21:14 UTC
State Changed
From-To: patched->closed



Patch available and fixed in v13.
Comment 5 Pawel Jakub Dawidek freebsd_committer freebsd_triage 2014-06-01 06:49:14 UTC
State Changed
From-To: open->patched

Fix committed to HEAD, thanks!