summaryrefslogtreecommitdiffstats
path: root/sys/cddl
Commit message (Collapse)AuthorAgeFilesLines
* Rename the host-related prison fields to be the same as the host.*jamie2009-06-132-3/+3
| | | | | | | parameters they represent, and the variables they replaced, instead of abbreviated versions of them. Approved by: bz (mentor)
* pjd has requested that I keep the tunable as zfs_prefetch_disable to ↵kmacy2009-06-114-10/+10
| | | | | | | | minimize gratuitous differences with Opensolaris' ZFS Sorry for the churn
* check against prefetch_enablekmacy2009-06-113-3/+3
|
* use default policy for enabling prefetching unless the TUNABLE is setkmacy2009-06-102-12/+12
|
* As far as I can tell systems that have less than 4GB are more often hurtkmacy2009-06-102-0/+19
| | | | | | | by prefetched than helped. On i386 systems and systems with less than 4GB, prefetch is now disabled by default. I've added a prefetch enable tunable, to enable prefetching for those systems. The prefetch disable tunable will continue to unconditionally disable prefetching.
* Support shared vnode locks for write operations when the offset isps2009-06-041-0/+1
| | | | | | | provided on filesystems that support it. This really improves mysql + innodb performance on ZFS. Reviewed by: jhb, kmacy, jeffr
* Allow the bootfs property to be set for raidz pools on FreeBSD.dfr2009-05-311-3/+14
| | | | Reviewed by: pjd
* fix xdrmem_control to be safe in an if statementkmacy2009-05-301-0/+1
| | | | | | | fix zfs to depend on krpc remove xdr from zfs makefile Submitted by: dchagin@freebsd.org
* work around snapshot shutdown race reported by Henri Hennebertkmacy2009-05-301-2/+7
|
* Place hostnames and similar information fully under the prison system.jamie2009-05-292-3/+4
| | | | | | | | | | | | | | | | | The system hostname is now stored in prison0, and the global variable "hostname" has been removed, as has the hostname_mtx mutex. Jails may have their own host information, or they may inherit it from the parent/system. The proper way to read the hostname is via getcredhostname(), which will copy either the hostname associated with the passed cred, or the system hostname if you pass NULL. The system hostname can still be accessed directly (and without locking) at prison0.pr_host, but that should be avoided where possible. The "similar information" referred to is domainname, hostid, and hostuuid, which have also become prison parameters and had their associated global variables removed. Approved by: bz (mentor)
* Reverse the logic for ADAPTIVE_SX option and enable it by default.attilio2009-05-292-4/+4
| | | | | | | | | | | | | | | | | | | | | | Introduce for this operation the reverse NO_ADAPTIVE_SX option. The flag SX_ADAPTIVESPIN to be passed to sx_init_flags(9) gets suppressed and the new flag, offering the reversed logic, SX_NOADAPTIVE is added. Additively implements adaptive spininning for sx held in shared mode. The spinning limit can be handled through sysctls in order to be tuned while the code doesn't reach the release, after which time they should be dropped probabilly. This change has made been necessary by recent benchmarks where it does improve concurrency of workloads in presence of high contention (ie. ZFS). KPI breakage is documented by __FreeBSD_version bumping, manpage and UPDATING updates. Requested by: jeff, kmacy Reviewed by: jeff Tested by: pho
* MFdevbranch 192944kmacy2009-05-281-0/+23
| | | | | | - add FreeBSD implementation of xdrmem_control needed by zfs - have zfs define xdr_ops using FreeBSD's definition - remove solaris xdr files from zfs compile
* Add the OpenSolaris dtrace lockstat provider. The lockstat providersson2009-05-262-52/+385
| | | | | | | | | | adds probes for mutexes, reader/writer and shared/exclusive locks to gather contention statistics and other locking information for dtrace scripts, the lockstat(1M) command and other potential consumers. Reviewed by: attilio jhb jb Approved by: gnn (mentor)
* Change license to more bori^Wadul^Wcanonical.trasz2009-05-262-22/+22
| | | | Submitted by: rwatson@
* MFp4 changes neccessary for NFSv4 ACLs support in ZFS. This is mostlytrasz2009-05-269-16/+369
| | | | | | | | | | | about removing a few #ifdefs and providing compatibility wrappers and VOP implementations to get and set an ACL; ZFS does ACL enforcement all by itself. Note that the VOPs are ifdefed out for now, so this change should be a no-op. Reviewed by: pjd
* Don't allow non-owner to set SUID bit on a file. It doesn't maketrasz2009-05-241-0/+8
| | | | | | | any difference now, but in NFSv4 ACLs, there is write_acl permission, which also affects mode changes. Reviewed by: pjd
* Fix comment.trasz2009-05-241-1/+1
|
* Unexpand $FreeBSD$.des2009-05-231-1/+1
|
* Remove svn:keywords on a file that had fbsd:nokeywords (though I don'tdes2009-05-231-1/+1
| | | | understand the reason for the latter)
* - back out direct map hackkmacy2009-05-192-103/+12
| | | | - it is no longer needed
* set createtxg prop namekmacy2009-05-171-1/+1
| | | | PR: bin/130105
* SAVESTART implies SAVENAMEkmacy2009-05-171-2/+2
|
* enable adaptive spinning on zfs lockskmacy2009-05-162-4/+4
|
* - allow forced unmountskmacy2009-05-161-4/+4
| | | | - don't assume snapshot was auto-mounted
* only use direct map if system has more than 2GBkmacy2009-05-161-1/+1
|
* apply band-aid to x86_64 systems with more physical memory than kmem by ↵kmacy2009-05-162-12/+103
| | | | allocating from the direct map
* Add support for booting from raidz1 and raidz2 pools.dfr2009-05-163-3/+742
|
* Remove the thread argument from the FSD (File-System Dependent) parts ofattilio2009-05-114-21/+21
| | | | | | | | | | | | | | | | | the VFS. Now all the VFS_* functions and relating parts don't want the context as long as it always refers to curthread. In some points, in particular when dealing with VOPs and functions living in the same namespace (eg. vflush) which still need to be converted, pass curthread explicitly in order to retain the old behaviour. Such loose ends will be fixed ASAP. While here fix a bug: now, UFS_EXTATTR can be compiled alone without the UFS_EXTATTR_AUTOSTART option. VFS KPI is heavilly changed by this commit so thirdy parts modules needs to be recompiled. Bump __FreeBSD_version in order to signal such situation.
* rename xdr support files to avoid conflicts when linking in to the kernelkmacy2009-05-113-0/+0
|
* - rename atomic.S and crc32.c to avoid collisions when linking zfs in to the ↵kmacy2009-05-096-0/+2
| | | | | | | kernel - update Makefile - ifdef out acl_{alloc, free}, they aren't used by zfs and conflict with existing in-kernel routines
* Introduce a new virtualization container, provisionally named vprocg, to holdzec2009-05-082-1/+4
| | | | | | | | | | | | | | | | | | | | | | virtualized instances of hostname and domainname, as well as a new top-level virtualization struct vimage, which holds pointers to struct vnet and struct vprocg. Struct vprocg is likely to become replaced in the near future with a new jail management API import. As a consequence of this change, change struct ucred to point to a struct vimage, instead of directly pointing to a vnet. Merge vnet / vimage / ucred refcounting infrastructure from p4 / vimage branch. Permit kldload / kldunload operations to be executed only from the default vimage context. This change should have no functional impact on nooptions VIMAGE kernel builds. Reviewed by: bz Approved by: julian (mentor)
* don't call vn_rele_async_fini in the !_KERNEL casekmacy2009-05-071-0/+2
|
* move VN_RELE_ASYNC to the compatibility layer with the rest of the VN_* defineskmacy2009-05-072-5/+1
|
* avoid LOR and gratuitous extra lock acquisitions by moving user_evict list ↵kmacy2009-05-071-6/+16
| | | | | | buffers to a temporary list
* Allow the VM to provide backpressure on the ARC cache as it doeskmacy2009-05-071-0/+9
| | | | on Solaris.
* Asynchronously release vnodes to avoid blocking on range locks when calling ↵kmacy2009-05-075-4/+165
| | | | | | | | | | | | | | | | | | | | back in to zfs. This is based on a fix that went in to opensolaris on March 9th. However, it uses a dedicated thread instead of a Solaris' taskq to avoid doing a blocking memory allocation with the vnode interlock held. This fixes a long-time deadlock in ZFS. This is not, strictly speaking, an LOR. The spa_zio thread releases a vnode, this calls in to vn_reclaim which in turn needs to acquire range locks to sync dirty data out to disk. The range locks are already held by a user-level process waiting on a condition variable that it the process is waiting on a spa_zio thread to signal it on. The process could not be signalled because the spa_zio thread could not proceed. The nature of this problem was not apparent due to ZFS locks opting out of witness which meant that DDB did not know about the locks that were held by ZFS. Reviewed by: pjd MFC after: 7 days
* Introduce the extensible jail framework, using the same "name=value"jamie2009-04-291-1/+1
| | | | | | | | | | | | | | interface as nmount(2). Three new system calls are added: * jail_set, to create jails and change the parameters of existing jails. This replaces jail(2). * jail_get, to read the parameters of existing jails. This replaces the security.jail.list sysctl. * jail_remove to kill off a jail's processes and remove the jail. Most jail parameters may now be changed after creation, and jails may be set to exist without any attached processes. The current jail(2) system call still exists, though it is now a stub to jail_set(2). Approved by: bz (mentor)
* Remove VOP_LEASE and supporting functions. This hasn't been used sincerwatson2009-04-102-3/+0
| | | | | | | | | | | | | | the removal of NQNFS, but was left in in case it was required for NFSv4. Since our new NFSv4 client and server can't use it for their requirements, GC the old mechanism, as well as other unused lease- related code and interfaces. Due to its impact on kernel programming and binary interfaces, this change should not be MFC'd. Proposed by: jeff Reviewed by: jeff Discussed with: rmacklem, zach loafman @ isilon
* Revert r190676,190677thompsa2009-04-101-1/+1
| | | | | | | The geom and CAM changes for root_hold are the wrong solution for USB design quirks. Requested by: scottl
* Add a how argument to root_mount_hold() so it can be passed NOWAIT and be calledthompsa2009-04-031-1/+1
| | | | in situations where sleeping isnt allowed.
* Move dtnfsclient.c in the cddl tree to nfs_kdtrace.c in the nfsclientrwatson2009-03-251-545/+0
| | | | | | | | directory, since it's under a BSD license, and this keeps NFS internals- aware tracing parts close to NFS. MFC after: 1 month Suggested by: jhb
* Add DTrace probes to the NFS access and attribute caches. Access cacherwatson2009-03-241-54/+256
| | | | | | | | | | | | | | | | | | | | | | | | | events are: nfsclient:accesscache:flush:done nfsclient:accesscache:get:hit nfsclient:accesscache:get:miss nfsclient:accesscache:load:done They pass the vnode, uid, and requested or loaded access mode (if any); the load event may also report a load error if the RPC fails. The attribute cache events are: nfsclient:attrcache:flush:done nfsclient:attrcache:get:hit nfsclient:attrcache:get:miss nfsclient:attrcache:load:done They pass the vnode, optionally the vattr if one is present (hit or load), and in the case of a load event, also a possible RPC error. MFC after: 1 month Sponsored by: Google, Inc.
* Add dtnfsclient, a first cut at an NFSv2/v3 client reuest DTracerwatson2009-03-221-0/+343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | provider. The NFS client exposes 'start' and 'done' probes for NFSv2 and NFSv3 RPCs when using the new RPC implementation, passing in the vnode, mbuf chain, credential, and NFSv2 or NFSv3 procedure number. For 'done' probes, the error number is also available. Probes are named in the following way: ... nfsclient:nfs2:write:start nfsclient:nfs2:write:done ... nfsclient:nfs3:access:start nfsclient:nfs3:access:done ... Access to the unmarshalled arguments is not easily available at this point in the stack, but the passed probe arguments are sufficient to to a lot of interesting things in practice. Technically, these probes may cover multiple RPC retransmits, and even transactions if the transaction ID change as a result of authentication failure or a jukebox error from the server, but usefully capture the intent of a single NFS request, such as access, getattr, write, etc. Typical use might involve profiling RPC latency by system call, number of RPCs, how often a getattr leads to a call to access, when failed access control checks occur, etc. More detailed RPC information might best be provided by adding a krpc provider. It would also be useful to add NFS client probes for events such as the access cache or attribute cache satisfying requests without an RPC. Sponsored by: Google, Inc. MFC after: 1 month
* The zfs_get_xattrdir() function is used to find the extended attributejhb2009-03-181-0/+2
| | | | | | | | | | | | directory for a znode. When the directory already exists, it returns a referenced but unlocked vnode. When a directory does not yet exist, it calls zfs_make_xattrdir() to create a new one. zfs_make_xattrdir() returns the vnode both referenced and and locked and zfs_get_xattrdir() was leaking this vnode lock to its callers. Fix this by dropping the vnode lock if zfs_make_xattrdir() successfully creates a new extended attribute directory. Reviewed by: pjd
* Add a new internal mount flag (MNTK_EXTENDED_SHARED) to indicate that ajhb2009-03-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | filesystem supports additional operations using shared vnode locks. Currently this is used to enable shared locks for open() and close() of read-only file descriptors. - When an ISOPEN namei() request is performed with LOCKSHARED, use a shared vnode lock for the leaf vnode only if the mount point has the extended shared flag set. - Set LOCKSHARED in vn_open_cred() for requests that specify O_RDONLY but not O_CREAT. - Use a shared vnode lock around VOP_CLOSE() if the file was opened with O_RDONLY and the mountpoint has the extended shared flag set. - Adjust md(4) to upgrade the vnode lock on the vnode it gets back from vn_open() since it now may only have a shared vnode lock. - Don't enable shared vnode locks on FIFO vnodes in ZFS and UFS since FIFO's require exclusive vnode locks for their open() and close() routines. (My recent MPSAFE patches for UDF and cd9660 already included this change.) - Enable extended shared operations on UFS, cd9660, and UDF. Submitted by: ups Reviewed by: pjd (ZFS bits) MFC after: 1 month
* Extend the "vfsopt" mount options for more general use. Make structjamie2009-03-021-22/+3
| | | | | | | | | | | | | | | | vfsopt and the vfs_buildopts function public, and add some new fields to struct vfsopt (pos and seen), and new functions vfs_getopt_pos and vfs_opterror. Further extend the interface to allow reading options from the kernel in addition to sending them to the kernel, with vfs_setopt and related functions. While this allows the "name=value" option interface to be used for more than just FS mounts (planned use is for jails), it retains the current "vfsopt" name and <sys/mount.h> requirement. Approved by: bz (mentor)
* Add memmove() to the kernel, making the kernel compile with Clang.ed2009-02-281-4/+0
| | | | | | | | | | | | When copying big structures, LLVM generates calls to memmove(), because it may not be able to figure out whether structures overlap. This caused linker errors to occur. memmove() is now implemented using bcopy(). Ideally it would be the other way around, but that can be solved in the future. On ARM we don't do add anything, because it already has memmove(). Discussed on: arch@ Reviewed by: rdivacky
* Use shared vnode locks when invoking VOP_READDIR().jhb2009-02-131-2/+2
| | | | MFC after: 1 month
* Last step of splitting up minor and unit numbers: remove minor().ed2009-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Inside the kernel, the minor() function was responsible for obtaining the device minor number of a character device. Because we made device numbers dynamically allocated and independent of the unit number passed to make_dev() a long time ago, it was actually a misnomer. If you really want to obtain the device number, you should use dev2udev(). We already converted all the drivers to use dev2unit() to obtain the device unit number, which is still used by a lot of drivers. I've noticed not a single driver passes NULL to dev2unit(). Even if they would, its behaviour would make little sense. This is why I've removed the NULL check. Ths commit removes minor(), minor2unit() and unit2minor() from the kernel. Because there was a naming collision with uminor(), we can rename umajor() and uminor() back to major() and minor(). This means that the makedev(3) manual page also applies to kernel space code now. I suspect umajor() and uminor() isn't used that often in external code, but to make it easier for other parties to port their code, I've increased __FreeBSD_version to 800062.
* Put the MIPS support back in after it was removed in r185029.imp2008-12-041-0/+43
|
OpenPOWER on IntegriCloud