summaryrefslogtreecommitdiffstats
path: root/cddl
Commit message (Collapse)AuthorAgeFilesLines
* MFC r208472, r208474:mm2010-05-241-4/+6
| | | | | | | | | | | | | | | | MFC r208472: Fix zfs receive temporarily changing unchanged stream properties. Fix possible panic with zfs_enable_datasets. OpenSolaris onnv revision: 8536:33bd5de3260e [1] MFC r208474: Remove kstat.zfs.arcstats.l2_write_bytes_written The arcstats.l2_write_bytes_written kstat counter introduced in r205231 was duplicite with vendor's arcstats.l2_write_bytes counter imported in r208373 (OpenSolaris revision 8582:df9361868dbe) Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6748561, 6757075) [1]
* MFC r207920,r207934,r207936,r207937,r207970,r208142,r208147,r208148,r208166,pjd2010-05-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r208454,r208455,r208458: r207920: Back out r205134. It is not stable. r207934: Add missing new line characters to the warnings. r207936: Eventhough r203504 eliminates taste traffic provoked by vdev_geom.c, ZFS still like to open all vdevs, close them and open them again, which in turn provokes taste traffic anyway. I don't know of any clean way to fix it, so do it the hard way - if we can't open provider for writing just retry 5 times with 0.5 pauses. This should elimitate accidental races caused by other classes tasting providers created on top of our vdevs. Reported by: James R. Van Artsdalen <james-freebsd-fs2@jrv.org> Reported by: Yuri Pankov <yuri.pankov@gmail.com> r207937: I added vfs_lowvnodes event, but it was only used for a short while and now it is totally unused. Remove it. r207970: When there is no memory or KVA, try to help by reclaiming some vnodes. This helps with 'kmem_map too small' panics. No objections from: kib Tested by: Alexander V. Ribchansky <shurik@zk.informjust.ua> r208142: The whole point of having dedicated worker thread for each leaf VDEV was to avoid calling zio_interrupt() from geom_up thread context. It turns out that when provider is forcibly removed from the system and we kill worker thread there can still be some ZIOs pending. To complete pending ZIOs when there is no worker thread anymore we still have to call zio_interrupt() from geom_up context. To avoid this race just remove use of worker threads altogether. This should be more or less fine, because I also thought that zio_interrupt() does more work, but it only makes small UMA allocation with M_WAITOK. It also saves one context switch per I/O request. PR: kern/145339 Reported by: Alex Bakhtin <Alex.Bakhtin@gmail.com> r208147: Add task structure to zio and use it instead of allocating one. This eliminates the only place where we can sleep when calling zio_interrupt(). As a side-effect this can actually improve performance a little as we allocate one less thing for every I/O. Prodded by: kib r208148: Allow to configure UMA usage for ZIO data via loader and turn it on by default for amd64. On i386 I saw performance degradation when UMA was used, but for amd64 it should help. r208166: Fix userland build by making io_task available only for the kernel and by providing taskq_dispatch_safe() macro. r208454: Remove ZIO_USE_UMA from arc.c as well. r208455: ZIO_USE_UMA is no longer used. r208458: Create UMA zones unconditionally.
* MFC r208047:mm2010-05-205-386/+146
| | | | | | | | | | | | | | | | | | | Import OpenSolaris revision 7837:001de5627df3 It includes the following changes: - parallel reads in traversal code (Bug ID 6333409) - faster traversal for zfs send (Bug ID 6418042) - traversal code cleanup (Bug ID 6725675) - fix for two scrub related bugs (Bug ID 6729696, 6730101) - fix assertion in dbuf_verify (Bug ID 6752226) - fix panic during zfs send with i/o errors (Bug ID 6577985) - replace P2CROSS with P2BOUNDARY (Bug ID 6725680) List of OpenSolaris Bug IDs: 6333409, 6418042, 6757112, 6725668, 6725675, 6725680, 6725698, 6729696, 6730101, 6752226, 6577985, 6755042 Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (multiple Bug IDs)
* MFC r207670, r208130, r208131:mm2010-05-194-4/+26
| | | | | | | | | | | | | | | | | | | | MFC r207670: Introduce hardforce export option (-F) for "zpool export". When exporting with this flag, zpool.cache remains untouched. OpenSolaris onnv revision: 8211:32722be6ad3b MFC r208130: Fix perfomance problem with ZFS prefetch caching [1] Add statistics for ZFS prefetch (sysctl kstat.zfs.misc.zfetchstats) OpenSolaris onnv revision: 10474:0e96dd3b905a (partial) MFC r208131: Fix deadlock between zfs_dirent_lock and zfs_rmdir OpenSolaris onnv revision: 11321:506b7043a14c Reported by: jhell@dataix.net (private e-mail) [1] Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID: 6775357, 6859997, 6868951, 6847615)
* MFC r207626, r207627:mm2010-05-181-1/+1
| | | | | | | | | | | | | | | MFC r207626: Speed up ZFS list operation with objset prefetching. MFC r207627: Enable "zfs list" to list explicitly requested snapshots. OpenSolaris onnv revisions: 8415:8809e849f63e, 10474:0e96dd3b905a (partial) PR: kern/146297 Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6386929, 6758338, 6755389, 6847118)
* MFC r207910:mm2010-05-141-1/+107
| | | | | | | | | | | (cddl/contrib/opensolaris part) Fix possible panic with zfs destroy. OpenSolaris onnv revision: 8779:f164e0e90508 PR: kern/146471 Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6784924)
* MFC r197867:trasz2010-04-181-1/+6
| | | | | | Properly mark ZFS properties which are not changeable under FreeBSD. Reviewed by: pjd
* MFC r197859:trasz2010-04-181-2/+0
| | | | | 'aclmode' and 'aclinherit' properties should work as advertised; don't refuse to set them.
* MFC r205200 + r206199delphij2010-04-152-2/+13
| | | | | | | | | | | | Merge OpenSolaris revision 9396:f41cf682d0d3: 6830813 zfs list -t all fails assertion *Note that this is only a partial merge of this revision addressing only this one issue.* PR: bin/144720 Submitted by: mm
* MFC r205199:delphij2010-04-153-29/+64
| | | | | | | | | | Merge OpenSolaris revision 9365:7838a22eccd6: PSARC/2009/171 zfs list -d and zfs get -d 6762432 zfs list --depth PR: bin/144720 Submitted by: mm
* MFC r205198:delphij2010-04-154-8/+81
| | | | | | | | | Merge OpenSolaris revision 8802:010b31dd4c53: 6773366 "zfs list" memory consumption can be further reduced PR: bin/144720 Submitted by: mm
* Merge r205659:danger2010-04-062-624/+579
| | | | | | | | | - update zfs and zpool manual pages to match the current state of the source PR: 144984 Submitted by: mm@ Approved by: pjd@ Obtained from: OpenSolaris
* MFC r201143:delphij2010-01-111-0/+2
| | | | | | | | | | | Apply OpenSolaris revision 8021:b8fe9660eb2d which brings our zpool to version 14, making it possible for zpools created on OpenSolaris 2009.06 be used on FreeBSD. PR: kern/141800 Submitted by: mm Reviewed by: pjd, trasz Obtained from: OpenSolaris onnv-gate
* MFC r200724:delphij2010-01-031-5/+5
| | | | | | | | | | Apply fix for Solaris bug 6462803 zfs snapshot -r failed because filesystem was busy. PR: kern/141387 Submitted by: mm Approved by: pjd Obtained from: OpenSolaris (onnv 8989:cfce31f4eebf)
* MFC r200516:delphij2010-01-033-5/+11
| | | | | | | | Add an option to specify that the received ZFS should not be automatically mounted (receive -u). Obtained from: OpenSolaris (onnv revision 8584:327a1b6dd944) Approved by: pjd
* MFC r197287, r197289, r197351, r197426, r197458, r197459, r197497, r197498,pjd2009-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r197512, r197513, r197514, r197515, r197525: r197287: Purge namecache for the file system being rolled back, so it doesn't point at invalid vnodes after the rollback resulting in EIO errors when trying to access files which are in the namecache. Reported by: des r197289: Purge file system namecache when receiving incremental stream and rolling back to it. r197351: Purge namecache in the same place OpenSolaris does. r197426: Restore BSD behaviour - when creating new directory entry use parent directory gid to set group ownership and not process gid. This was overlooked during v6 -> v13 switch. PR: kern/139076 Reported by: Sean Winn <sean@gothic.net.au> r197458: Close race in zfs_zget(). We have to increase usecount first and then check for VI_DOOMED flag. Before this change vnode could be reclaimed between checking for the flag and increasing usecount. r197459: Before calling vflush(FORCECLOSE) mark file system as unmounted so the following vnops will fail. This is very important, because without this change vnode could be reclaimed at any point, even if we increased usecount. The only way to ensure that vnode won't be reclaimed was to lock it, which would be very hard to do in ZFS without changing a lot of code. With this change simply increasing usecount is enough to be sure vnode won't be reclaimed from under us. To be precise it can still be reclaimed but we won't be able to see it, because every try to enter ZFS through VFS will result in EIO. The only function that cannot return EIO, because it is needed for vflush() is zfs_root(). Introduce ZFS_ENTER_NOERROR() macro that only locks z_teardown_lock and never returns EIO. r197497: Switch to fletcher4 as the default checksum algorithm. Fletcher2 was proven to be a bit weak and OpenSolaris also switched to fletcher4. r197498: head/cddl/contrib/opensolaris Fletcher4 is not the default checksum algorithm. r197512: - Don't depend on value returned by gfs_*_inactive(), it doesn't work well with forced unmounts when GFS vnodes are referenced. - Make other preparations to GFS for forced unmounts. PR: kern/139062 Reported by: trasz r197513: Use traverse() function to find and return mount point's vnode instead of covered vnode when snapshot is already mounted. r197514: On lookup error VFS expects *vpp to be set to NULL, be sure to do that. r197515: Handle cases where virtual (GFS) vnodes are referenced when doing forced unmount. In that case we cannot depend on the proper order of invalidating vnodes, so we have to free resources when we have a chance. PR: kern/139062 Reported by: trasz r197525: Ensure that tv_sec is between INT32_MIN and INT32_MAX, so ZFS won't object. This completes the fix from r185586. PR: kern/139059 Reported by: Daniel Braniss <danny@cs.huji.ac.il> Submitted by: Jaakko Heinonen <jh@saunalahti.fi> Tested by: Daniel Braniss <danny@cs.huji.ac.il> Approved by: re (kib)
* MFC r196456,r196457,r196458,r196662,r196702,r196703,r196919,r196927,r196928,pjd2009-09-154-81/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r196943,r196944,r196947,r196950,r196953,r196954,r196965,r196978,r196979, r196980,r196982,r196985,r196992,r197131,r197133,r197150,r197151,r197152, r197153,r197167,r197172,r197177,r197200,r197201: r196456: - Give minclsyspri and maxclsyspri real values (consulted with kmacy). - Honour 'pri' argument for thread_create(). r196457: Set priority of vdev_geom threads and zvol threads to PRIBIO. r196458: - Hide ZFS kernel threads under zfskern process. - Use better (shorter) threads names: 'zvol:worker zvol/tank/vol00' -> 'zvol tank/vol00' 'vdev:worker da0' -> 'vdev da0' r196662: Add missing mountpoint vnode locking. This fixes panic on assertion with DEBUG_VFS_LOCKS and vfs.usermount=1 when regular user tries to mount dataset owned by him. r196702: Remove empty directory. r196703: Backport the 'dirtying dbuf' panic fix from newer ZFS version. Reported by: Thomas Backman <serenity@exscape.org> r196919: bzero() on-stack argument, so mutex_init() won't misinterpret that the lock is already initialized if we have some garbage on the stack. PR: kern/135480 Reported by: Emil Mikulic <emikulic@gmail.com> r196927: Changing provider size is not really supported by GEOM, but doing so when provider is closed should be ok. When administrator requests to change ZVOL size do it immediately if ZVOL is closed or do it on last ZVOL close. PR: kern/136942 Requested by: Bernard Buri <bsd@ask-us.at> r196928: Teach zdb(8) how to obtain GEOM provider size. PR: kern/133134 Reported by: Philipp Wuensche <cryx-freebsd@h3q.com> r196943: - Avoid holding mutex around M_WAITOK allocations. - Add locking for mnt_opt field. r196944: Don't recheck ownership on update mount. This will eliminate LOR between vfs_busy() and mount mutex. We check ownership in vfs_domount() anyway. Noticed by: kib Reviewed by: kib r196947: Defer thread start until we set priority. Reviewed by: kib r196950: Fix detection of file system being shared. Now zfs unshare/destroy/rename command will properly remove exported file systems. r196953: When snapshot mount point is busy (for example we are still in it) we will fail to unmount it, but it won't be removed from the tree, so in that case there is no need to reinsert it. Reported by: trasz r196954: If we have to use avl_find(), optimize a bit and use avl_insert() instead of avl_add() (the latter is actually a wrapper around avl_find() + avl_insert()). Fix similar case in the code that is currently commented out. r196965: Fix reference count leak for a case where snapshot's mount point is updated. r196978: Call ZFS_EXIT() after locking the vnode. r196979: On FreeBSD we don't have to look for snapshot's mount point, because fhtovp method is already called with proper mount point. r196980: When we automatically mount snapshot we want to return vnode of the mount point from the lookup and not covered vnode. This is one of the fixes for using .zfs/ over NFS. r196982: We don't export individual snapshots, so mnt_export field in snapshot's mount point is NULL. That's why when we try to access snapshots over NFS use mnt_export field from the parent file system. r196985: Only log successful commands! Without this fix we log even unsuccessful commands executed by unprivileged users. Action is not really taken, but it is logged to pool history, which might be confusing. Reported by: Denis Ahrens <denis@h3q.com> r196992: Implement __assert() for Solaris-specific code. Until now Solaris code was using Solaris prototype for __assert(), but FreeBSD's implementation. Both take different arguments, so we were either core-dumping in assert() or printing garbage. Reported by: avg r197131: Tighten up the check for race in zfs_zget() - ZTOV(zp) can not only contain NULL, but also can point to dead vnode, take that into account. PR: kern/132068 Reported by: Edward Fisk <7ogcg7g02@sneakemail.com>, kris Fix based on patch from: Jaakko Heinonen <jh@saunalahti.fi> r197133: - Protect reclaim with z_teardown_inactive_lock. - Be prepared for dbuf to disappear in zfs_reclaim_complete() and check if z_dbuf field is NULL - this might happen in case of rollback or forced unmount between zfs_freebsd_reclaim() and zfs_reclaim_complete(). - On forced unmount wait for all znodes to be destroyed - destruction can be done asynchronously via zfs_reclaim_complete(). r197150: There is a bug where mze_insert() can trigger an assert() of inserting the same entry twice. This bug is not fixed yet, but leads to situation where when try to access corrupted directory the kernel will panic. Until the bug is properly fixed, try to recover from it and log that it happened. Reported by: marck OpenSolaris bug: 6709336 r197151: Be sure not to overflow struct fid. r197152: Extend scope of the z_teardown_lock lock for consistency and "just in case". r197153: When zfs.ko is compiled with debug, make sure that znode and vnode point at each other. r197167: Work-around READDIRPLUS problem with .zfs/ and .zfs/snapshot/ directories by just returning EOPNOTSUPP. This will allow NFS server to fall back to regular READDIR. Note that converting inode number to snapshot's vnode is expensive operation. Snapshots are stored in AVL tree, but based on their names, not inode numbers, so to convert inode to snapshot vnode we have to interate over all snalshots. This is not a problem in OpenSolaris, because in their READDIRPLUS implementation they use VOP_LOOKUP() on d_name, instead of VFS_VGET() on d_fileno as we do. PR: kern/125149 Reported by: Weldon Godfrey <wgodfrey@ena.com> Analysis by: Jaakko Heinonen <jh@saunalahti.fi> r197172: Add missing \n. Reported by: marck r197177: Support both case: when snapshot is already mounted and when it is not yet mounted. r197200: Modify mount(8) to skip MNT_IGNORE file systems by default, just like df(1) does. This is not POLA violation, because there is no single file system in the base that use MNT_IGNORE currently, although ZFS snapshots will be mounted with MNT_IGNORE after next commit. Reviewed by: kib r197201: - Mount ZFS snapshots with MNT_IGNORE flag, so they are not visible in regular df(1) and mount(8) output. This is a bit smilar to OpenSolaris and follows ZFS route of not listing snapshots by default with 'zfs list' command. - Add UPDATING entry to note that ZFS snapshots are no longer visible in mount(8) and df(1) output by default. Reviewed by: kib Approved by: re (bz)
* MFC r196305:pjd2009-08-171-4/+5
| | | | | | | Fix receive when dataset has no / in its name. Submitted by: James R. Van Artsdalen <james-freebsd-current@jrv.org> Approved by: re (kib)
* MFC r196289:pjd2009-08-171-0/+1
| | | | | | | Remove files that are no longer used. Discussed with: kmacy Approved by: re (kib)
* Bump the version of all non-symbol-versioned shared libraries inkensmith2009-07-193-3/+3
| | | | | | | | preparation for 8.0-RELEASE. Add the previous version of those libraries to ObsoleteFiles.inc and bump __FreeBSD_Version. Reviewed by: kib Approved by: re (rwatson)
* The mutex_owned() macro should operate on kmutex_t and not on mutex_t.pjd2009-07-093-1/+10
| | | | | | | This fixes 'zdb <poolname>' crash. Reported by: avg Approved by: re (kib)
* Fix lockstat breakage to arm/powerpc buildworld.sson2009-05-271-8/+12
| | | | | | Thanks to IBM char's are unsigned on arm/powerpc. Approved by: gnn (mentor)
* Add the OpenSolaris lockstat(1M) command. Requires the dtrace driver,sson2009-05-275-0/+3144
| | | | | | the lockstat provider, and the ksyms(4) pseudo driver kernel modules. Approved by: gnn (mentor)
* atomic.S has been renamed opensolaris_atomic.S to avoid collisionskmacy2009-05-091-1/+1
|
* define VN_RELE_ASYNC for use by libzpoolkmacy2009-05-071-0/+1
|
* Switch over to gnu99 compilation on default for userland.rdivacky2009-03-144-6/+8
| | | | | | | | Tested by: make universe Tested by: ports exp build (done by pav) Reviewed by: ru Reviewed by: silence on arch Approved by: ed (mentor)
* Correct the sense of the "use32" terenary operator so that it usesjhb2009-01-161-5/+1
| | | | | | | | 'lib32' for 32-bit binaries on amd64 and 'lib' for 64-bit binaries. Remove an #ifdef __i386__ that defined use32 to the wrong value on i386 to workaround the bug in the terenary operator. MFC after: 1 month
* Include param.h instead of types.h before mount.h so that the nestedrwatson2008-12-291-0/+1
| | | | | | include of param.h can be removed from audit.h. MFC after: 3 days
* Including mount.h requires including param.h.rwatson2008-12-271-0/+1
| | | | MFC after: 3 weeks
* IFp4: Don't rely on disk IDs and always use vdev guids, which means always lookpjd2008-11-221-5/+1
| | | | | up for components by reading metadata. This might be slower when there are big number of disks in the system, but is definiately more reliable.
* Fix a warning on amd64 caused by using int for request argument instead ofpjd2008-11-182-2/+2
| | | | | | | | unsigned long: WARNING pid 12888 (zfs/zpool): ioctl sign-extension ioctl ffffffffcc285aXX Reported by: kris
* Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.pjd2008-11-1756-4787/+15477
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bring huge amount of changes, I'll enumerate only user-visible changes: - Delegated Administration Allows regular users to perform ZFS operations, like file system creation, snapshot creation, etc. - L2ARC Level 2 cache for ZFS - allows to use additional disks for cache. Huge performance improvements mostly for random read of mostly static content. - slog Allow to use additional disks for ZFS Intent Log to speed up operations like fsync(2). - vfs.zfs.super_owner Allows regular users to perform privileged operations on files stored on ZFS file systems owned by him. Very careful with this one. - chflags(2) Not all the flags are supported. This still needs work. - ZFSBoot Support to boot off of ZFS pool. Not finished, AFAIK. Submitted by: dfr - Snapshot properties - New failure modes Before if write requested failed, system paniced. Now one can select from one of three failure modes: - panic - panic on write error - wait - wait for disk to reappear - continue - serve read requests if possible, block write requests - Refquota, refreservation properties Just quota and reservation properties, but don't count space consumed by children file systems, clones and snapshots. - Sparse volumes ZVOLs that don't reserve space in the pool. - External attributes Compatible with extattr(2). - NFSv4-ACLs Not sure about the status, might not be complete yet. Submitted by: trasz - Creation-time properties - Regression tests for zpool(8) command. Obtained from: OpenSolaris
* Merge latest DTrace changes from Perforce.rodrigc2008-11-059-27/+66
| | | | Approved by: jb
* Mips doesn't have a long double that's different in size from double.imp2008-09-181-1/+1
|
* Add a missing file change from the VOP_GETATTR() argument axing.attilio2008-08-281-1/+1
|
* Don't need to include vmem.h anymore.jb2008-05-231-1/+0
|
* Add the dtrace client app to the build.jb2008-05-222-1/+39
|
* Add the DTrace build tools.jb2008-05-225-1/+155
|
* Oops, these files belonged under src/sys, not src. Sorry.jb2008-05-2218-25785/+0
|
* This commit was generated by cvs2svn to compensate for changes in r179191,jb2008-05-2218-0/+25785
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Vendor import (really!) of the OpenSolaris bits for DTrace.jb2008-05-2218-0/+25785
| |
* | Add the DTrace libraries and D library scripts.jb2008-05-2211-1/+863
| |
* | Add Solaris compatibility definitions for things we don't really want injb2008-05-212-0/+83
| | | | | | | | FreeBSD headers.
* | * Handle the different ioctl design.jb2008-04-263-14/+524
| | | | | | | | * Add a couple of FreeBSD action extensions.
* | Make this file compile cleanly.jb2008-04-261-1/+3
| |
* | Leave out some header files.jb2008-04-262-0/+10
| |
* | * Handle building on FreeBSD for i386 and amd64.jb2008-04-261-27/+194
| | | | | | | | | | * Add stubs for the other FreeBSD arches. * Make the file compile cleanly.
* | * Make this file compile cleanly.jb2008-04-261-10/+27
| | | | | | | | * Add FreeBSD constructor/destructor definitions.
* | * Add FreeBSD action extensions.jb2008-04-261-6/+267
| | | | | | | | | | | | | | * Get the kernel module file name rather than hard-coding it like on Solaris. * Use FreeBSD's process library API. * Handle FreeBSD's different lock types. * Get the list of loaded providers via a syscall.
* | * Handle the different ioctl design.jb2008-04-261-3/+14
| | | | | | | | * Make this file compile cleanly.
OpenPOWER on IntegriCloud