OpenZFS on Linux and FreeBSD
Go to file
Brian Behlendorf f3aa3b93df Fix zvol partition creation during module load
Partitions for a zvol device were not appearing in /dev/zvol/<pool>/
at module load time for a couple of reasons.

1) The Linux block layer expects a block device to have a non-zero
   capacity during add_disk().  If the capacity is zero it does not
   attempt to open the device which means we never trigger a partition
   scan.  The device capacity was just being set during the first open.

2) Because we expect to be adding a block device to the zvol_state_list
   during zvol_create_minor() the zvol_state_lock() is held.  This
   can result in a deadlock in add_disk() when it attempts to open
   the block device via zvol_open() which also takes this same lock.
   To avoid this issue special handling has been added to zvol_open()
   and zvol_release() to allow the mutex owner to enter these functions
   without retaking the lock.

3) In __zvol_create_minor() the call to dmu_objset_disown() must occur
   before the call to add_disk().  As mentioned above add_disk() results
   in a call to zvol_open() which will attempt to call dmu_objset_own()
   again on the objset.  If the objset is already open it will fail
   resulting in a failed open.  This in turn means the kernel will be
   unable to read the partition information from the device.
2010-08-04 16:05:25 -07:00
cmd Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-08-02 13:52:57 -07:00
config Add splat module to zfs.sh script 2010-07-28 16:47:30 -07:00
etc Remove promise example config replace with a supermicro config 2010-03-11 14:04:12 -08:00
lib Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-07-23 11:42:23 -07:00
man Add man pages to the build system and packages. 2009-12-11 16:49:25 -08:00
module Fix zvol partition creation during module load 2010-08-04 16:05:25 -07:00
patches Add e2fsprogs patch for detecting ZFS uberblocks until it appears upstream. 2009-11-02 15:04:43 -08:00
scripts Use sparse files for loopback+file configurations 2010-08-02 13:16:41 -07:00
.gitignore Ignore unsigned module build products 2010-03-09 14:14:09 -08:00
.topdeps New TopGit dependency: fix-bpobj_close 2010-08-03 15:56:49 -07:00
.topmsg Set bpo->bpo_object = 0 on close to allow retry 2010-08-03 15:56:29 -07:00
AUTHORS Add AUTHORS to master branch 2010-05-18 14:55:01 -07:00
COPYING Revert accidental change to COPYING, move authors to master branch. 2010-05-18 14:41:47 -07:00
COPYRIGHT Update COPYRIGHT to reference zpios CDDL exceptions. 2010-05-18 14:25:28 -07:00
ChangeLog Prep for 0.4.9 tag update META, README, ChangeLog. 2010-05-21 15:11:49 -07:00
DISCLAIMER Resolve conflict 2010-05-18 10:42:54 -07:00
GIT Refresh type in topgit git://* reference 2009-01-26 21:58:32 -08:00
META Update META to version 0.5.0 2010-06-14 15:45:23 -07:00
Makefile.am Add uninstall Makefile targets 2010-07-28 16:47:26 -07:00
OPENSOLARIS.LICENSE Add CDDL license file 2008-12-01 14:49:34 -08:00
README.markdown Add basic README 2010-06-29 14:35:21 -07:00
ZFS.RELEASE Update core ZFS code from build 121 to build 141. 2010-05-28 13:45:14 -07:00
autogen.sh Core target arch support for conditional compilation of SUBDIRs 2009-06-08 16:07:43 -07:00
configure.ac Generate common.sh with paths from configure 2010-07-28 16:30:45 -07:00
zfs-modules.spec.in Minor spec file cleanup for RHEL6 package dependency. 2010-05-21 15:08:08 -07:00
zfs.spec.in Update zfs.spec.in to reference updated README.markdown file 2010-07-01 10:36:00 -07: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!

Documentation for building, configuring, and using ZFS can be found at: http://wiki.github.com/behlendorf/zfs/