OpenZFS on Linux and FreeBSD
Go to file
Brian Behlendorf d6bd8eaae4 Fix evict() deadlock
Now that KM_SLEEP is not defined as GFP_NOFS there is the possibility
of synchronous reclaim deadlocks.  These deadlocks never existed in the
original OpenSolaris code because all memory reclaim on Solaris is done
asyncronously.  Linux does both synchronous (direct) and asynchronous
(indirect) reclaim.

This commit addresses a deadlock caused by inode eviction.  A KM_SLEEP
allocation may trigger direct memory reclaim and shrink the inode cache.
This can occur while a mutex in the array of ZFS_OBJ_HOLD mutexes is
held.  Through the ->shrink_icache_memory()->evict()->zfs_inactive()->
zfs_zinactive() call path the same mutex may be reacquired resulting
in a deadlock.  To avoid this deadlock the process must not reacquire
the mutex when it is already holding it.

This is a reasonable fix for now but longer term the ZFS_OBJ_HOLD
mutex locking should be reevaluated.  This infrastructure already
prevents us from ever using the Linux lock dependency analysis tools,
and it may limit scalability.
2011-03-22 12:14:55 -07:00
cmd Merge branch 'dracut' 2011-03-22 12:13:04 -07:00
config Add dracut support 2011-03-17 16:52:04 -07:00
dracut Add dracut support 2011-03-17 16:52:04 -07:00
etc Add init scripts 2011-03-17 16:51:54 -07:00
include Fix evict() deadlock 2011-03-22 12:14:55 -07:00
lib Merge branch 'dracut' 2011-03-22 12:13:04 -07:00
man Add init scripts 2011-03-17 16:51:54 -07:00
module Fix evict() deadlock 2011-03-22 12:14:55 -07:00
patches Add build system 2010-08-31 13:41:27 -07:00
scripts Add init scripts 2011-03-17 16:51:54 -07:00
.gitignore Ignore unsigned module build products 2010-03-09 14:14:09 -08:00
AUTHORS Add dracut support 2011-03-17 16:52:04 -07:00
COPYING Relocate COPYING+COPYRIGHT, remove README cruft 2008-12-01 15:34:53 -08:00
COPYRIGHT Update COPYRIGHT to reference zpios CDDL exceptions. 2010-05-18 14:25:28 -07:00
ChangeLog Add build system 2010-08-31 13:41:27 -07:00
DISCLAIMER Update COPYRIGHT and DISCLAIMER. 2010-05-18 10:32:23 -07:00
META Prep zfs-0.6.0-rc2 tag 2011-03-09 15:26:48 -08:00
Makefile.am Add dracut support 2011-03-17 16:52:04 -07:00
Makefile.in Add dracut support 2011-03-17 16:52:04 -07:00
OPENSOLARIS.LICENSE Add CDDL license file 2008-12-01 14:49:34 -08:00
README.markdown Fix markdown rendering 2010-09-15 09:09:37 -07:00
ZFS.RELEASE Update to onnv_147 2010-08-26 14:24:34 -07:00
autogen.sh Minor packaging fixes 2010-09-01 15:42:32 -07:00
configure Add dracut support 2011-03-17 16:52:04 -07:00
configure.ac Add dracut support 2011-03-17 16:52:04 -07:00
zfs-modules.spec.in Use top level object directory in zfs-module.spec 2010-09-10 12:33:31 -07:00
zfs-script-config.sh.in Unconditionally load core kernel modules 2010-11-11 11:38:25 -08:00
zfs.spec.in Add dracut support 2011-03-17 16:52:04 -07:00
zfs_config.h.in Linux 2.6.38 compat, blkdev_get_by_path() 2011-02-23 12:29:38 -08:00

README.markdown

Native ZFS for Linux! ZFS is an advanced file system and volume manager which was originally developed for Solaris. It has been successfully ported to FreeBSD and now there is a functional Linux ZFS kernel port too. The port currently includes a fully functional and stable SPA, DMU, and ZVOL with a ZFS Posix Layer (ZPL) on the way!

$ ./configure
$ make pkg

Full documentation for building, configuring, and using ZFS can be found at: http://zfsonlinux.org