OpenBSD CVS

CVS log for src/sys/kern/vfs_vnops.c


[BACK] Up to [local] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.122 / (download) - annotate - [select for diffs], Mon Jul 10 22:54:40 2023 UTC (10 months, 3 weeks ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.121: +6 -6 lines
Diff to previous 1.121 (colored)

Allow unveiled programs to dump core (in the default, classic, into . way)
by passing BYPASSUNVEIL just for this vnode.  The coredump() code is quite
careful, so this will be fine.
ok kn kettenis semarie

Revision 1.121 / (download) - annotate - [select for diffs], Sun Aug 14 01:58:28 2022 UTC (21 months, 2 weeks ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.120: +1 -4 lines
Diff to previous 1.120 (colored)

remove unneeded includes in sys/kern
ok mpi@ miod@

Revision 1.120 / (download) - annotate - [select for diffs], Mon Jun 20 01:39:44 2022 UTC (23 months, 2 weeks ago) by visa
Branch: MAIN
Changes since 1.119: +1 -13 lines
Diff to previous 1.119 (colored)

Remove unused struct fileops field fo_poll and callbacks.

OK mpi@

Revision 1.119 / (download) - annotate - [select for diffs], Sat Nov 13 06:04:02 2021 UTC (2 years, 6 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.118: +7 -2 lines
Diff to previous 1.118 (colored)

Let filt_fileattach() run without the kernel lock

This makes it possible to attach pipe, socket and kqueue event filters
without acquiring the kernel lock. Event filters behind vn_kqfilter()
are not MP-safe yet, so vn_kqfilter() has to take KERNEL_LOCK().
dmabuf_kqfilter() can skip locking because it has no side effects.

OK anton@, mpi@

Revision 1.118 / (download) - annotate - [select for diffs], Mon Oct 25 10:24:54 2021 UTC (2 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.117: +1 -3 lines
Diff to previous 1.117 (colored)

Revert commitid: ufM9BcSbXqfLpzBH;
Move vfs_stall_barrier() from the fd layer into vn_lock() and the vfs layer.
In some cases it can result in a deadlock while suspending.
Discussed with mpi@ and deraadt@

Revision 1.117 / (download) - annotate - [select for diffs], Thu Oct 21 09:59:14 2021 UTC (2 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.116: +3 -1 lines
Diff to previous 1.116 (colored)

Move vfs_stall_barrier() from the fd layer into vn_lock() and the vfs layer.
vfs stalling is used by suspend/resume and by vmt(4) to stall any
filesystem operation from altering the state on disk. All these
operations will call vn_lock and be stalled. Adjust vfs_stall_barrier()
to allow the lock owner to still progress so that suspend can sync
the filesystems after stalling vfs operation.
OK mpi@

Revision 1.116 / (download) - annotate - [select for diffs], Thu May 6 12:55:20 2021 UTC (3 years ago) by anton
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.115: +3 -1 lines
Diff to previous 1.115 (colored)

Unlock lseek(2).

In August 2019 I tried to unlock lseek which failed since the vnode lock
could not be acquired without holding the kernel lock back then.
claudio@ recently made it possible to acquire a vnode lock without
holding the kernel lock. The kernel lock is still required around
VOP_GETATTR() as the underlying file system implementations are not
MP-safe.

ok claudio@

Revision 1.115 / (download) - annotate - [select for diffs], Wed Apr 28 09:53:53 2021 UTC (3 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.114: +17 -7 lines
Diff to previous 1.114 (colored)

Introduce a global vnode_mtx and use it to make vn_lock() safe to be called
without the KERNEL_LOCK.
This moves VXLOCK and VXWANT to a mutex protected v_lflag field and also
v_lockcount is protected by this mutex.

The vn_lock() dance is overly complex and all of this should probably replaced
by a proper lock on the vnode but such a diff is a lot more complex. This
is an intermediate step so that at least some calls can be modified to grab
the KERNEL_LOCK later or not at all.

OK mpi@

Revision 1.114 / (download) - annotate - [select for diffs], Wed Apr 8 08:07:51 2020 UTC (4 years, 1 month ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.113: +2 -2 lines
Diff to previous 1.113 (colored)

Make fifo_kqfilter() honor FREAD|FWRITE just like fifo_poll() does.

Prevent generating events that do not correspond to how the fifo has been
opened.

ok visa@, millert@

Revision 1.113 / (download) - annotate - [select for diffs], Sat Feb 22 11:58:29 2020 UTC (4 years, 3 months ago) by anton
Branch: MAIN
Changes since 1.112: +3 -1 lines
Diff to previous 1.112 (colored)

In preparation for unlocking ioctl(2), grab the kernel lock as needed.

ok kettenis@ mpi@ visa@

Revision 1.112 / (download) - annotate - [select for diffs], Sun Feb 16 19:34:59 2020 UTC (4 years, 3 months ago) by anton
Branch: MAIN
Changes since 1.111: +13 -11 lines
Diff to previous 1.111 (colored)

Rework vn_ioctl() to only have a single point of return. This will make
it easier to grab the kernel lock once ioctl() is unlocked.

Thanks to semarie@ who came up with an improved diff.

ok mpi@ semarie@ visa@

Revision 1.111 / (download) - annotate - [select for diffs], Sun Jan 5 13:46:02 2020 UTC (4 years, 4 months ago) by visa
Branch: MAIN
Changes since 1.110: +2 -2 lines
Diff to previous 1.110 (colored)

Constify instances of struct fileops.

OK anton@, mpi@, bluhm@

Revision 1.110 / (download) - annotate - [select for diffs], Sun Dec 8 12:29:42 2019 UTC (4 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.109: +2 -2 lines
Diff to previous 1.109 (colored)

Convert infinite sleeps to tsleep_nsec(9).

ok visa@, jca@

Revision 1.109 / (download) - annotate - [select for diffs], Sun Nov 10 05:00:36 2019 UTC (4 years, 6 months ago) by beck
Branch: MAIN
Changes since 1.108: +3 -6 lines
Diff to previous 1.108 (colored)

Change the EINVAL return code to a KASSERT if the namei structure is
initialized incorrectly for vn_open

ok visa@ anton@

Revision 1.108 / (download) - annotate - [select for diffs], Sun Oct 6 16:24:14 2019 UTC (4 years, 7 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.107: +17 -5 lines
Diff to previous 1.107 (colored)

Fix vn_open to require an op of 0, and 0 or KERNELPATH only as flags.

sweep tree to correct NDIINT op and flags ahead of time. document
the requirement. This allows KERNELPATH to be used to bypass
unveil for crash dumps with nosuidcoredump=2 or 3

ok visa@ deraadt@ florian@

Revision 1.107 / (download) - annotate - [select for diffs], Mon Aug 26 18:56:29 2019 UTC (4 years, 9 months ago) by anton
Branch: MAIN
Changes since 1.106: +17 -3 lines
Diff to previous 1.106 (colored)

When a thread tries to exclusively lock a vnode, the same thread must
ensure that any other thread currently trying to acquire the underlying
vnode lock has observed that the same vnode is about to be exclusively
locked. Such threads must then sleep until the exclusive lock has been
released and then try to acquire the lock again. Otherwise, exclusive
access to the vnode cannot be guaranteed.

Thanks to naddy@ and visa@ for testing; ok visa@

Reported-by: syzbot+374d0e7e2400004957f7@syzkaller.appspotmail.com

Revision 1.106 / (download) - annotate - [select for diffs], Tue Aug 13 07:09:21 2019 UTC (4 years, 9 months ago) by anton
Branch: MAIN
Changes since 1.105: +1 -3 lines
Diff to previous 1.105 (colored)

Revert unlock of lseek(2) since vn_lock() could end up calling tsleep()
which is not allowed without holding the kernel lock. Otherwise, wakeups
could be lost.

Reported-by: syzbot+57588681ca9e3e9ba926@syzkaller.appspotmail.com

Revision 1.105 / (download) - annotate - [select for diffs], Mon Aug 12 08:17:05 2019 UTC (4 years, 9 months ago) by anton
Branch: MAIN
Changes since 1.104: +3 -1 lines
Diff to previous 1.104 (colored)

Unlock lseek(2) since the file offset is MP-safe by now. Calling
VOP_GETATTR() must still be serialized using the kernel lock since the
underlying file system implementation is not MP-safe.

no objection from deraadt@ and ok mpi@ visa@

Revision 1.104 / (download) - annotate - [select for diffs], Mon Aug 5 08:35:59 2019 UTC (4 years, 9 months ago) by anton
Branch: MAIN
Changes since 1.103: +12 -4 lines
Diff to previous 1.103 (colored)

Allow concurrent reads of the f_offset field of struct file by
serializing both read/write operations using the existing file mutex.
The vnode lock still grants exclusive write access to the offset; the
mutex is only used to make the actual write atomic and prevent any
concurrent reader from observing intermediate values.

ok mpi@ visa@

Revision 1.103 / (download) - annotate - [select for diffs], Tue Jul 23 19:07:31 2019 UTC (4 years, 10 months ago) by anton
Branch: MAIN
Changes since 1.102: +5 -10 lines
Diff to previous 1.102 (colored)

Grab the vnode lock earlier in vn_read() since it could end up sleeping,
allowing the file offset to change. This is part of the ongoing effort
to protect the file offset using the vnode lock.

ok mpi@ visa@

Revision 1.102 / (download) - annotate - [select for diffs], Sun Jul 21 08:30:34 2019 UTC (4 years, 10 months ago) by anton
Branch: MAIN
Changes since 1.101: +16 -8 lines
Diff to previous 1.101 (colored)

Grab the vnode lock in vn_seek(). Consensus has emerged around using the
existing vnode lock to protect writes to the f_offset field of struct
file. As opposed of introducing a new lock which turned out to be harder
than anticipated.

ok mpi@ visa@

Revision 1.101 / (download) - annotate - [select for diffs], Fri Jul 12 13:56:27 2019 UTC (4 years, 10 months ago) by solene
Branch: MAIN
Changes since 1.100: +23 -29 lines
Diff to previous 1.100 (colored)

Revert anton@ changes about read/write unlocking
https://marc.info/?l=openbsd-cvs&m=156277704122293&w=2

ok anton@

Revision 1.100 / (download) - annotate - [select for diffs], Wed Jul 10 16:43:19 2019 UTC (4 years, 10 months ago) by anton
Branch: MAIN
Changes since 1.99: +30 -24 lines
Diff to previous 1.99 (colored)

Make read/write of the f_offset field belonging to struct file MP-safe;
as part of the effort to unlock the kernel. Instead of relying on the
vnode lock, introduce a dedicated lock per file. Exclusive write access
is granted using the new foffset_enter and foffset_leave API. A
convenience function foffset_get is also available for threads that only
need to read the current offset.

The lock acquisition order in vn_write has been changed to match the one
in vn_read in order to avoid a potential deadlock. This change also gets
rid of a documented race in vn_read().

Inspired by the FreeBSD implementation.

With help and ok mpi@ visa@

Revision 1.99 / (download) - annotate - [select for diffs], Sat Jun 22 06:48:25 2019 UTC (4 years, 11 months ago) by semarie
Branch: MAIN
Changes since 1.98: +17 -5 lines
Diff to previous 1.98 (colored)

push the KERNEL_LOCK deeper on read(2) and write(2)

unlocks read(2) and write(2) syscalls families, and push the KERNEL_LOCK
deeper in the code path. KERNEL_LOCK is managed per file type in fileops
handlers (fo_read, fo_write, and fo_close). read(2) and write(2) on
socket are KERNEL_LOCK-free.

initial work from mpi@ and ians@

ok mpi@ kettenis@ visa@ ians@

Revision 1.98 / (download) - annotate - [select for diffs], Fri Jun 21 09:39:48 2019 UTC (4 years, 11 months ago) by visa
Branch: MAIN
Changes since 1.97: +2 -2 lines
Diff to previous 1.97 (colored)

Make resource limit access MP-safe. So far, the copy-on-write sharing
of resource limit structs has been done between processes. By applying
copy-on-write also between threads, threads can read rlimits in
a nearly lock-free manner.

Inspired by code in DragonFly BSD and FreeBSD.

OK mpi@, agreement from jmatthew@ and anton@

Revision 1.97 / (download) - annotate - [select for diffs], Mon Aug 20 16:00:22 2018 UTC (5 years, 9 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.96: +32 -15 lines
Diff to previous 1.96 (colored)

Reorder checks in the read/write(2) family of syscalls to prepare making
file operations mp-safe.

This change makes it clear that `f_offset' is only accessed in vn_read()
and vn_write(), which will help taking it out of the KERNEL_LOCK().

This refactoring uncovered a race in vn_read() which is now documented
and will be addressed in a later diff.

ok visa@

Revision 1.96 / (download) - annotate - [select for diffs], Wed Aug 15 13:19:06 2018 UTC (5 years, 9 months ago) by visa
Branch: MAIN
Changes since 1.95: +6 -3 lines
Diff to previous 1.95 (colored)

Grab the KERNEL_LOCK() in MP-unsafe fo_close routines. This prevents
a scenario where MP-unsafe code gets run without the kernel lock
as a consequence of an unlocked system call.

OK mpi@, kettenis@

Revision 1.95 / (download) - annotate - [select for diffs], Tue Jul 3 20:40:25 2018 UTC (5 years, 11 months ago) by kettenis
Branch: MAIN
Changes since 1.94: +44 -2 lines
Diff to previous 1.94 (colored)

Add a new so_seek member to "struct file" such that we can have seekable
files that aren't vnodes.  Move the vnode-specific code into its own
function.  Add an implementation for the "DMA buffers" that can be used
by DRI3/prime code to find out the size of the graphics buffer.
This implementation is very limited and only supports offset 0 and only
for SEEK_SET and SEEK_END.  This doesn't really make sense; implementing
stat(2) would be a more obvious choice.  But this is what Linux does.

ok guenther@, visa@

Revision 1.94 / (download) - annotate - [select for diffs], Tue Jul 3 12:58:18 2018 UTC (5 years, 11 months ago) by anton
Branch: MAIN
Changes since 1.93: +2 -2 lines
Diff to previous 1.93 (colored)

Avoid NULL pointer deref in vn_writechk() when calling ftruncate() on a file
descriptor belonging to a cloned device.

ok kettenis@

Revision 1.93 / (download) - annotate - [select for diffs], Thu Jun 7 13:37:27 2018 UTC (5 years, 11 months ago) by visa
Branch: MAIN
Changes since 1.92: +2 -1 lines
Diff to previous 1.92 (colored)

Make callers of VOP_CREATE(9) and VOP_MKNOD(9) responsible for
unlocking the directory vnode.

OK mpi@, helg@

Revision 1.92 / (download) - annotate - [select for diffs], Wed May 2 02:24:56 2018 UTC (6 years, 1 month ago) by visa
Branch: MAIN
Changes since 1.91: +6 -8 lines
Diff to previous 1.91 (colored)

Remove proc from the parameters of vn_lock(). The parameter is
unnecessary because curproc always does the locking.

OK mpi@

Revision 1.91 / (download) - annotate - [select for diffs], Sat Apr 28 03:13:05 2018 UTC (6 years, 1 month ago) by visa
Branch: MAIN
Changes since 1.90: +6 -6 lines
Diff to previous 1.90 (colored)

Clean up the parameters of VOP_LOCK() and VOP_UNLOCK(). It is always
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.

OK mpi@, deraadt@

Revision 1.90 / (download) - annotate - [select for diffs], Tue Apr 10 09:17:45 2018 UTC (6 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.89: +10 -4 lines
Diff to previous 1.89 (colored)

Convert 'struct fileops' definitions to C99.

ok millert@, deraadt@, florian@

Revision 1.89 / (download) - annotate - [select for diffs], Tue Jan 2 06:38:45 2018 UTC (6 years, 5 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.88: +2 -1 lines
Diff to previous 1.88 (colored)

Stop assuming <sys/file.h> will pull in fcntl.h when _KERNEL is defined.

ok millert@ sthen@

Revision 1.88 / (download) - annotate - [select for diffs], Sun Aug 13 22:08:44 2017 UTC (6 years, 9 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored)

Nuke trailing whitespace

Revision 1.87 / (download) - annotate - [select for diffs], Fri Sep 30 10:55:22 2016 UTC (7 years, 8 months ago) by jca
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.86: +2 -2 lines
Diff to previous 1.86 (colored)

Drop a now unneeded variable initialization; spotted by bluhm@

Revision 1.86 / (download) - annotate - [select for diffs], Fri Sep 30 10:53:11 2016 UTC (7 years, 8 months ago) by jca
Branch: MAIN
Changes since 1.85: +6 -4 lines
Diff to previous 1.85 (colored)

Make read(2) return EISDIR on directories.

Years ago Theo made read(2) return 0 on directories, instead of dumping
the directory content.  Another behavior is allowed as an extension by
POSIX, returning an EISDIR error, as used on a few other systems.  This
behavior is deemed more useful as it helps spotting errors.  This
implies that it might break some setups.

Ports bulk builds by ajacoutot@ and naddy@, ok millert@ bluhm@ naddy@
deraadt@

Revision 1.85 / (download) - annotate - [select for diffs], Sun Jun 19 11:54:33 2016 UTC (7 years, 11 months ago) by natano
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.84: +1 -4 lines
Diff to previous 1.84 (colored)

Remove the lockmgr() API. It is only used by filesystems, where it is a
trivial change to use rrw locks instead. All it needs is LK_* defines
for the RW_* flags.

tested by naddy and sthen on package building infrastructure
input and ok jmc mpi tedu

Revision 1.84 / (download) - annotate - [select for diffs], Sat Mar 19 12:04:15 2016 UTC (8 years, 2 months ago) by natano
Branch: MAIN
Changes since 1.83: +5 -5 lines
Diff to previous 1.83 (colored)

Remove the unused flags argument from VOP_UNLOCK().

torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt

Revision 1.83 / (download) - annotate - [select for diffs], Wed Jan 6 17:59:30 2016 UTC (8 years, 4 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.82: +7 -7 lines
Diff to previous 1.82 (colored)

remove unnecessary casts where the incoming type is void *.

Revision 1.82 / (download) - annotate - [select for diffs], Fri May 1 01:30:58 2015 UTC (9 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored)

Pass fflag to VOP_POLL so vfs fifo functions can get at the file
flags to check FREAD/FWRITE if needed.  This will be used by fifo_poll
to avoid checking the write end of the fifo when the fd is read-only.
OK guenther@

Revision 1.81 / (download) - annotate - [select for diffs], Sat Mar 14 03:38:51 2015 UTC (9 years, 2 months ago) by jsg
Branch: MAIN
Changes since 1.80: +1 -2 lines
Diff to previous 1.80 (colored)

Remove some includes include-what-you-use claims don't
have any direct symbols used.  Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@

Revision 1.80 / (download) - annotate - [select for diffs], Tue Dec 16 18:30:04 2014 UTC (9 years, 5 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.79: +2 -1 lines
Diff to previous 1.79 (colored)

primary change: move uvm_vnode out of vnode, keeping only a pointer.
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and help from deraadt

Revision 1.79 / (download) - annotate - [select for diffs], Mon Nov 3 21:28:35 2014 UTC (9 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.78: +2 -1 lines
Diff to previous 1.78 (colored)

include sys/unistd.h where needed instead of indirect reliance. ok jsg

Revision 1.78 / (download) - annotate - [select for diffs], Sun Jul 13 15:00:40 2014 UTC (9 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.77: +2 -2 lines
Diff to previous 1.77 (colored)

pass the size to free in some of the obvious cases

Revision 1.77 / (download) - annotate - [select for diffs], Sat Jul 12 18:43:32 2014 UTC (9 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.

Revision 1.76 / (download) - annotate - [select for diffs], Tue Jul 8 17:19:25 2014 UTC (9 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.75: +1 -3 lines
Diff to previous 1.75 (colored)

decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.h
don't need to be married.
ok guenther miod beck jsing kettenis

Revision 1.75 / (download) - annotate - [select for diffs], Fri Jan 24 06:00:01 2014 UTC (10 years, 4 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.74: +8 -4 lines
Diff to previous 1.74 (colored)

Copy timespecs member by member in fo_stat callback functions, to avoid
leaking values in the padding bytes on LP64.  Also, vn_stat() was lacking
the zero-fill to clean its padding.

ok kettenis@ deraadt@ phessler@

Revision 1.74 / (download) - annotate - [select for diffs], Sat Sep 14 02:28:01 2013 UTC (10 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored)

Correct the handling of I/O of >=2^32 bytes and the ktracing there of
by using size_t/ssize_t instead of int/u_int to handle I/O lengths in
uiomove(), vn_fsizechk(), and ktrgenio().  Eliminate the always-zero
'error' argument to ktrgenio() at the same time.

Revision 1.73 / (download) - annotate - [select for diffs], Wed Jun 5 01:26:00 2013 UTC (11 years ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.72: +2 -2 lines
Diff to previous 1.72 (colored)

Move FHASLOCK from f_flag to f_iflags, freeing up a bit for passing
O_* flags and eliminating an XXX comment.

ok matthew@ deraadt@

Revision 1.72 / (download) - annotate - [select for diffs], Sat Mar 30 06:32:25 2013 UTC (11 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.71: +4 -3 lines
Diff to previous 1.71 (colored)

vrele() is a tricky beast. it can sleep if the refcount hits zero,
leaving us with a free type function that isn't atomic. deal with this
by erasing any reachable pointers to the vnode first, then free it.
ok deraadt guenther

Revision 1.71 / (download) - annotate - [select for diffs], Wed Jul 11 12:39:20 2012 UTC (11 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.70: +36 -1 lines
Diff to previous 1.70 (colored)

If the current offset is strictly less than the process filesize
rlimit, then a write that would take it over the limit should be
clamped, making it a partial write.

ok beck@

Revision 1.70 / (download) - annotate - [select for diffs], Sun Nov 27 21:31:08 2011 UTC (12 years, 6 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)

When checking for offset wrap around in vn_read(), compare against
LLONG_MAX instead of SSIZE_MAX

ok deraadt@

Revision 1.69 / (download) - annotate - [select for diffs], Mon Nov 7 17:50:17 2011 UTC (12 years, 6 months ago) by guenther
Branch: MAIN
Changes since 1.68: +9 -4 lines
Diff to previous 1.68 (colored)

Make pwrite/pwritev ignore the O_APPEND flag.
Detect attempts to wrap the file offset by reading past the max (except
for character devices).

ok matthew@, deraadt@

Revision 1.68 / (download) - annotate - [select for diffs], Sat Jul 9 01:28:48 2011 UTC (12 years, 10 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.67: +5 -1 lines
Diff to previous 1.67 (colored)

Add support for the O_CLOEXEC and O_DIRECTORY flags introduced in
POSIX Issue 7.

Requested by oga@ (and maybe djm@); ok guenther@

Revision 1.67 / (download) - annotate - [select for diffs], Wed Jul 6 09:14:26 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.66: +7 -5 lines
Diff to previous 1.66 (colored)

Minor turd polishing: hold the vnode lock in vn_rdwr() only while
necessary.

"ok ... wait wait WAIT!! ... oh, yeah, it's fine, ok" guenther@

Revision 1.66 / (download) - annotate - [select for diffs], Mon Jul 4 20:35:35 2011 UTC (12 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)

move the specfs code to a place people can see it; ok guenther thib krw

Revision 1.65 / (download) - annotate - [select for diffs], Mon Jul 26 01:56:27 2010 UTC (13 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.64: +5 -4 lines
Diff to previous 1.64 (colored)

Correct the links between threads, processes, pgrps, and sessions,
so that the process-level stuff is to/from struct process and not
struct proc.  This fixes a bunch of problem cases in rthreads.
Based on earlier work by blambert and myself, but mostly written
at c2k10.

Tested by many: deraadt, sthen, krw, ray, and in snapshots

Revision 1.64 / (download) - annotate - [select for diffs], Fri Jan 8 19:18:21 2010 UTC (14 years, 4 months ago) by stsp
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored)

As advertised in the man page, make open(2) return ELOOP (instead
of EMLINK) if the O_NOFOLLOW flag is set and the target is a symlink.
Aligns with Solaris and Linux behaviour.

ok tedu@ thib@ guenther@

Revision 1.63 / (download) - annotate - [select for diffs], Thu Jul 9 22:29:56 2009 UTC (14 years, 10 months ago) by thib
Branch: MAIN
Changes since 1.62: +1 -1 lines
Diff to previous 1.62 (colored)

Remove the VREF() macro and replaces all instances with a call to verf(),
which is exactly what the macro does.

Macro's that are nothing more then:
#define FUNCTION(arg) function(arg)
are almost always pointless and should go away.

OK blambert@
Agreed by many.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Jan 29 22:08:45 2009 UTC (15 years, 4 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.61: +4 -4 lines
Diff to previous 1.61 (colored)

Switch struct stat's timespec members to the names standardized in
POSIX 1003.1-2008, with compatibility macros for the names used in
previous version of OpenBSD.  Update all the references in the
kernel to use the new, standard member names.

ok'ed by miod@, otto@; ports build test by naddy@

Revision 1.61 / (download) - annotate - [select for diffs], Sat Jan 24 23:25:17 2009 UTC (15 years, 4 months ago) by thib
Branch: MAIN
Changes since 1.60: +3 -1 lines
Diff to previous 1.60 (colored)

propagate the O_EXCL flag down to the file systems, by setting
VA_EXCLUSIVE. Handle this in NFS, also in NFS use arc4random()
for the create verifier instead of an uninitialized long and
the address of the first interface (which is likely to be lo0).

Lifted from NetBSD with small tweaks;
"looks good", miod@
OK blambert@

Revision 1.60 / (download) - annotate - [select for diffs], Fri Sep 19 12:24:55 2008 UTC (15 years, 8 months ago) by art
Branch: MAIN
Changes since 1.59: +14 -3 lines
Diff to previous 1.59 (colored)

Fix a bunch of problems and races with posix file locking.

- file descriptor table becomes the owner of the lock instead of the proc.
- When grabbing the lock, we check if the fd hasn't changed under our
  feet, this is more or less impossible to solve without a hack like
  this. I've banged my head against the wall, I figured out a solution,
  but implementing it correctly would cost me 12 gray hairs. Screw it,
  this is ugly, but it works.
- Wait until usecount drains before releasing the posix lock in closef.
- Add missing FREF/FRELE to sys_flock
- keep the pid in the flock struct instead of abusing the fact that we
  used to use the proc as the lock owner.

Pointed out by and discussed with Al Viro, big thanks.
miod@ ok

Revision 1.59 / (download) - annotate - [select for diffs], Tue Apr 8 14:46:45 2008 UTC (16 years, 1 month ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.58: +8 -6 lines
Diff to previous 1.58 (colored)

bring cloning up too date; Munge it so it will work with atleast
oga@'s upcoming DRM changes and too some degree ratchov@'s audio
work. It still works for bpf's though.

Parts from ratchov@; fstat(1) parts from Pedro Martelletto;
tested by many, ok'ed by a few;
"get going with cloning" deraadt@

Revision 1.58 / (download) - annotate - [select for diffs], Thu Jun 14 20:36:34 2007 UTC (16 years, 11 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.57: +1 -2 lines
Diff to previous 1.57 (colored)

Forgotten hackton diff: bounds check for seek on special devices
with a disklabel.  Original diff from pedro@; ok pedro@ deraadt@

Revision 1.57 / (download) - annotate - [select for diffs], Fri Jun 1 22:30:46 2007 UTC (17 years ago) by deraadt
Branch: MAIN
Changes since 1.56: +1 -4 lines
Diff to previous 1.56 (colored)

FIBMAP is used by nothing; checked by miod and pvalchev

Revision 1.56 / (download) - annotate - [select for diffs], Sat May 5 12:03:04 2007 UTC (17 years, 1 month ago) by art
Branch: MAIN
Changes since 1.55: +1 -15 lines
Diff to previous 1.55 (colored)

vn_access hasn't been used for ages and it's just a wrapper with
locking around VOP_ACCESS. It can go.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Mar 21 17:29:32 2007 UTC (17 years, 2 months ago) by thib
Branch: MAIN
Changes since 1.54: +2 -6 lines
Diff to previous 1.54 (colored)

Remove the v_interlock simplelock from the vnode structure.
Zap all calls to simple_lock/unlock() on it (those calls are
#defined away though). Remove the LK_INTERLOCK from the calls
to vn_lock() and cleanup the filesystems wich implement VOP_LOCK().
(by remvoing the v_interlock from there calls to lockmgr()).

ok pedro@, art@, tedu@

Revision 1.54 / (download) - annotate - [select for diffs], Tue Jan 16 17:52:18 2007 UTC (17 years, 4 months ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.53: +1 -7 lines
Diff to previous 1.53 (colored)

Retire VOP_LEASE(); It was a bit for NQNFS and has
effectively been a no-op for quite some time now,
without promise for future usage.

ok pedro@
Testing by krw@ (earlier diff)
and Johan Mson Lindman (tybollt@solace.miun.se)

Revision 1.53 / (download) - annotate - [select for diffs], Fri Jun 2 20:25:09 2006 UTC (18 years ago) by pedro
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.52: +16 -1 lines
Diff to previous 1.52 (colored)

Add a clonable devices implementation. Hacked along with thib@, input
from krw@ and toby@, subliminal prodding from dlg@, okay deraadt@.

Revision 1.52 / (download) - annotate - [select for diffs], Mon May 1 21:50:48 2006 UTC (18 years, 1 month ago) by pedro
Branch: MAIN
Changes since 1.51: +15 -1 lines
Diff to previous 1.51 (colored)

Move vn_isunder() to vfs_vnops.c, that's the place for vn_* functions

Revision 1.51 / (download) - annotate - [select for diffs], Sun Apr 23 17:36:09 2006 UTC (18 years, 1 month ago) by pedro
Branch: MAIN
Changes since 1.50: +2 -3 lines
Diff to previous 1.50 (colored)

'fall into' -> FALLTHROUGH

Revision 1.50 / (download) - annotate - [select for diffs], Sun Apr 23 17:35:08 2006 UTC (18 years, 1 month ago) by pedro
Branch: MAIN
Changes since 1.49: +1 -2 lines
Diff to previous 1.49 (colored)

Remove unnecessary ARGSUSED comment

Revision 1.49 / (download) - annotate - [select for diffs], Sun Apr 23 17:30:56 2006 UTC (18 years, 1 month ago) by pedro
Branch: MAIN
Changes since 1.48: +10 -4 lines
Diff to previous 1.48 (colored)

KNF

Revision 1.48 / (download) - annotate - [select for diffs], Sun Dec 4 19:04:13 2005 UTC (18 years, 6 months ago) by pedro
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.47: +19 -1 lines
Diff to previous 1.47 (colored)

Add vn_access(), discussed with and okay uwe@

Revision 1.47 / (download) - annotate - [select for diffs], Sun Nov 20 21:55:15 2005 UTC (18 years, 6 months ago) by pedro
Branch: MAIN
Changes since 1.46: +28 -74 lines
Diff to previous 1.46 (colored)

Use ANSI function declarations and deregister, no binary change

Revision 1.46 / (download) - annotate - [select for diffs], Sat May 28 07:30:25 2005 UTC (19 years ago) by marius
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.45: +3 -2 lines
Diff to previous 1.45 (colored)

have vn_close() lock the vnode before calling VOP_CLOSE().

fix the acct_*() code so that we always have a proc to lock on.

ok pedro@

Revision 1.45 / (download) - annotate - [select for diffs], Tue Jul 13 21:04:29 2004 UTC (19 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

Change mode_t and nlink_t from 16bit to 32bit.  This allows us to
use mode_t in syscalls.master and to use mode_t in more places in
the kernel.  It also makes lint much more useful on kernel code.

I've also added a placeholder for st_birthtime to make a UFS2 import
easier at some future date.

Requested by and OK deraadt@

Revision 1.38.2.3 / (download) - annotate - [select for diffs], Sat Feb 21 00:20:21 2004 UTC (20 years, 3 months ago) by tedu
Branch: UBC
Changes since 1.38.2.2: +19 -18 lines
Diff to previous 1.38.2.2 (colored) to branchpoint 1.38 (colored) next main 1.39 (colored)

add VEXECMAP.  also make sure to modify filepages count only in the not
execpages case in uvm_pageremove().
this actually appears to solve the swap freak out problems.  sitting on it for
a long time, never checked if it worked.  sigh.

Revision 1.23.2.9 / (download) - annotate - [select for diffs], Thu Feb 19 10:56:39 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.23.2.8: +9 -9 lines
Diff to previous 1.23.2.8 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.44 / (download) - annotate - [select for diffs], Tue Sep 23 16:51:12 2003 UTC (20 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.43: +8 -8 lines
Diff to previous 1.43 (colored)

Replace select backends with poll backends.  selscan() and pollscan()
now call the poll backend.  With this change we implement greater
poll(2) functionality instead of emulating it via the select backend.
Adapted from NetBSD and including some changes from FreeBSD.
Tested by many, deraadt@ OK

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jul 21 22:44:50 2003 UTC (20 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

remove caddr_t casts.  it's just silly to cast something when the function
takes a void *.  convert uiomove to take a void * as well.  ok deraadt@

Revision 1.23.2.8 / (download) - annotate - [select for diffs], Sat Jun 7 11:03:41 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.23.2.7: +2 -6 lines
Diff to previous 1.23.2.7 (colored) to branchpoint 1.23 (colored)

Sync SMP branch to -current

Revision 1.42 / (download) - annotate - [select for diffs], Mon Jun 2 23:28:07 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.41: +2 -6 lines
Diff to previous 1.41 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.38.2.2 / (download) - annotate - [select for diffs], Mon Nov 4 18:02:31 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.38.2.1: +3 -3 lines
Diff to previous 1.38.2.1 (colored) to branchpoint 1.38 (colored)

Huge sync to NetBSD plus lots of bugfixes.
 - uvm is as in netbsd-current minus uvm_map forward merge.
 - various locking bugfixes in nfs.
 - make sure that all specops and fifoops are correct in all vnodeop vectors.
 - make the filesystem code more like filsystem code and less like vm code.

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:29:41 2002 UTC (21 years, 11 months ago) by art
Branch: UBC
Changes since 1.38: +15 -15 lines
Diff to previous 1.38 (colored)

Sync UBC branch to -current

Revision 1.23.2.7 / (download) - annotate - [select for diffs], Thu Mar 28 11:43:04 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.23.2.6: +14 -14 lines
Diff to previous 1.23.2.6 (colored) to branchpoint 1.23 (colored)

Merge in -current from about a week ago

Revision 1.41 / (download) - annotate - [select for diffs], Sun Mar 17 18:22:25 2002 UTC (22 years, 2 months ago) by art
Branch: MAIN
CVS Tags: UBC_SYNC_B, UBC_SYNC_A, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.40: +6 -6 lines
Diff to previous 1.40 (colored)

Since LK_RECURSEFAIL and LK_CANRECURSE contradict each other
(although they are not opposites), avoid setting LK_CANRECURSE if
LK_RECURSEFAIL is set in the caller.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:06 2002 UTC (22 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.39: +10 -10 lines
Diff to previous 1.39 (colored)

First round of __P removal in sys

Revision 1.23.2.6 / (download) - annotate - [select for diffs], Wed Mar 6 02:13:24 2002 UTC (22 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.23.2.5: +4 -25 lines
Diff to previous 1.23.2.5 (colored) to branchpoint 1.23 (colored)

Merge in trunk

Revision 1.39 / (download) - annotate - [select for diffs], Wed Dec 19 08:58:06 2001 UTC (22 years, 5 months ago) by art
Branch: MAIN
Changes since 1.38: +5 -30 lines
Diff to previous 1.38 (colored)

UBC was a disaster. It worked very good when it worked, but on some
machines or some configurations or in some phase of the moon (we actually
don't know when or why) files disappeared. Since we've not been able to
track down the problem in two weeks intense debugging and we need -current
to be stable, back out everything to a state it had before UBC.

We apologise for the inconvenience.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Dec 10 18:45:34 2001 UTC (22 years, 5 months ago) by art
Branch: MAIN
CVS Tags: UBC_BASE
Branch point for: UBC
Changes since 1.37: +5 -1 lines
Diff to previous 1.37 (colored)

Don't sleep on VXLOCK if LK_NOWAIT.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Dec 10 02:19:34 2001 UTC (22 years, 5 months ago) by art
Branch: MAIN
Changes since 1.36: +4 -4 lines
Diff to previous 1.36 (colored)

Merge in struct uvm_vnode into struct vnode.

Revision 1.23.2.5 / (download) - annotate - [select for diffs], Wed Dec 5 01:02:39 2001 UTC (22 years, 6 months ago) by niklas
Branch: SMP
Changes since 1.23.2.4: +35 -4 lines
Diff to previous 1.23.2.4 (colored) to branchpoint 1.23 (colored)

Merge in -current

Revision 1.36 / (download) - annotate - [select for diffs], Tue Nov 27 05:27:12 2001 UTC (22 years, 6 months ago) by art
Branch: MAIN
Changes since 1.35: +26 -5 lines
Diff to previous 1.35 (colored)

Merge in the unified buffer cache code as found in NetBSD 2001/03/10. The
code is written mostly by Chuck Silvers <chuq@chuq.com>/<chs@netbsd.org>.

Tested for the past few weeks by many developers, should be in a pretty stable
state, but will require optimizations and additional cleanups.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Nov 15 06:22:30 2001 UTC (22 years, 6 months ago) by art
Branch: MAIN
Changes since 1.34: +11 -1 lines
Diff to previous 1.34 (colored)

New function vn_marktext - mark a vnode as executing a text image.
Use where VTEXT was set in vnode flags before. Doesn't do anything else (yet).

Revision 1.23.2.4 / (download) - annotate - [select for diffs], Tue Nov 13 23:04:23 2001 UTC (22 years, 6 months ago) by niklas
Branch: SMP
Changes since 1.23.2.3: +1 -3 lines
Diff to previous 1.23.2.3 (colored) to branchpoint 1.23 (colored)

merge in -current

Revision 1.34 / (download) - annotate - [select for diffs], Tue Nov 6 19:53:20 2001 UTC (22 years, 7 months ago) by miod
Branch: MAIN
Changes since 1.33: +1 -3 lines
Diff to previous 1.33 (colored)

Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.
(Look ma, I might have broken the tree)

Revision 1.23.2.3 / (download) - annotate - [select for diffs], Wed Oct 31 03:26:29 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.23.2.2: +2 -2 lines
Diff to previous 1.23.2.2 (colored) to branchpoint 1.23 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.33 / (download) - annotate - [select for diffs], Mon Jul 16 18:25:43 2001 UTC (22 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

Ignore O_TRUNC on open() if we are not opening a regular file.
csapuntz@ OK'd

Revision 1.23.2.2 / (download) - annotate - [select for diffs], Wed Jul 4 10:48:56 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.23.2.1: +21 -12 lines
Diff to previous 1.23.2.1 (colored) to branchpoint 1.23 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jun 27 04:49:48 2001 UTC (22 years, 11 months ago) by art
Branch: MAIN
Changes since 1.31: +2 -8 lines
Diff to previous 1.31 (colored)

remove old vm

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jun 22 14:14:11 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

KNF

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Mon May 14 22:32:46 2001 UTC (23 years ago) by niklas
Branch: SMP
Changes since 1.23: +40 -23 lines
Diff to previous 1.23 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.30 / (download) - annotate - [select for diffs], Mon May 14 12:38:47 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.29: +3 -2 lines
Diff to previous 1.29 (colored)

Add a fo_stat member to struct fileops. Used soon.
Also add a stat function for kqueue from FreeBSD.

Revision 1.29 / (download) - annotate - [select for diffs], Mon May 14 12:11:53 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.28: +16 -2 lines
Diff to previous 1.28 (colored)

Implement a wrapper round vn_stat that takes the same arguments
as soo_stat and pipe_stat.

Revision 1.28 / (download) - annotate - [select for diffs], Thu Mar 1 20:54:34 2001 UTC (23 years, 3 months ago) by provos
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.27: +6 -81 lines
Diff to previous 1.27 (colored)

port kqueue changes from freebsd, plus all required openbsd glue.
okay deraadt@, millert@
from jlemon@freebsd.org:
extend kqueue down to the device layer, backwards compatible approach
suggested by peter@freebsd.org

Revision 1.27 / (download) - annotate - [select for diffs], Tue Nov 21 21:49:57 2000 UTC (23 years, 6 months ago) by provos
Branch: MAIN
Changes since 1.26: +84 -1 lines
Diff to previous 1.26 (colored)

support for kernel events on vnodes, from jlemon@freebsd.org, okay art@

Revision 1.26 / (download) - annotate - [select for diffs], Tue Apr 25 02:10:04 2000 UTC (24 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.25: +2 -1 lines
Diff to previous 1.25 (colored)

non-O_NOFOLLOW error introduced by accident, this is fragile code..

Revision 1.25 / (download) - annotate - [select for diffs], Fri Apr 21 15:47:28 2000 UTC (24 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.24: +9 -12 lines
Diff to previous 1.24 (colored)

Change kernel-only open flag FNOSYMLINK to userland-visible O_NOFOLLOW;
adapated from FreeBSD.  Also change O_FSYNC to the more standard O_SYNC
and document it.  open(2) needs some real examples for proper usage,
to come later.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Apr 19 08:34:53 2000 UTC (24 years, 1 month ago) by csapuntz
Branch: MAIN
Changes since 1.23: +23 -12 lines
Diff to previous 1.23 (colored)



Change struct file interface methods read and write to pass file offset in
and out.

Make pread/pwrite in netbsd & linux thread safe - which is the whole point
anyway.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Nov 13 03:48:09 1999 UTC (24 years, 6 months ago) by angelos
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE
Branch point for: SMP
Changes since 1.22: +5 -1 lines
Diff to previous 1.22 (colored)

FIBMAP ioctl from Linux, only usable on ISO 9660 FS. Note that the lba
returned is in 512-byte sectors, so if you're going to use it for
things like DVD, you need to divide the result by 4 (for 2048-byte
sectors). OK deraadt@

Revision 1.22 / (download) - annotate - [select for diffs], Thu Aug 26 08:07:10 1999 UTC (24 years, 9 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

change a & to &&. From dima@best.net

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jul 18 01:20:22 1999 UTC (24 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

ugly C

Revision 1.20 / (download) - annotate - [select for diffs], Fri Feb 26 04:51:17 1999 UTC (25 years, 3 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.19: +10 -1 lines
Diff to previous 1.19 (colored)

adaptation to uvm vnode pager

Revision 1.19 / (download) - annotate - [select for diffs], Sat Dec 5 17:16:54 1998 UTC (25 years, 6 months ago) by csapuntz
Branch: MAIN
Changes since 1.18: +2 -1 lines
Diff to previous 1.18 (colored)



Reinstate supposed dead code

Revision 1.18 / (download) - annotate - [select for diffs], Sat Dec 5 16:44:09 1998 UTC (25 years, 6 months ago) by csapuntz
Branch: MAIN
Changes since 1.17: +1 -2 lines
Diff to previous 1.17 (colored)



Dead code elimination

Revision 1.17 / (download) - annotate - [select for diffs], Thu Aug 6 19:34:29 1998 UTC (25 years, 10 months ago) by csapuntz
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)



Rename vop_revoke, vn_bwrite, vop_noislocked, vop_nolock, vop_nounlock
to be vop_generic_revoke, vop_generic_bwrite, vop_generic_islocked,
vop_generic_lock and vop_generic_unlock.

Create vop_generic_abortop and propogate change to all file systems.

Fix PR/371.

Get rid of locking in NULLFS (should be mostly unnecessary now except for
forced unmounts).

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jul 28 00:13:04 1998 UTC (25 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.15: +6 -4 lines
Diff to previous 1.15 (colored)

Return EINVAL when msg_iovlen or iovcnt <= 0; Make uio_resid unsigned (size_t) and don't return EINVAL if it is < 0 in sys_{read,write}.  Remove check for uio_resid < 0 uiomove() now that uio_resid is unsigned and brack remaining panics with #ifdef DIAGNOSTIC.  vn_rdwr() must now take a size_t * as its 9th argument so change that and clean up uses of vn_rdwr().  Fixes 549 + more

Revision 1.15 / (download) - annotate - [select for diffs], Thu Jan 15 01:24:40 1998 UTC (26 years, 4 months ago) by csapuntz
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.14: +1 -3 lines
Diff to previous 1.14 (colored)

Re-enabled write protection on read-only file system mounts. Thanks to
Niels for pointing this one out.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jan 9 16:33:49 1998 UTC (26 years, 4 months ago) by csapuntz
Branch: MAIN
Changes since 1.13: +10 -2 lines
Diff to previous 1.13 (colored)

Get rid of dumping across symlinks. Races can cause this to be problematic
from a security standpoint (i.e. arbitrary files on the FS can be wiped out).

Revision 1.13 / (download) - annotate - [select for diffs], Wed Dec 10 19:44:09 1997 UTC (26 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

extra ()

Revision 1.12 / (download) - annotate - [select for diffs], Wed Dec 10 19:39:41 1997 UTC (26 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

Remove special case for O_TRUNC that is irelevant now that
we disallow O_TRUNC with O_RDONLY.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Dec 10 19:31:17 1997 UTC (26 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.10: +5 -3 lines
Diff to previous 1.10 (colored)

try again; proactively check that O_TRUNC has FWRITE

Revision 1.10 / (download) - annotate - [select for diffs], Wed Dec 10 19:15:09 1997 UTC (26 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

only permit O_TRUNC if FWRITE is set; chatted about by millert and myself for nearly an hour

Revision 1.9 / (download) - annotate - [select for diffs], Thu Nov 6 05:58:29 1997 UTC (26 years, 7 months ago) by csapuntz
Branch: MAIN
Changes since 1.8: +47 -11 lines
Diff to previous 1.8 (colored)

Updates for VFS Lite 2 + soft update.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Oct 24 09:04:26 1997 UTC (26 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.7: +3 -1 lines
Diff to previous 1.7 (colored)

prevent open() with wrong flags

Revision 1.7 / (download) - annotate - [select for diffs], Mon Oct 6 20:20:15 1997 UTC (26 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +10 -46 lines
Diff to previous 1.6 (colored)

back out vfs lite2 till after 2.2

Revision 1.6 / (download) - annotate - [select for diffs], Mon Oct 6 15:12:45 1997 UTC (26 years, 8 months ago) by csapuntz
Branch: MAIN
Changes since 1.5: +47 -11 lines
Diff to previous 1.5 (colored)

VFS Lite2 Changes

Revision 1.5 / (download) - annotate - [select for diffs], Mon Aug 4 08:24:54 1997 UTC (26 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +5 -4 lines
Diff to previous 1.4 (colored)

let us all try this for a while, and argue amongst ourselves.
make a read(2) on an open'd directory return 0 bytes. always.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jul 15 16:06:17 1997 UTC (26 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +0 -2 lines
Diff to previous 1.3 (colored)

cannot do this; flipk has found test cases where this fails

Revision 1.3 / (download) - annotate - [select for diffs], Fri Jul 11 02:15:49 1997 UTC (26 years, 10 months ago) by tholo
Branch: MAIN
Changes since 1.2: +3 -1 lines
Diff to previous 1.2 (colored)

Do not force FOLLOW (to follow symbolic links) when creating new files

Revision 1.2 / (download) - annotate - [select for diffs], Sun Mar 3 17:20:28 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1, OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.1: +28 -12 lines
Diff to previous 1.1 (colored)

From NetBSD: 960217 merge

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:52:48 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:52:48 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.