summaryrefslogtreecommitdiffstats
path: root/sys/cddl
Commit message (Collapse)AuthorAgeFilesLines
* Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.pjd2008-11-17198-10828/+73061
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Require write access on a directory being moved from one parenttrasz2008-11-081-0/+8
| | | | | | directory to another in ZFS. Approved by: rwatson (mentor), pjd
* Backoff the last patch. It was overly restrictive - we want to checktrasz2008-11-061-7/+0
| | | | | | | for write permission on target only when moving the target between two directories. Approved by: rwatson (mentor)
* Change ZFS behaviour to match UFS: when moving (rename(2)) a subdirectorytrasz2008-11-061-0/+7
| | | | | | | from one parent directory to another, in addition to the usual access checks one also needs write access to the subdirectory being moved. Approved by: rwatson (mentor), pjd
* Remove definition of KMEM_DEBUG accidentally brought in by latest DTracerodrigc2008-11-051-2/+0
| | | | | | import. Noticed by: thompsa
* Merge latest DTrace changes from Perforce.rodrigc2008-11-059-45/+142
|
* Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessarytrasz2008-10-284-10/+10
| | | | | | | to add more V* constants, and the variables changed by this patch were often being assigned to mode_t variables, which is 16 bit. Approved by: rwatson (mentor)
* Remove the struct thread unuseful argument from bufobj interface.attilio2008-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | In particular following functions KPI results modified: - bufobj_invalbuf() - bufsync() and BO_SYNC() "virtual method" of the buffer objects set. Main consumers of bufobj functions are affected by this change too and, in particular, functions which changed their KPI are: - vinvalbuf() - g_vfs_close() Due to the KPI breakage, __FreeBSD_version will be bumped in a later commit. As a side note, please consider just temporary the 'curthread' argument passing to VOP_SYNC() (in bufsync()) as it will be axed out ASAP Reviewed by: kib Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
* Disable use of the user credentials until there is code to set the levelsjb2008-09-271-1/+5
| | | | | | | | | | | that DTrace uses. This fixes a bug that would have affected kernels built with MAC and all kernels built after the mpsafetty integration. The bug will be apparent in RELENG7 on MAC kernels. Reported by: kan
* Replace all calls to minor() with dev2unit().ed2008-09-271-3/+3
| | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib
* Remove unit2minor() use from kernel code.ed2008-09-261-1/+1
| | | | | | | | | | | | | | | When I changed kern_conf.c three months ago I made device unit numbers equal to (unneeded) device minor numbers. We used to require bitshifting, because there were eight bits in the middle that were reserved for a device major number. Not very long after I turned dev2unit(), minor(), unit2minor() and minor2unit() into macro's. The unit2minor() and minor2unit() macro's were no-ops. We'd better not remove these four macro's from the kernel, because there is a lot of (external) code that may still depend on them. For now it's harmless to remove all invocations of unit2minor() and minor2unit(). Reviewed by: kib
* Mips needs the same treatment for atomic_or_8 as the other RISCyimp2008-09-182-2/+4
| | | | architectures.
* Add missing ZFS_EXIT().pjd2008-09-151-0/+1
| | | | | PR: kern/124899 Submitted by: Masakazu Asama <m-asama@ginzado.ne.jp>
* Remove VSVTX, VSGID and VSUID. This should be a no-op,trasz2008-09-101-2/+2
| | | | | | as VSVTX == S_ISVTX, VSGID == S_ISGID and VSUID == S_ISUID. Approved by: rwatson (mentor)
* Initialize vp, so we don't call VOP_UNLOCK() with NULL vnode pointer.pjd2008-09-071-1/+2
| | | | Confirmed by: marcus
* Lock vnode exclusively around insmntque().pjd2008-09-062-10/+7
|
* Catch up after last insmntque() changes:pjd2008-09-053-0/+11
| | | | | | | | | | - The vnode has to be locked exclusively before calling insmntque(). - Until I find a way to handle insmntque() failures use VV_FORCEINSMQ flag to force insmntque() to always succeed. Reported by: kris, trasz, des, others Suggested by: kib Tested by: trasz
* Decontextualize vfs_busy(), vfs_unbusy() and vfs_mount_alloc() functions.attilio2008-08-311-3/+3
| | | | | | Manpages are updated accordingly. Tested by: Diego Sardina <siarodx at gmail dot com>
* Ensure that the padding calcualtion doesn't return a negative value.scottl2008-08-291-1/+2
| | | | | Submitted by: kib Approved by: jb
* Decontextualize the couplet VOP_GETATTR / VOP_SETATTR as the passed threadattilio2008-08-285-13/+8
| | | | | | was always curthread and totally unuseful. Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
* Add MIPS support.imp2008-08-231-0/+43
| | | | Reviewed by: jb@
* Add calls to callout_drain() to ensure the callouts are flushed beforejb2008-08-191-0/+2
| | | | | | | we free memory from underneath them. This fixes an occasional panic I've been seeing in softclock() where a bad pointer would be encountered when pushing DTrace hard.
* We want to use LBOLT instead of lbolt on FreeBSD.pjd2008-07-211-3/+3
| | | | | | I've this already fixed in p4, but the fix was never integrated into HEAD. Reported by: ed
* We want to check new options given, not the current ones.pjd2008-07-211-1/+1
| | | | This fixes 'zpool import -o <mntopt> <name>' not working properly.
* Remove the $FreeBSD$ tag again, now I know fbsd:nokeywords exists.ed2008-06-121-2/+0
| | | | | Requested by: pjd Approved by: philip (mentor)
* Turn dev2unit(), minor(), unit2minor() and minor2unit() into macro's.ed2008-06-121-7/+3
| | | | | | | | | | | | | Now that we got rid of the minor-to-unit conversion and the constraints on device minor numbers, we can convert the functions that operate on minor and unit numbers to simple macro's. The unit2minor() and minor2unit() macro's are now no-ops. The ZFS code als defined a macro named `minor'. Change the ZFS code to use umajor() and uminor() here, as it is the correct approach to do this. Also add $FreeBSD$ to keep SVN happy. Approved by: philip (mentor), pjd
* Don't enforce unique device minor number policy anymore.ed2008-06-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Except for the case where we use the cloner library (clone_create() and friends), there is no reason to enforce a unique device minor number policy. There are various drivers in the source tree that allocate unr pools and such to provide minor numbers, without using them themselves. Because we still need to support unique device minor numbers for the cloner library, introduce a new flag called D_NEEDMINOR. All cdevsw's that are used in combination with the cloner library should be marked with this flag to make the cloning work. This means drivers can now freely use si_drv0 to store their own flags and state, making it effectively the same as si_drv1 and si_drv2. We still keep the minor() and dev2unit() routines around to make drivers happy. The NTFS code also used the minor number in its hash table. We should not do this anymore. If the si_drv0 field would be changed, it would no longer end up in the same list. Approved by: philip (mentor)
* Merge a recent change from the OpenSolaris source tree.jb2008-06-012-13/+96
| | | | | | | | | | (Don't ask for a vendor import of this yet, we're in the early days of svn) Instead of using cyclic timers to call the state clean and deadman callbacks, use a callout on FreeBSD to avoid the deadlock on FreeBSD due to trying to send interprocessor interrupts with interrupts disabled. Reported by: ps, jhb, peter, thompsa
* Fix namespace collision after src/sys/sys/file.h:1.78.pjd2008-05-253-4/+5
|
* Comment out the code that breaks with invariants. This is stuff that isjb2008-05-251-0/+2
| | | | | still WIP along with the lockstat provider, so there is no harm leaving it out for now.
* Remove redundant redeclaration of 'zone_drain'.bz2008-05-241-1/+0
|
* Make the zfs module depend on the opensolaris module in preparation for itjb2008-05-241-0/+1
| | | | to shared stuff with the DTrace modules.
* Messing with the endian defines breaks the use of other FreeBSD headers.jb2008-05-231-44/+0
|
* Delete a couple of OpenSolaris headers which get in the way of ourjb2008-05-232-318/+0
| | | | implementation.
* OpenSolaris kernel module compatibility sources.jb2008-05-232-0/+165
|
* The cyclic timer device. This is a cut down version of the one injb2008-05-234-0/+1988
| | | | | OpenSolaris. We don't have the lock levels that they do, so this is just hooked into clock interrupts.
* Custom DTrace kernel module files plus FreeBSD-specific DTrace providers.jb2008-05-2330-0/+15340
|
* A 'special' compatibility header to plug OpenSolaris code.jb2008-05-221-0/+35
|
* Additional compatibility headers.jb2008-05-223-0/+403
|
* Compatibility stuff for DTrace.jb2008-05-226-89/+135
|
* FreeBSD changes to vendor source.jb2008-05-229-240/+1290
|
* This commit was generated by cvs2svn to compensate for changes in r179193,jb2008-05-2218-0/+25785
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Vendor import of the src/sys OpenSolaris bits for DTrace.jb2008-05-2218-0/+25785
|
* LO_ENROLLPEND is no more existing so just axe it (it was left out by theattilio2008-05-161-2/+1
| | | | original commit axing it).
* Add FreeBSD IDs to files that originate in FreeBSD.jb2008-04-2214-0/+28
|
* Move the head of byte-level advisory lock list from thekib2008-04-163-41/+0
| | | | | | | | | | | | | | | | | | | | | | filesystem-specific vnode data to the struct vnode. Provide the default implementation for the vop_advlock and vop_advlockasync. Purge the locks on the vnode reclaim by using the lf_purgelocks(). The default implementation is augmented for the nfs and smbfs. In the nfs_advlock, push the Giant inside the nfs_dolock. Before the change, the vop_advlock and vop_advlockasync have taken the unlocked vnode and dereferenced the fs-private inode data, racing with with the vnode reclamation due to forced unmount. Now, the vop_getattr under the shared vnode lock is used to obtain the inode size, and later, in the lf_advlockasync, after locking the vnode interlock, the VI_DOOMED flag is checked to prevent an operation on the doomed vnode. The implementation of the lf_purgelocks() is submitted by dfr. Reported by: kris Tested by: kris, pho Discussed with: jeff, dfr MFC after: 2 weeks
* Add atomic operations for ZFS/sparc64.marius2008-04-111-0/+115
| | | | | | Approved by: core, pjd Obtained from: OpenSolaris (w/ adaptations) MFC after: 2 weeks
* - Fix the path encoded in the multiple inclusion protection.marius2008-04-111-36/+13
| | | | | | | | - GCC uses 32-byte function alignment for UltraSPARC CPUs. - Remove code duplication. Approved by: core, pjd MFC after: 2 weeks
* Add the new kernel-mode NFS Lock Manager. To use it instead of thedfr2008-03-261-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | user-mode lock manager, build a kernel with the NFSLOCKD option and add '-k' to 'rpc_lockd_flags' in rc.conf. Highlights include: * Thread-safe kernel RPC client - many threads can use the same RPC client handle safely with replies being de-multiplexed at the socket upcall (typically driven directly by the NIC interrupt) and handed off to whichever thread matches the reply. For UDP sockets, many RPC clients can share the same socket. This allows the use of a single privileged UDP port number to talk to an arbitrary number of remote hosts. * Single-threaded kernel RPC server. Adding support for multi-threaded server would be relatively straightforward and would follow approximately the Solaris KPI. A single thread should be sufficient for the NLM since it should rarely block in normal operation. * Kernel mode NLM server supporting cancel requests and granted callbacks. I've tested the NLM server reasonably extensively - it passes both my own tests and the NFS Connectathon locking tests running on Solaris, Mac OS X and Ubuntu Linux. * Userland NLM client supported. While the NLM server doesn't have support for the local NFS client's locking needs, it does have to field async replies and granted callbacks from remote NLMs that the local client has contacted. We relay these replies to the userland rpc.lockd over a local domain RPC socket. * Robust deadlock detection for the local lock manager. In particular it will detect deadlocks caused by a lock request that covers more than one blocking request. As required by the NLM protocol, all deadlock detection happens synchronously - a user is guaranteed that if a lock request isn't rejected immediately, the lock will eventually be granted. The old system allowed for a 'deferred deadlock' condition where a blocked lock request could wake up and find that some other deadlock-causing lock owner had beaten them to the lock. * Since both local and remote locks are managed by the same kernel locking code, local and remote processes can safely use file locks for mutual exclusion. Local processes have no fairness advantage compared to remote processes when contending to lock a region that has just been unlocked - the local lock manager enforces a strict first-come first-served model for both local and remote lockers. Sponsored by: Isilon Systems PR: 95247 107555 115524 116679 MFC after: 2 weeks
* In keeping with style(9)'s recommendations on macros, use a ';'rwatson2008-03-162-2/+2
| | | | | | | | | after each SYSINIT() macro invocation. This makes a number of lightweight C parsers much happier with the FreeBSD kernel source, including cflow's prcc and lxr. MFC after: 1 month Discussed with: imp, rink
OpenPOWER on IntegriCloud