| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not brelse() the buffer unconditionally with BIO_ERROR set if
uiomove() failed. The brelse() treats most buffers with BIO_ERROR as
B_INVAL, dropping their content. Instead, if the write request
covered the whole buffer, remember the cached state and brelse() with
BIO_ERROR set only if the buffer was not cached previously.
Update the buffer dirtyoff/dirtyend based on the progress recorded by
uiomove() in passed struct uio, even in the presence of
error. Otherwise, usermode could see changed data in the backed pages,
but later the buffer is destroyed without write-back.
If uiomove() failed for IO_UNIT request, try to truncate the vnode
back to the pre-write state, and rewind the progress in passed uio
accordingly, following the FFS behaviour.
Reviewed by: rmacklem (some time ago)
Tested by: pho
MFC after: 1 month
Notes:
svn path=/head/; revision=236687
|
|
|
|
|
|
|
| |
MFC after: 3 days
Notes:
svn path=/head/; revision=236313
|
|
|
|
|
|
|
|
|
| |
we index suinfo out of bounds (i.e. -1).
Approved by: gber
Notes:
svn path=/head/; revision=236188
|
|
|
|
|
|
|
|
|
|
| |
- Use tabs, not spaces.
- Add tab after #define.
- Don't mix the use of BSD and ISO C unsigned integer types. Prefer the
ISO C ones.
Notes:
svn path=/head/; revision=236140
|
|
|
|
|
|
|
|
|
| |
changing the structure.
Sponsored by: Google Summer of Code 2011
Notes:
svn path=/head/; revision=235984
|
|
|
|
|
|
|
| |
discussion between kib@ and gibbs@ about it.
Notes:
svn path=/head/; revision=235922
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revamp the CAM enclosure services driver.
This updated driver uses an in-kernel daemon to track state changes and
publishes physical path location information\for disk elements into the
CAM device database.
Sponsored by: Spectra Logic Corporation
Sponsored by: iXsystems, Inc.
Submitted by: gibbs, will, mav
Notes:
svn path=/head/; revision=235911
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to freebsd-fs@, where the setfacl of an NFSv4 acl would fail.
This was caused by the VOP_ACLCHECK() call for ZFS replying
EOPNOTSUPP. After discussion with rwatson@, it was determined
that a call to VOP_ACLCHECK() before doing VOP_SETACL() is not
required. This patch fixes the problem by deleting the
VOP_ACLCHECK() call.
Tested by: Andrew Leonard (previous version)
MFC after: 1 week
Notes:
svn path=/head/; revision=235568
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The NAND Flash environment consists of several distinct components:
- NAND framework (drivers harness for NAND controllers and NAND chips)
- NAND simulator (NANDsim)
- NAND file system (NAND FS)
- Companion tools and utilities
- Documentation (manual pages)
This work is still experimental. Please use with caution.
Obtained from: Semihalf
Supported by: FreeBSD Foundation, Juniper Networks
Notes:
svn path=/head/; revision=235537
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
8.x code:
- If the lock cannot be acquired immediately unlocks 'bar' vnode
and then locks both vnodes in order.
- wrong vnode type panics from cache_enter_time after calls by
ext2_lookup.
The fix merges the fixes from ufs/ufs_lookup.c.
Submitted by: Mateusz Guzik
Approved by: jhb@ (mentor)
Reviewed by: kib@
MFC after: 1 week
Notes:
svn path=/head/; revision=235508
|
|
|
|
|
|
|
|
|
|
|
| |
Entries with zero inode number are considered placeholders by libc and
UFS. Fix remaining uses of VOP_READDIR in kernel: vop_stdvptocnp,
unionfs.
Sponsored by: Google Summer of Code 2011
Notes:
svn path=/head/; revision=235503
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
used, when the code should actually protect the tested
variable with a mutex. Since the tsleep()s had a 10sec
timeout, the race would have only delayed the allocation
of a new clientid for a client. The sleeps will also
rarely occur, since having a callback in progress when
a client acquires a new clientid, is unlikely.
in practice, since having a callback in progress when
a fresh clientid is being acquired by a client is unlikely.
MFC after: 1 month
Notes:
svn path=/head/; revision=235381
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
memory mapped pages being written back on an NFS mount.
Since any thread can call VOP_PUTPAGES() to write back a
dirty page, the credentials of that thread may not have
write access to the file on an NFS server. (Often the uid
is 0, which may be mapped to "nobody" in the NFS server.)
Although there is no completely correct fix for this
(NFS servers check access on every write RPC instead of at
open/mmap time), this patch avoids the common cases by
holding onto a credential that recently opened the file
for writing and uses that credential for the write RPCs
being done by VOP_PUTPAGES() for both NFS clients.
Tested by: Joel Ray Holveck (joelh at juniper.net)
PR: kern/165923
Reviewed by: kib
MFC after: 2 weeks
Notes:
svn path=/head/; revision=235332
|
|
|
|
|
|
|
|
|
|
| |
Reported by: dougb
Submitted by: Mateusz Guzik <mjguzik at gmail com>
Reviewed by: Kirk McKusick
Tested by: pho
Notes:
svn path=/head/; revision=235241
|
|
|
|
|
|
|
|
|
|
| |
buffer directly.
Approved by: rmacklem (mentor)
MFC after: 1 month
Notes:
svn path=/head/; revision=235136
|
|
|
|
|
|
|
|
| |
PR: 132987
Submitted by: Matthew Fleming <mfleming@isilon.com>
Notes:
svn path=/head/; revision=234944
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- fixed an incorrect lock status issue.
- fixed an incorrect lock issue of unionfs root vnode removed.
(pointed out by keith)
- fixed an infinity loop issue.
(pointed out by dumbbell)
- changed to do LK_RELEASE expressly when unlocked.
Submitted by: ozawa@ongs.co.jp
Notes:
svn path=/head/; revision=234867
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
do not include file attributes in the reply to an NFS create RPC
under certain circumstances.
This resulted in a vnode of type VNON that was not usable.
This patch adds an NFS getattr RPC to nfs_create() for this case,
to fix the problem. It was tested by the person that reported
the problem and confirmed to fix this case for their server.
Tested by: Steven Haber (steven.haber at isilon.com)
MFC after: 2 weeks
Notes:
svn path=/head/; revision=234742
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ZFS volume is exported via the new NFS server. The leak occurred
because the new NFS server code didn't handle the case where
a file system sets the SAVENAME flag in its VOP_LOOKUP() and
ZFS does this for the DELETE case.
Tested by: Oliver Brandmueller (ob at gruft.de), hrs
PR: kern/167266
MFC after: 1 month
Notes:
svn path=/head/; revision=234740
|
|
|
|
|
|
|
| |
Reviewed by: kib
Notes:
svn path=/head/; revision=234607
|
|
|
|
|
|
|
| |
Reviewed by: kib
Notes:
svn path=/head/; revision=234605
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a mount point. Active vnodes are those with a non-zero use or hold
count, e.g., those vnodes that are not on the free list. Note that
this list is in addition to the list of all the vnodes associated
with a mount point.
To avoid adding another set of linkage pointers to the vnode
structure, the active list uses the existing linkage pointers
used by the free list (previously named v_freelist, now renamed
v_actfreelist).
This update adds the MNT_VNODE_FOREACH_ACTIVE interface that loops
over just the active vnodes associated with a mount point (typically
less than 1% of the vnodes associated with the mount point).
Reviewed by: kib
Tested by: Peter Holm
MFC after: 2 weeks
Notes:
svn path=/head/; revision=234482
|
|
|
|
|
|
|
|
|
| |
tmpfs doesn't support snapshots.
Suggested by: bde
Notes:
svn path=/head/; revision=234422
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The primary changes are that the user of the interface no longer
needs to manage the mount-mutex locking and that the vnode that
is returned has its mutex locked (thus avoiding the need to check
to see if its is DOOMED or other possible end of life senarios).
To minimize compatibility issues for third-party developers, the
old MNT_VNODE_FOREACH interface will remain available so that this
change can be MFC'ed to 9. Following the MFC to 9, MNT_VNODE_FOREACH
will be removed in head.
The reason for this update is to prepare for the addition of the
MNT_VNODE_FOREACH_ACTIVE interface that will loop over just the
active vnodes associated with a mount point (typically less than
1% of the vnodes associated with the mount point).
Reviewed by: kib
Tested by: Peter Holm
MFC after: 2 weeks
Notes:
svn path=/head/; revision=234386
|
|
|
|
|
|
|
|
|
| |
- Add a check for unsupported file flags.
- Return EPERM when an user without PRIV_VFS_SYSFLAGS privilege attempts
to toggle SF_SETTABLE flags.
Notes:
svn path=/head/; revision=234347
|
|
|
|
|
|
|
|
|
|
|
| |
Since r230208 update mounts were allowed if the list of mount options
contained the "export" option. This is not correct as tmpfs doesn't
really support updating all options.
Reviewed by: kevlo, trociny
Notes:
svn path=/head/; revision=234346
|
|
|
|
|
|
|
| |
Suggested by: Anton Yuzhaninov <citrin@citrin.ru>
Notes:
svn path=/head/; revision=234325
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Return EPERM from ext2_setattr() when an user without PRIV_VFS_SYSFLAGS
privilege attempts to toggle SF_SETTABLE flags.
Flags are now stored to ip->i_flags in one place after all checks.
Also, remove SF_NOUNLINK from the checks because ext2fs doesn't support
that flag.
Reviewed by: bde
Notes:
svn path=/head/; revision=234203
|
|
|
|
|
|
|
| |
Pointed out by: bde
Notes:
svn path=/head/; revision=234139
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use more natural ip->i_flags instead of vap->va_flags in the final
flags check.
- Style improvements.
No functional change intended.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=234104
|
|
|
|
|
|
|
|
|
|
|
|
| |
accesses of the cache member of vm_object objects.
- Use novel vm_page_is_cached() for checks outside of the vm subsystem.
Reviewed by: alc
MFC after: 2 weeks
X-MFC: r234039
Notes:
svn path=/head/; revision=234064
|
|
|
|
|
|
|
| |
Suggested and reviewed by: kib
Notes:
svn path=/head/; revision=234025
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allocator.
Replace UINT32_MAX checks with INT_MAX. Keeping more than 2^31 nodes in
memory is not likely to become possible in foreseeable feature and would
require new unit number allocator.
Discussed with: delphij
MFC after: 2 weeks
Notes:
svn path=/head/; revision=234000
|
|
|
|
|
|
|
|
|
|
| |
Increase maximum tmpfs file system size to 4GB*PAGE_SIZE on 32 bit archs.
Discussed with: delphij
MFC after: 2 weeks
Notes:
svn path=/head/; revision=233999
|
|
|
|
|
|
|
|
|
|
| |
Cleanup availble and used memory functions.
Check if free pages available before allocating new node.
Discussed with: delphij
Notes:
svn path=/head/; revision=233998
|
|
|
|
|
|
|
|
|
|
|
|
| |
behaviour on error from write RPC back to behaviour of old nfs client.
When set to not zero, the pages for which write failed are kept dirty.
PR: kern/165927
Reviewed by: alc
MFC after: 2 weeks
Notes:
svn path=/head/; revision=233101
|
|
|
|
|
|
|
|
|
| |
Unlock vnodes and try to lock them one by one. Relookup fvp and tvp.
Approved by: mdf (mentor)
Notes:
svn path=/head/; revision=232960
|
|
|
|
|
|
|
|
|
|
|
|
| |
Doomed vnode is hardly of any use here, besides all callers handle error
case. vfs_hash_get() does the same.
Don't mess with vnode holdcount, vget() takes care of it already.
Approved by: mdf (mentor)
Notes:
svn path=/head/; revision=232959
|
|
|
|
| |
Notes:
svn path=/head/; revision=232918
|
|
|
|
|
|
|
| |
Submitted by: gianni
Notes:
svn path=/head/; revision=232823
|
|
|
|
|
|
|
|
|
| |
migrated to sys/vnode.h.
Submitted by: gianni
Notes:
svn path=/head/; revision=232821
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using big inodes there is sufficient space in ext3 to
keep extra resolution and birthtime (creation) timestamps.
The appropriate fields in the on-disk inode have been approved
for a long time but support for this in ext3 has not been
widely distributed.
In preparation for ext4 most linux distributions have enabled
by default such bigger inodes and some people use nanosecond
timestamps in ext3. We now support those when the inode is big
enough and while we do recognize the EXT4F_ROCOMPAT_EXTRA_ISIZE,
we maintain the extra timestamps even when they are not used.
An additional note by Bruce Evans:
We blindly accept unrepresentable tv_nsec in VOP_SETATTR(), but
all file systems have always done that. When POSIX gets around
to specifying the behaviour, it will probably require certain
rounding to the fs's resolution and not rejecting the request.
This unfortunately means that syscalls that set times can't
really tell if they succeeded without reading back the times
using stat() or similar and checking that they were set close
enough.
Reviewed by: bde
Approved by: jhb (mentor)
MFC after: 2 weeks
Notes:
svn path=/head/; revision=232703
|
|
|
|
| |
Notes:
svn path=/head/; revision=232701
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fifo_iseof() condition, allowing the v_fifoinfo to be reset and freed
by fifo_cleanup().
Precalculate EOF at the places were fo_wgen is changed, and cache the
state in a new pipe state flag PIPE_SAMEWGEN.
Reported and tested by: bf
Submitted by: gianni
MFC after: 1 week (a backport)
Notes:
svn path=/head/; revision=232641
|
|
|
|
|
|
|
|
| |
Reported and tested by: pho
MFC after: 2 weeks
Notes:
svn path=/head/; revision=232541
|
|
|
|
|
|
|
|
|
|
| |
int, beside the use of MIN macro which performs type promotions.
Submitted by: bde
MFC after: 3 weeks
Notes:
svn path=/head/; revision=232493
|
|
|
|
| |
Notes:
svn path=/head/; revision=232485
|
|
|
|
| |
Notes:
svn path=/head/; revision=232483
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the new NFS server for NFSv4, where it would report ENOENT
when the file actually existed on the server. This turned out
to be caused by not initializing ni_topdir before calling lookup()
and there was a rare case where the value on the stack location
assigned to ni_topdir happened to be a pointer to a ".." entry,
such that "dp == ndp->ni_topdir" succeeded in lookup().
This patch initializes ni_topdir to fix the problem.
MFC after: 5 days
Notes:
svn path=/head/; revision=232467
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
significantly. Upon investigation this was caused by name cache
misses for lookups of "..". For name cache entries for non-".."
directories, the cache entry serves double duty. It maps both the
named directory plus ".." for the parent of the directory. As such,
two ctime values (one for each of the directory and its parent) need
to be saved in the name cache entry.
This patch adds an entry for ctime of the parent directory to the
name cache. It also adds an additional uma zone for large entries
with this time value, in order to minimize memory wastage.
As well, it fixes a couple of cases where the mtime of the parent
directory was being saved instead of ctime for positive name cache
entries. With this patch, Lookup RPC counts return to values similar
to pre-r230394 kernels.
Reported by: bde
Discussed with: kib
Reviewed by: jhb
MFC after: 2 weeks
Notes:
svn path=/head/; revision=232420
|