diff options
author | pjd <pjd@FreeBSD.org> | 2008-11-17 20:49:29 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2008-11-17 20:49:29 +0000 |
commit | bbe899b96e388a8b82439f81ed3707e0d9c6070d (patch) | |
tree | 81b89fa4ac6467771d5aa291a97f4665981a6108 /sys/kern/vfs_lookup.c | |
parent | d2f579595c362ce27b4d87e2c40e1c4e09b929e3 (diff) | |
download | FreeBSD-src-bbe899b96e388a8b82439f81ed3707e0d9c6070d.zip FreeBSD-src-bbe899b96e388a8b82439f81ed3707e0d9c6070d.tar.gz |
Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
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
Diffstat (limited to 'sys/kern/vfs_lookup.c')
-rw-r--r-- | sys/kern/vfs_lookup.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index c3e2e80..06682d5 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -189,14 +189,21 @@ namei(struct nameidata *ndp) ndp->ni_rootdir = fdp->fd_rdir; ndp->ni_topdir = fdp->fd_jdir; - if (cnp->cn_pnbuf[0] != '/' && ndp->ni_dirfd != AT_FDCWD) { - error = fgetvp(td, ndp->ni_dirfd, &dp); - FILEDESC_SUNLOCK(fdp); - if (error == 0 && dp->v_type != VDIR) { - vfslocked = VFS_LOCK_GIANT(dp->v_mount); - vrele(dp); - VFS_UNLOCK_GIANT(vfslocked); - error = ENOTDIR; + dp = NULL; + if (cnp->cn_pnbuf[0] != '/') { + if (ndp->ni_startdir != NULL) { + dp = ndp->ni_startdir; + error = 0; + } else if (ndp->ni_dirfd != AT_FDCWD) + error = fgetvp(td, ndp->ni_dirfd, &dp); + if (error != 0 || dp != NULL) { + FILEDESC_SUNLOCK(fdp); + if (error == 0 && dp->v_type != VDIR) { + vfslocked = VFS_LOCK_GIANT(dp->v_mount); + vrele(dp); + VFS_UNLOCK_GIANT(vfslocked); + error = ENOTDIR; + } } if (error) { uma_zfree(namei_zone, cnp->cn_pnbuf); @@ -206,10 +213,16 @@ namei(struct nameidata *ndp) #endif return (error); } - } else { + } + if (dp == NULL) { dp = fdp->fd_cdir; VREF(dp); FILEDESC_SUNLOCK(fdp); + if (ndp->ni_startdir != NULL) { + vfslocked = VFS_LOCK_GIANT(ndp->ni_startdir->v_mount); + vrele(ndp->ni_startdir); + VFS_UNLOCK_GIANT(vfslocked); + } } vfslocked = VFS_LOCK_GIANT(dp->v_mount); for (;;) { |