| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
some cases, move to priv_check() if it was an operation on a thread and
no other flags were present.
Eliminate caller-side jail exception checking (also now-unused); jail
privilege exception code now goes solely in kern_jail.c.
We can't yet eliminate suser() due to some cases in the KAME code where
a privilege check is performed and then used in many different deferred
paths. Do, however, move those prototypes to priv.h.
Reviewed by: csjp
Obtained from: TrustedBSD Project
|
|
|
|
| |
Requested by: pjd@
|
|
|
|
|
|
|
| |
implementing some of them using existing ones.
- Allow to compile ZFS on all archs and use atomic operations surrounded
by global mutex on archs we don't have or can't have all atomic
operations needed by ZFS.
|
|
|
|
| |
Submitted by: marcel
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sysctl_handle_int is not sizeof the int type you want to export.
The type must always be an int or an unsigned int.
Remove the instances where a sizeof(variable) is passed to stop
people accidently cut and pasting these examples.
In a few places this was sysctl_handle_int was being used on 64 bit
types, which would truncate the value to be exported. In these
cases use sysctl_handle_quad to export them and change the format
to Q so that sysctl(1) can still print them.
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Pass locking flags to VFS_ROOT().
2. Check v_mountedhere while the vnode is locked.
3. Always return locked vnode on success.
Change 1 fixes problem reported by Stephen M. Rumble - after
zfs_vfsops.c,1.9 change, zfs_root() no longer locks the vnode
unconditionally and traverse() didn't pass right lock type to
VFS_ROOT(). The result was that kernel paniced when .zfs/ directory
was accessed via NFS.
|
|
|
|
|
|
|
|
|
| |
Change the VOP_OPEN(), vn_open() vnode operation and d_fdopen() cdev operation
argument from being file descriptor index into the pointer to struct file.
Proposed and reviewed by: jhb
Reviewed by: daichi (unionfs)
Approved by: re (kensmith)
|
|
|
|
|
|
|
|
| |
based on individual fields beeing set. This doesn't work for setattr replay,
because va_type is set there, so we add AT_TYPE flag to va_mask, which won't
be accepted by zfs_setattr().
Reported by: kris
|
|
|
|
| |
use just in case.
|
|
|
|
|
|
| |
debug is turned off, initialize locks with NOWITNESS flag.
At some point I'll get back to them, we would probably need BLESSING
functionality, which is currently turned off by default.
|
|
|
|
| |
Reported by: ru
|
|
|
|
|
|
|
|
| |
initialization is complete. This fixes some root-on-ZFS
configurations.
Reported by: Bruno Damour <freebsd.ruomad@free.fr>
Tested by: Bruno Damour <freebsd.ruomad@free.fr>
|
| |
|
|
|
|
|
| |
properly, but add XXX comment saying that it can eventually change in
the future.
|
|
|
|
| |
Reported by: des
|
| |
|
|
|
|
|
|
| |
With this change it is possible to unload zfs.ko module from
WITNESS-enabled kernel.
- Remove bogus comment.
|
|
|
|
|
|
|
| |
and show up with different names: first try to open provider using
remembered name and compare its ident, if equal, this is our provider,
if not equal or there is no provider with such name, find provider with
remembered ident and don't care about the name.
|
| |
|
| |
|
|
|
|
|
| |
type. Before this change, if directory was shared-locked, it was relocked
exclusively.
|
|
|
|
| |
shared-locked.
|
|
|
|
|
| |
support shared vnodes locking, we need to remove that flag.
Also add LK_CANRECURSE flag as found in nfsclient.
|
|
|
|
|
| |
Obtained from: OpenSolaris
Bug: http://bugs.opensolaris.org/view_bug.do?bug_id=6465105
|
|
|
|
|
|
|
| |
Pointed out by: ups
Also reported by: kris
- Add comments where I'm not sure if LK_RETRY should be used.
|
|
|
|
|
|
| |
dead vnodes here.
Suggested by: kib
|
| |
|
|
|
|
|
|
|
| |
uiomove() fails, especially that it is different from what OpenSolaris
does (I'm not entirely sure they are right).
Suggested by: darrenr
|
|
|
|
| |
- Add a TODO comment where d_type is still noe defined.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
non-mapped data as possible at once and not page-by-page. Which this change we
combain I/Os, but also saves many VM_OBJECT_UNLOCK()/VM_OBJECT_LOCK()
operations.
Simple 'fsx -l 33554432 -o 524288 -N 10000 /tank/fsx' test shows ~23%
performance increase.
|
|
|
|
|
|
|
|
|
|
| |
- vm_page_undirty() is enough (instead of vm_page_set_validclean()), but it has
to be called before we write the data in case someone makes page dirty after
our write, but before our vm_page_undirty() call.
- Always dmu_write, not matter if uiomove() succeeded, because it could
partially be ok and we would lose some changes.
All good ideas from: ups
|
|
|
|
| |
Full description at: http://bugs.opensolaris.org/view_bug.do?bug_id=6543706
|
| |
|
|
|
|
|
| |
it is only used when dataset is beeing mounted to decide if log should also
be opened.
|
|
|
|
| |
turn off DNLC, but don't remove DNLC yet just in case.
|
|
|
|
|
|
|
|
| |
in all other file system on FreeBSD (instead from inactive() method).
A nice side-effect of this change, except that it speedups file system
when mmaped file are often open/closed, is that it makes FreeBSD's
namecache work:)
|
|
|
|
|
|
|
|
|
| |
This fixes slow operations on mmaped files, because without this fix,
pages were written to disk multiple times.
If one is looking for even greater speed up for such operation, he should
disable ZIL (by setting vfs.zfs.zil_disable to 1 in /boot/loader.conf).
Disabling ZIL makes fsx run ~9 times faster.
|
| |
|
|
|
|
| |
reduce diff against the vendor by removing bzero of this mutex.
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Fix linewrap issues.
o Fix two typos (s/Recomended/Recommended/ and s/tunning/tuning/)
o Remove a couple of extra instances of the word "of".
o Update names of kmem_size variables.
Approved by: pjd
|
|
|
|
| |
Reported by: delphij
|
|
|
|
|
|
| |
- Move FreeBSD-specific code to zfs_freebsd_*() functions in zfs_vnops.c
and keep original functions as similar to vendor's code as possible.
- Add various includes back, now that we have them.
|
|
|
|
|
|
|
|
|
| |
macro, as za_first_integer field also contains type. This should be fixed in
ZFS itself, but this bug is not visible on Solaris, because there, type is
not stored in za_first_integer. On the other hand it will be visible on
MacOS X.
Reported by: Barry Pederson <bp@barryp.org>
|
|
|
|
| |
Reported by: gj
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
@118370 Correct typo.
@118371 Integrate changes from vendor.
@118491 Show backtrace on unexpected code paths.
@118494 Integrate changes from vendor.
@118504 Fix sendfile(2). I had two ways of fixing it:
1. Fixing sendfile(2) itself to use VOP_GETPAGES() instead of
hacking around with vn_rdwr(UIO_NOCOPY), which was suggested
by ups.
2. Modify ZFS behaviour to handle this special case.
Although 1 is more correct, I've choosen 2, because hack from 1
have a side-effect of beeing faster - it reads ahead MAXBSIZE
bytes instead of reading page by page. This is not easy to implement
with VOP_GETPAGES(), at least not for me in this very moment.
Reported by: Andrey V. Elsukov <bu7cher@yandex.ru>
@118525 Reorganize the code to reduce diff.
@118526 This code path is expected. It is simply when file is opened with
O_FSYNC flag.
Reported by: kris
Reported by: Michal Suszko <dry@dry.pl>
|
|
|
|
|
|
|
|
|
|
|
|
| |
on a snapshot directory:
- Remove PRIV_VFS_MOUNT check - regular users can mount snapshots
via lookups on snapshot directory.
- Reset mount credential to kcred, so user won't be able to unmount
the snapshot.
- Reset owner uid.
- Unlock vnode in case of a failure.
Reported by: simokawa
|
|
|
|
|
| |
want to do the check when snapshot is automatically mounted by an
unprivileged user doing lookup on a snapshot directory.
|