History log of /dragonfly/sys/vfs/udf/udf_vnops.c (Results 1 – 25 of 50)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.2.1, v6.2.0, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2, v5.8.1
# fc36a10b 03-Mar-2020 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Normalize the vx_*() vnode interface

* The vx_*() vnode interface is used for initial allocations, reclaims,
and terminations.

Normalize all use cases to prevent the mixing together of

kernel - Normalize the vx_*() vnode interface

* The vx_*() vnode interface is used for initial allocations, reclaims,
and terminations.

Normalize all use cases to prevent the mixing together of the vx_*()
API and the vn_*() API. For example, vx_lock() should not be paired
with vn_unlock(), and so forth.

* Integrate an update-counter mechanism into the vx_*() API, assert
reasonability.

* Change vfs_cache.c to use an int update counter instead of a long.
The vfs_cache code can't quite use the spin-lock update counter API
yet.

Use proper atomics for load and store.

* Implement VOP_GETATTR_QUICK, meant to be a 'quick' version of
VOP_GETATTR() that only retrieves information related to permissions
and ownership. This will be fast-pathed in a later commit.

* Implement vx_downgrade() to convert an exclusive vx_lock into an
exclusive vn_lock (for vnodes). Adjust all use cases in the
getnewvnode() path.

* Remove unnecessary locks in tmpfs_getattr() and don't use
any in tmpfs_getattr_quick().

* Remove unnecessary locks in hammer2_vop_getattr() and don't use
any in hammer2_vop_getattr_quick()

show more ...


Revision tags: v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3
# 2ac7d105 01-Dec-2019 Sascha Wildner <saw@online.de>

Rename some functions to better names.

devfs_find_device_by_udev() -> devfs_find_device_by_devid()
dev2udev() -> devid_from_dev()
udev2dev() -> dev_from_devid()

Th

Rename some functions to better names.

devfs_find_device_by_udev() -> devfs_find_device_by_devid()
dev2udev() -> devid_from_dev()
udev2dev() -> dev_from_devid()

This fits with the rest of the code. 'dev' usually means a cdev_t,
such as in make_dev(), etc. Instead of 'udev', use 'devid', since
that's what dev_t is, a "Device ID".

show more ...


# 13dd34d8 18-Oct-2019 zrj <rimvydas.jasinskas@gmail.com>

kernel: Cleanup <sys/uio.h> issues.

The iovec_free() inline very complicates this header inclusion. The
NULL check is not always seen from <sys/_null.h>. Luckily only three
kernel sources needs

kernel: Cleanup <sys/uio.h> issues.

The iovec_free() inline very complicates this header inclusion. The
NULL check is not always seen from <sys/_null.h>. Luckily only three
kernel sources needs it: kern_subr.c, sys_generic.c and uipc_syscalls.c.
Also just a single dev/drm source makes use of 'struct uio'.
* Include <sys/uio.h> explicitly first in drm_fops.c to avoid kfree()
macro override in drm compat layer.
* Use <sys/_uio.h> where only enums and struct uio is needed, but ensure
that userland will not include it for possible later <sys/user.h> use.
* Stop using <sys/vnode.h> as shortcut for uiomove*() prototypes. The
uiomove*() family functions possibly transfer data across kernel/user
space boundary. This header presence explicitly mark sources as such.
* Prefer to add <sys/uio.h> after <sys/systm.h>, but before <sys/proc.h>
and definitely before <sys/malloc.h> (except for 3 mentioned sources).
This will allow to remove <sys/malloc.h> from <sys/uio.h> later on.
* Adjust <sys/user.h> to use component headers instead of <sys/uio.h>.

While there, use opportunity for a minimal whitespace cleanup.

No functional differences observed in compiler intermediates.

show more ...


Revision tags: v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1, v5.2.2, v5.2.1, v5.2.0, v5.3.0, v5.2.0rc, v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1, v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc, v4.6.1, v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0, v4.4.3, v4.4.2, v4.4.1, v4.4.0, v4.5.0, v4.4.0rc, v4.2.4, v4.3.1, v4.2.3, v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc, v4.0.5, v4.0.4, v4.0.3, v4.0.2, v4.0.1, v4.0.0, v4.0.0rc3, v4.0.0rc2, v4.0.0rc, v4.1.0, v3.8.2, v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc, v3.6.2, v3.6.1, v3.6.0
# b458d1ab 14-Nov-2013 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Performance tuning (3)

* The VOP_CLOSE issues revealed a bigger issue with vn_lock(). Many
callers do not check the return code for vn_lock() and in nearly all
of those cases it wouldn

kernel - Performance tuning (3)

* The VOP_CLOSE issues revealed a bigger issue with vn_lock(). Many
callers do not check the return code for vn_lock() and in nearly all
of those cases it wouldn't fail anyway due to a prior ref, but it
creates an API issue.

* Add the LK_FAILRECLAIM flag to vn_lock(). This flag explicitly allows
vn_lock() to fail if the vnode is undergoing reclamation.

This fixes numerous issues, particularly when VOP_CLOSE() is called
during a reclaim due to recent LK_UPGRADE's that we do in some VFS
*_close() functions.

* Remove some unused LK_ defines.

show more ...


Revision tags: v3.7.1, v3.6.0rc, v3.7.0, v3.4.3, v3.4.2, v3.4.0, v3.4.1, v3.4.0rc, v3.5.0
# 1d0de3d3 08-Jan-2013 Sascha Wildner <saw@online.de>

kernel/vfs: Remove some unused variables.


Revision tags: v3.2.2, v3.2.1, v3.2.0, v3.3.0, v3.0.3
# ed20d0e3 21-Apr-2012 Sascha Wildner <saw@online.de>

kernel: Remove newlines from the panic messages that have one.

panic() itself will add a newline.


Revision tags: v3.0.2, v3.0.1, v3.1.0, v3.0.0
# 86d7f5d3 26-Nov-2011 John Marino <draco@marino.st>

Initial import of binutils 2.22 on the new vendor branch

Future versions of binutils will also reside on this branch rather
than continuing to create new binutils branches for each new version.


# 23a64a69 15-Nov-2011 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Normalize use of sys/buf2.h for last commit

* We always include both sys/buf.h and sys/buf2.h


# a3213492 15-Nov-2011 Sascha Wildner <saw@online.de>

kernel: Fix building with 'options UDF'.


Revision tags: v2.12.0, v2.13.0, v2.10.1, v2.11.0, v2.10.0, v2.9.1, v2.8.2, v2.8.1, v2.8.0, v2.9.0, v2.6.3, v2.7.3, v2.6.2, v2.7.2, v2.7.1, v2.6.1, v2.7.0, v2.6.0, v2.5.1, v2.4.1, v2.5.0, v2.4.0
# 7ca841cc 22-Aug-2009 Nicolas Thery <nthery@gmail.com>

udf: refactor vop_access to use vop_helper_access


# d557216f 20-Aug-2009 Matthew Dillon <dillon@apollo.backplane.com>

Fix numerous compiler warnings and format conversion specifiers.


# b9b0a6d0 23-Jul-2009 Matthew Dillon <dillon@apollo.backplane.com>

HAMMER / VFS_VGET - Add optional dvp argument to VFS_VGET(). Fix readdirplus

* VGET is used by NFS to acquire a vnode given an inode number. HAMMER
requires additional information to determine t

HAMMER / VFS_VGET - Add optional dvp argument to VFS_VGET(). Fix readdirplus

* VGET is used by NFS to acquire a vnode given an inode number. HAMMER
requires additional information to determine the PFS the inode is being
acquired from.

Add an optional directory vnode argument to the VGET. If non-NULL, HAMMER
will extract the PFS information from this vnode.

* Adjust NFS to pass the dvp to VGET when doing a readdirplus.

Note that the PFS is already encoded in file handles, but readdirplus
acquires the attributes for each directory entry it scans (readdir does
not). This fixes readdirplus for NFS served HAMMER PFS exports.

show more ...


Revision tags: v2.3.2, v2.3.1
# 3a907475 06-May-2009 Matthew Dillon <dillon@apollo.backplane.com>

Add kernel-layer support for chflags checks, remove (most) from the VFS layer.

Give nlookup() and nlookup_va() the tools to do nearly all chflags related
activities. Here are the rules:

Immutable

Add kernel-layer support for chflags checks, remove (most) from the VFS layer.

Give nlookup() and nlookup_va() the tools to do nearly all chflags related
activities. Here are the rules:

Immutable (uchg, schg)

If set on a directory no files associated with the directory may
be created, deleted, linked, or renamed. In addition, any files open()ed
via the directory will be immutable whether they are flagged that
way or not.

If set on a file or directory the file or directory may not be
written to, chmodded, chowned, chgrped, or renamed. The file can
still be hardlinked and the file/directory can still be chflagged.
If you do not wish the file to be linkable then set the immutable bit
on all directories containing a link of the file. Once you form
this closure no further links will be possible.

NOTE ON REASONING: Security scripts should check link counts anyway,
depending on a file flag which can be changed as a replacement for
checking the link count is stupid. If you are secure then your closures
will hold. If you aren't then nothing will save you.

This feature is not recursive. If the directory contains
subdirectories they must be flagged immutable as well.

Undeletable (uunlnk, sunlnk)

If set on a file or directory that file or directory cannot be removed
or renamed. The file can still otherwise be manipulated, linked, and
so forth. However, it should be noted that any hardlinks you create
will also not be deletable :-)

If set on a directory this flag has no effect on the contents
of the directory (yet). See APPEND-ONLY on directories for what
you want.

Append-only (uappnd/sappnd)

If set on a directory no file within the directory may be deleted or
renamed. However, new files may be created in the directory and
the files in the directory can be modified or hardlinked without
restriction.

If set on a file the file cannot be truncated, random-written, or
deleted. It CAN be chmoded, chowned, renamed, and appended to
with O_APPEND etc.

If you do not wish the file to be renameable then you must also
set the Undeletable flag. Setting the append-only flag will ensure
that the file doesn't disappear from the filesystem, but does not
prevent it from being moved about the filesystem.

Security fix - futimes()

futimes() could be called on any open descriptor. Restrict
it to just those files you own or have write permission on.

Security fix - Hardlinks

Users can no longer hardlink foreign-owned files which they do not
have write access to. The user must now have write permission on
the file being hardlinked or the user must own the file, or be root.

Security fix - fcntl()

fcntl() can no longer be used to turn of O_APPEND mode if the file
was flagged append-only.

NOTE - DIFFERENCES WITH FREEBSD

* Append-only on directories

* Immutable on directories to control set-in-stone & hardlinking

* Immutable files can be hardlinked on DragonFly, not on FreeBSD.

* User must be the owner of the file or have write access to the
file being hardlinked.

show more ...


Revision tags: v2.2.1
# ee89633d 02-Apr-2009 Matt Dillon <dillon@test29.backplane.com>

Fix permissions check for utimes() - owner can call even if u-w.

The owner of a file can call utimes() to modify the file's access and
modified times even if the file is not user-writable. Add a VO

Fix permissions check for utimes() - owner can call even if u-w.

The owner of a file can call utimes() to modify the file's access and
modified times even if the file is not user-writable. Add a VOWN test
for VOP_ACCESS() / naccess() which performs this check.

As far as I know only kern_utimes() needs to use this particular type
of test.

This also fixes issues with cp -p and a few other programs.

Reported-by: Johannes Hofmann <johannes.hofmann@gmx.de>

show more ...


Revision tags: v2.2.0, v2.3.0
# af6e81e0 21-Jan-2009 Sascha Wildner <saw@online.de>

udf: Remove NULL dereference.

Even if the conditional wasn't wrong, it would be pointless, because
udfmp->hashtbl is already initialized by phashinit() in udf_mountfs().

Found-by: LLVM/Clang Static

udf: Remove NULL dereference.

Even if the conditional wasn't wrong, it would be pointless, because
udfmp->hashtbl is already initialized by phashinit() in udf_mountfs().

Found-by: LLVM/Clang Static Analyzer

show more ...


Revision tags: v2.1.1, v2.0.1
# 84009d92 20-Nov-2007 Matthew Dillon <dillon@dragonflybsd.org>

Make necessary changes to readdir/getdirentries to support HAMMER. HAMMER
needs to use 64 bit directory cookies.

Adjust libc's DIR structure and change readdir to acquire the directory
position via

Make necessary changes to readdir/getdirentries to support HAMMER. HAMMER
needs to use 64 bit directory cookies.

Adjust libc's DIR structure and change readdir to acquire the directory
position via lseek() instead of using the basep argument to getdirentries().
The basep argument is a long, which is 32 bits on IA32, and it just isn't
wide enough. The seek position is 64 bits and is wide enough.

Sizeof(DIR) has changed, but hopefully won't cause any major issues since
libc is responsible for allocating it. The APIs remain the same.

Adjust the VOP_READIR() VFS interface routine to return 64 bit cookies.
All VFSs have been reworked, requiring only minor adjustments.

show more ...


# 08daea96 13-Aug-2007 Matthew Dillon <dillon@dragonflybsd.org>

Remove the vpp (returned underlying device vnode) argument from VOP_BMAP().
VOP_BMAP() may now only be used to determine linearity and clusterability of
the blocks underlying a filesystem object. Th

Remove the vpp (returned underlying device vnode) argument from VOP_BMAP().
VOP_BMAP() may now only be used to determine linearity and clusterability of
the blocks underlying a filesystem object. The meaning of the returned
block number (other then being contiguous as a means of indicating
linearity or clusterability) is now up to the VFS.

This removes visibility into the device(s) underlying a filesystem from
the rest of the kernel.

show more ...


# 0e9b9130 09-May-2007 Matthew Dillon <dillon@dragonflybsd.org>

Give the device major / minor numbers their own separate 32 bit fields
in the kernel. Change dev_ops to use a RB tree to index major device
numbers and remove the 256 device major number limitation.

Give the device major / minor numbers their own separate 32 bit fields
in the kernel. Change dev_ops to use a RB tree to index major device
numbers and remove the 256 device major number limitation.

Build a dynamic major number assignment feature into dev_ops_add() and
adjust ASR (which already had a hand-rolled one), and MFS to use the
feature. MFS at least does not require any filesystem visibility to
access its backing device. Major devices numbers >= 256 are used for
dynamic assignment.

Retain filesystem compatibility for device numbers that fall within the
range that can be represented in UFS or struct stat (which is a single
32 bit field supporting 8 bit major numbers and 24 bit minor numbers).

show more ...


# 086c1d7e 23-Dec-2006 Sascha Wildner <swildner@dragonflybsd.org>

Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).


# 880cdd2f 30-Sep-2006 Sascha Wildner <swildner@dragonflybsd.org>

Fix typo.


# b808830c 30-Sep-2006 Simon Schubert <corecode@dragonflybsd.org>

Always zero out vpp, like the nresolve compat code expects

Reported-by: Rumcic


# efda3bd0 05-Sep-2006 Matthew Dillon <dillon@dragonflybsd.org>

Rename malloc->kmalloc, free->kfree, and realloc->krealloc. Pass 1


# 885ecb13 19-Aug-2006 Matthew Dillon <dillon@dragonflybsd.org>

VNode sequencing and locking - part 4/4 - subpart 1 of many.

Move the vnode lock for VOP_READDIR out of the kernel upper layers and
into the filesystem.


# a11aaa81 12-Aug-2006 Matthew Dillon <dillon@dragonflybsd.org>

VNode sequencing and locking - part 3/4.

VNode aliasing is handled by the namecache (aka nullfs), so there is no
longer a need to have VOP_LOCK, VOP_UNLOCK, or VOP_ISSLOCKED as 'VOP'
functions. Bot

VNode sequencing and locking - part 3/4.

VNode aliasing is handled by the namecache (aka nullfs), so there is no
longer a need to have VOP_LOCK, VOP_UNLOCK, or VOP_ISSLOCKED as 'VOP'
functions. Both NFS and DEADFS have been using standard locking functions
for some time and are no longer special cases. Replace all uses with
native calls to vn_lock, vn_unlock, and vn_islocked.

We can't have these as VOP functions anyhow because of the introduction of
the new SYSLINK transport layer, since vnode locks are primarily used to
protect the local vnode structure itself.

show more ...


# 66a1ddf5 18-Jul-2006 Matthew Dillon <dillon@dragonflybsd.org>

Remove several layers in the vnode operations vector init code. Declare
the operations vector directly instead of via a descriptor array. Remove
most of the recalculation code, it stopped being nee

Remove several layers in the vnode operations vector init code. Declare
the operations vector directly instead of via a descriptor array. Remove
most of the recalculation code, it stopped being needed over a year ago.

This work is similar to what FreeBSD now does, but was developed along a
different line. Ultimately our vop_ops will become SYSLINK ops for userland
VFS and clustering support.

show more ...


12