Bug 201735

Summary: zpool export fails after process accesses .zfs/snapshot directory
Product: Base System Reporter: Marcus Reid <marcus>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Many People    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Marcus Reid 2015-07-21 08:30:32 UTC
This is broken:
 
    # zpool import derp
    # cd /derp/archive/archive/.zfs/snapshot
    # ls
    20141204 20141227 20150209 20150708 20150720
    # cd /
    # zpool export derp
    cannot unmount '/derp/archive/archive': Device busy
 
This works:
 
    # zpool import derp
    cd# cd /derp/archive/archive/.zfs/snapshot
    # ls
    20141204 20141227 20150209 20150708 20150720
    # cd /
    # zfs unmount derp/archive/archive
    # zpool export derp
    #
 
However, if you trigger the export bug first, the unmount is broken too.
This might provide a clue as to where the problem is.
 
    # zpool import derp
    # cd /derp/archive/archive/.zfs/snapshot
    # ls
    20141204 20141227 20150209 20150708 20150720
    # cd /
    # zpool export derp
    cannot unmount '/derp/archive/archive': Device busy
    # zfs unmount derp/archive/archive
    cannot unmount '/derp/archive/archive': Device busy