Bug 210430 - Lock order reversal zfs_vfsops.c - when switching to snapshots directory
Summary: Lock order reversal zfs_vfsops.c - when switching to snapshots directory
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-fs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-21 10:56 UTC by Thomas Merkel
Modified: 2016-06-21 15:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Merkel 2016-06-21 10:56:26 UTC
When switching to an ZFS snapshots folder I receive a lock order reversal. For example if /usr/src is a zfs dataset and snapshots exists:

$ cd /usr/src/.zfs/snapshot
$ ls

-->8--
lock order reversal:
 1st 0xfffff80005fcad50 zfs (zfs) @ /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c:1784
 2nd 0xfffff80005fcb068 zfs_gfs (zfs_gfs) @ /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:1621
stack backtrace:
#0 0xffffffff80aa7550 at witness_debugger+0x70
#1 0xffffffff80aa7444 at witness_checkorder+0xe54
#2 0xffffffff80a20902 at __lockmgr_args+0x4c2
#3 0xffffffff80af6efc at vop_stdlock+0x3c
#4 0xffffffff81014f21 at VOP_LOCK1_APV+0xe1
#5 0xffffffff80b17dda at _vn_lock+0x9a
#6 0xffffffff8221f47b at zfs_lookup+0x51b
#7 0xffffffff8221f7f1 at zfs_freebsd_lookup+0x91
#8 0xffffffff810126bb at VOP_CACHEDLOOKUP_APV+0xdb
#9 0xffffffff80af3b36 at vfs_cache_lookup+0xd6
#10 0xffffffff8101255b at VOP_LOOKUP_APV+0xdb
#11 0xffffffff80afc842 at lookup+0x5a2
#12 0xffffffff80afbed2 at namei+0x5b2
#13 0xffffffff80b12668 at kern_statat+0xa8
#14 0xffffffff80b1259d at sys_stat+0x2d
#15 0xffffffff80eb8b2b at amd64_syscall+0x2db
#16 0xffffffff80e981fb at Xfast_syscall+0xfb
--8<--
Comment 1 Andriy Gapon freebsd_committer 2016-06-21 15:03:53 UTC
This is a harmless warning which happens only because vnodes under .zfs are tagged with special "zfs_gfs" tag while logically they belong to the same zfs filesystem as the normal vnodes.
I am not sure if there is any real reason to have that "zfs_gfs" tag, but there is no bug here.