OpenBSD CVS

CVS log for src/sys/msdosfs/msdosfs_vnops.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.141 / (download) - annotate - [select for diffs], Mon May 13 11:17:40 2024 UTC (4 weeks ago) by semarie
Branch: MAIN
CVS Tags: HEAD
Changes since 1.140: +1 -7 lines
Diff to previous 1.140 (colored)

vfs: VOP_REMOVE: move vnode unlocking and ref dropping to FS-indep part

while here, ensure all vop_remove field are set, and always call the function.

the change is very conservative: it only adds vnode ref drop/unlock where it was
absent because it should be unreachable (and if it wasn't, it should fix
things).

ok miod@

Revision 1.140 / (download) - annotate - [select for diffs], Fri Sep 8 20:00:28 2023 UTC (9 months ago) by mvs
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.139: +3 -3 lines
Diff to previous 1.139 (colored)

Remove the remnants of the leftover selinfo from vnode(9) layer. Just
mechanical 'selinfo' to 'klist' replacement in 'vnode' structure because
knote(9) API is already used.

<sys/selinfo.h> headers added where is was required.

ok bluhm

Revision 1.139 / (download) - annotate - [select for diffs], Tue Aug 23 20:37:16 2022 UTC (21 months, 2 weeks ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.138: +3 -3 lines
Diff to previous 1.138 (colored)

msdosfs: don't pass NULL proc pointer to detrunc()

detrunc()'s proc pointer argument may be passed to vinvalbuf(9), which
under certain conditions will pass the given proc pointer to
VOP_FSYNC(9), which always asserts that the given proc pointer is
equal to curproc.

msdosfs_write(), msdosfs_inactive(), createde(), and deextend() all
pass NULL for detrunc()'s proc pointer argument.  I have no idea why.
If these detrunc() calls ever reach VOP_FSYNC(9) the kernel will
panic.

So, for example, any user with write access to an msdosfs partition
can panic the kernel by writing to the partition until they cause
ENOSPC.  That particular panic looks like this:

panic: kernel diagnostic assertion "p == curproc" failed: file "/usr/src/sys/kern/vfs_vops.c", line 305
Stopped at      db_enter+0xa:   popq    %rbp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
*500294   8955      0    0x100003          0    1K ksh
db_enter() at db_enter+0xa
panic(ffffffff81f1b0cf) at panic+0xc4
__assert(ffffffff81fa361c,ffffffff81ee8329,131,ffffffff81f7229b) at assert+0x3b
VOP_FSYNC(fffffd8449a78b30,ffffffffffffffff,1,0) at VOP_FSYNC+Oxd6
vinvalbuf(fffffd8449a78b30,3,ffffffffffffffff,0,0,ffffffffffffffff) at vinvalbuf+0xd5
detrunc(ffff80000186f900,1fe,0,ffffffffffffffff,0) at detrunc+0x239
msdosfs_write(ffff800055774b98) at msdosf_write+0x4a4
VOP_WRITE(fffffd8449a78b30,ffff800055774d10,3,fffffd8370e8d5d0) at VOP_WRITE+0x59
vn_write(fffffd83c723b860,ffff800055774d10,0) at vn_write+0xc0
dofilewritev(ffff8000556ecfc0,1,ffff800055774d10,0.ffff800055774dc0) at dofilewritev+0x14d
sys_write(ffff8000556ecfc0,ffff800055774dd0,ffff800055774dc0) at sys_write+0x6a
syscall(ffff800055774e70) at syscall+0x39b
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffd8bf0, count: 2

This patch tweaks all the detrunc() calls in the aforementioned
msdosfs functions to pass curproc instead of a NULL pointer to
detrunc().  We don't appear to have curproc stashed anywhere in
msdosfs_write() or deextend(), so for those calls we explicitly pass
curproc.

This might have unforseen consequences I can't anticipate.  However,
with this patch I can no longer panic the kernel by filling an msdosfs
partition, which seems like an improvement.

With advice from gnezdo@.

ok gnezdo@

Revision 1.138 / (download) - annotate - [select for diffs], Sun Jun 26 05:20:42 2022 UTC (23 months, 2 weeks ago) by visa
Branch: MAIN
Changes since 1.137: +1 -11 lines
Diff to previous 1.137 (colored)

Remove unused VOP_POLL().

OK mpi@

Revision 1.137 / (download) - annotate - [select for diffs], Sun Dec 12 09:14:59 2021 UTC (2 years, 5 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.136: +2 -2 lines
Diff to previous 1.136 (colored)

Add vnode parameter to VOP_STRATEGY()

Pass the device vnode as a parameter to VOP_STRATEGY() to allow calling
the correct vop_strategy callback. Now the vnode is also available
in the callback.

OK mpi@

Revision 1.136 / (download) - annotate - [select for diffs], Sat Dec 11 09:28:26 2021 UTC (2 years, 6 months ago) by visa
Branch: MAIN
Changes since 1.135: +2 -2 lines
Diff to previous 1.135 (colored)

Clarify usage of __EV_POLL and __EV_SELECT

Make __EV_POLL specific to kqueue-based poll(2), to remove overlap
with __EV_SELECT that only select(2) uses.

OK millert@ mpi@

Revision 1.135 / (download) - annotate - [select for diffs], Fri Dec 25 12:59:52 2020 UTC (3 years, 5 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.134: +3 -3 lines
Diff to previous 1.134 (colored)

Refactor klist insertion and removal

Rename klist_{insert,remove}() to klist_{insert,remove}_locked().
These functions assume that the caller has locked the klist. The current
state of locking remains intact because the kernel lock is still used
with all klists.

Add new functions klist_insert() and klist_remove() that lock the klist
internally. This allows some code simplification.

OK mpi@

Revision 1.134 / (download) - annotate - [select for diffs], Thu Jun 11 09:18:43 2020 UTC (4 years ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.133: +2 -2 lines
Diff to previous 1.133 (colored)

Rename poll-compatibility flag to better reflect what it is.

While here prefix kernel-only EV flags with two underbars.

Suggested by kettenis@, ok visa@

Revision 1.133 / (download) - annotate - [select for diffs], Mon Jun 8 08:04:09 2020 UTC (4 years ago) by mpi
Branch: MAIN
Changes since 1.132: +5 -1 lines
Diff to previous 1.132 (colored)

Use a new EV_OLDAPI flag to match the behavior of poll(2) and select(2).

Adapt FS kqfilters to always return true when the flag is set and bypass
the polling mechanism of the NFS thread.

While here implement a write filter for NFS.

ok visa@

Revision 1.132 / (download) - annotate - [select for diffs], Tue Apr 7 13:27:52 2020 UTC (4 years, 2 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored)

Abstract the head of knote lists. This allows extending the lists,
for example, with locking assertions.

OK mpi@, anton@

Revision 1.131 / (download) - annotate - [select for diffs], Tue Mar 24 14:03:30 2020 UTC (4 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.130: +5 -8 lines
Diff to previous 1.130 (colored)

Kill some dead code that tests bits immediately after setting them.

CID 1452873

Revision 1.130 / (download) - annotate - [select for diffs], Thu Feb 27 09:10:31 2020 UTC (4 years, 3 months ago) by mpi
Branch: MAIN
Changes since 1.129: +1 -21 lines
Diff to previous 1.129 (colored)

Remove unused "struct proc *" argument from the following functions:

- ufs_chown() & ufs_chmod()
- ufs_reclaim()
- ext2fs_chown() & ext2fs_chmod()
- ntfs_ntget() & ntfs_ntput()
- ntfs_vgetex(), ntfs_ntlookup() & ntfs_ntlookupfile()

While here use `ap->a_p' directly when it is only required to re-enter
the VFS layer in order to help reducing the loop.

ok visa@

Revision 1.129 / (download) - annotate - [select for diffs], Thu Feb 20 16:56:52 2020 UTC (4 years, 3 months ago) by visa
Branch: MAIN
Changes since 1.128: +4 -4 lines
Diff to previous 1.128 (colored)

Replace field f_isfd with field f_flags in struct filterops to allow
adding more filter properties without cluttering the struct.

OK mpi@, anton@

Revision 1.128 / (download) - annotate - [select for diffs], Mon Jan 20 23:21:56 2020 UTC (4 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.127: +2 -2 lines
Diff to previous 1.127 (colored)

struct vops is not modified during runtime so use const which moves each
into read-only data segment.
OK deraadt@ tedu@

Revision 1.127 / (download) - annotate - [select for diffs], Tue Dec 31 13:48:32 2019 UTC (4 years, 5 months ago) by visa
Branch: MAIN
Changes since 1.126: +21 -7 lines
Diff to previous 1.126 (colored)

Use C99 designated initializers with struct filterops. In addition,
make the structs const so that the data are put in .rodata.

OK mpi@, deraadt@, anton@, bluhm@

Revision 1.126 / (download) - annotate - [select for diffs], Mon Aug 5 08:35:59 2019 UTC (4 years, 10 months ago) by anton
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.125: +2 -2 lines
Diff to previous 1.125 (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.125 / (download) - annotate - [select for diffs], Fri Jul 19 00:24:31 2019 UTC (4 years, 10 months ago) by cheloha
Branch: MAIN
Changes since 1.124: +3 -3 lines
Diff to previous 1.124 (colored)

getblk(9): tsleep(9) -> tsleep_nsec(9); ok visa@

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

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

ok anton@

Revision 1.123 / (download) - annotate - [select for diffs], Wed Jul 10 16:43:19 2019 UTC (4 years, 11 months ago) by anton
Branch: MAIN
Changes since 1.122: +2 -2 lines
Diff to previous 1.122 (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.122 / (download) - annotate - [select for diffs], Thu Jun 21 14:17:23 2018 UTC (5 years, 11 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.121: +1 -9 lines
Diff to previous 1.121 (colored)

Drop redundant "node == parent node" checks from VOP_RMDIR()
implementations. Rely on the VFS layer to do the checking.

OK mpi@, helg@

Revision 1.121 / (download) - annotate - [select for diffs], Thu Jun 7 13:37:28 2018 UTC (6 years ago) by visa
Branch: MAIN
Changes since 1.120: +1 -4 lines
Diff to previous 1.120 (colored)

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

OK mpi@, helg@

Revision 1.120 / (download) - annotate - [select for diffs], Mon May 7 14:43:01 2018 UTC (6 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.119: +74 -50 lines
Diff to previous 1.119 (colored)

Implement VFS read clustering for MSDOSFS, take 3.

With sf@, inputs from krw@, tested by many, ok visa@

Revision 1.119 / (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.118: +2 -3 lines
Diff to previous 1.118 (colored)

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

OK mpi@

Revision 1.118 / (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.117: +11 -11 lines
Diff to previous 1.117 (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.117 / (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.116: +3 -2 lines
Diff to previous 1.116 (colored)

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

ok millert@ sthen@

Revision 1.116 / (download) - annotate - [select for diffs], Mon Aug 14 22:43:56 2017 UTC (6 years, 9 months ago) by sf
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.115: +2 -2 lines
Diff to previous 1.115 (colored)

msdofs: Add new CLUST_END constant

Add new CLUST_END and use it as parameter to pcbmap() when searching
for end cluster, instead of explicitly passing 0xffff. This fixes potential
problem for FAT32, where cluster number may be legally bigger than 0xffff.

Also change clusteralloc() so that fillwith is not explicitly passed by caller
anymore (there is no need to use anything other than CLUST_EOFE).

From NetBSD commit by jdolecek@NetBSD.org

ok tb@ mpi@

Revision 1.115 / (download) - annotate - [select for diffs], Tue Jun 13 18:13:18 2017 UTC (6 years, 11 months ago) by sf
Branch: MAIN
Changes since 1.114: +41 -65 lines
Diff to previous 1.114 (colored)

Revert 'Implement VFS read clustering for MSDOSFS' again

This has again caused regressions, this time when reading from msdosfs.

This reverts

        denode.h 1.31
        msdosfs_vnops.c 1.114

Requested by deraadt@

Revision 1.114 / (download) - annotate - [select for diffs], Mon May 29 13:48:12 2017 UTC (7 years ago) by sf
Branch: MAIN
Changes since 1.113: +66 -42 lines
Diff to previous 1.113 (colored)

Implement VFS read clustering for MSDOSFS

This is the reverted commit by mpi@ from msdosfs_vnops.c 1.105 plus some
additional tweaks to fix some cluster/block number confusion that lead
to regressions when seeking past the end of a file.

The original commit message was:

  The logic used in msdosfs_bmap() to loop calling pcbmap() comes from
  FreeBSD and is not really efficient but it is good enough since it is
  only called when generating I/O.

  With this diff I get a 100% improvement when reading big files from a
  crappy USB stick.

  With this and bread_cluster(9) modified to not re-fetch B_CACHED buffers,
  reading large contiguous files with chunk sizes of MAXPHYS is almost as
  fast as physio(9) on the same device.

  For a 'real world' example, when copying music files from a USB stick I
  see a speed jump from 15MB/s on -current to 24Mb/s with this diff.

  While here rename some 'lbn' variables into 'cn' to better reflect what
  we're dealing with.

  Tested by Mathieu, with support from deraadt@

ok mpi@

Revision 1.113 / (download) - annotate - [select for diffs], Tue Aug 30 19:47:23 2016 UTC (7 years, 9 months ago) by sf
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.112: +49 -69 lines
Diff to previous 1.112 (colored)

Revert "Implement VFS read clustering for MSDOSFS"

This caused garbage to be written instead of blocks of 0-bytes if a
file is extended by seeking past the end. This happens for example
when extracting files containing lots of 0-bytes with tar.

ok mpi@

Details of original commit:

  msdosfs_vnops.c revision 1.105
  denode.h revision 1.28
  date: 2016/01/13 10:00:55;  author: mpi;  commitid: ru9jHQwQX09BC5Bw;

  Implement VFS read clustering for MSDOSFS.

  The logic used in msdosfs_bmap() to loop calling pcbmap() comes from
  FreeBSD and is not really efficient but it is good enough since it is
  only called when generating I/O.

  With this diff I get a 100% improvement when reading big files from a
  crappy USB stick.

  With this and bread_cluster(9) modified to not re-fetch B_CACHED buffers,
  reading large contiguous files with chunk sizes of MAXPHYS is almost as
  fast as physio(9) on the same device.

  For a 'real world' example, when copying music files from a USB stick I
  see a speed jump from 15MB/s on -current to 24Mb/s with this diff.

  While here rename some 'lbn' variables into 'cn' to better reflect what
  we're dealing with.

  Tested by Mathieu, with support from deraadt@

Revision 1.112 / (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.111: +5 -4 lines
Diff to previous 1.111 (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.111 / (download) - annotate - [select for diffs], Sat May 21 18:11:36 2016 UTC (8 years ago) by natano
Branch: MAIN
Changes since 1.110: +10 -12 lines
Diff to previous 1.110 (colored)

Remove the -x flag from mount_msdos and always assume the execute bit
for readable directories, while making it subject to the mask option
(-m in mount_msdos), so it is still possible to mount with
non-executable directories, but with semantics that are easier to
comprehend.

This makes directory listings with default mount options work again.

ok deraadt@

Revision 1.110 / (download) - annotate - [select for diffs], Sat May 21 15:11:46 2016 UTC (8 years ago) by deraadt
Branch: MAIN
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (colored)

by default, files were made executable.  that does not make sense today.
noone should be executing a binary from a msdos filesystem, considering
the mountpoint tracking permission mode model
ok natano krw

Revision 1.109 / (download) - annotate - [select for diffs], Sat Mar 19 12:04:16 2016 UTC (8 years, 2 months ago) by natano
Branch: MAIN
Changes since 1.108: +12 -12 lines
Diff to previous 1.108 (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.108 / (download) - annotate - [select for diffs], Mon Mar 14 23:08:06 2016 UTC (8 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.107: +2 -2 lines
Diff to previous 1.107 (colored)

Change a bunch of (<blah> *)0 to NULL.

ok beck@ deraadt@

Revision 1.107 / (download) - annotate - [select for diffs], Fri Feb 5 19:27:02 2016 UTC (8 years, 4 months ago) by stefan
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.106: +3 -2 lines
Diff to previous 1.106 (colored)

Guard against integer overflow when checking whether
writing to a file on msdosfs stays within the max. file size.

ok kettenis@, krw@

Revision 1.106 / (download) - annotate - [select for diffs], Wed Jan 27 17:09:41 2016 UTC (8 years, 4 months ago) by stefan
Branch: MAIN
Changes since 1.105: +10 -12 lines
Diff to previous 1.105 (colored)

Convert min + uiomovei to ulmin + uiomove.

From Martin Natano.

Revision 1.105 / (download) - annotate - [select for diffs], Wed Jan 13 10:00:55 2016 UTC (8 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.104: +70 -49 lines
Diff to previous 1.104 (colored)

Implement VFS read clustering for MSDOSFS.

The logic used in msdosfs_bmap() to loop calling pcbmap() comes from
FreeBSD and is not really efficient but it is good enough since it is
only called when generating I/O.

With this diff I get a 100% improvement when reading big files from a
crappy USB stick.

With this and bread_cluster(9) modified to not re-fetch B_CACHED buffers,
reading large contiguous files with chunk sizes of MAXPHYS is almost as
fast as physio(9) on the same device.

For a 'real world' example, when copying music files from a USB stick I
see a speed jump from 15MB/s on -current to 24Mb/s with this diff.

While here rename some 'lbn' variables into 'cn' to better reflect what
we're dealing with.

Tested by Mathieu, with support from deraadt@

Revision 1.104 / (download) - annotate - [select for diffs], Fri Oct 23 18:04:37 2015 UTC (8 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.103: +3 -2 lines
Diff to previous 1.103 (colored)

Fix renaming in the root directory by correctly setting directory
offset.

From Serguey Parkhomovsky via bugs@, in response to problem report
from matthieu@. Same fix is in NetBSD for one.

ok tedu@

Revision 1.103 / (download) - annotate - [select for diffs], Fri Oct 23 17:21:34 2015 UTC (8 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.102: +14 -10 lines
Diff to previous 1.102 (colored)

Fix printf() types so kernel compiles with or w/o MSDOSFS_DEBUG.
e.g. print pointers with %p instead of %08x. No changes outside of
MSDOSFS_DEBUG.

Revision 1.102 / (download) - annotate - [select for diffs], Fri Oct 23 10:45:31 2015 UTC (8 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.101: +6 -6 lines
Diff to previous 1.101 (colored)

Nuke a bunch of leading/embedded/trailing whitespace so the code can be
read without generating spurious headaches.

Revision 1.101 / (download) - annotate - [select for diffs], Wed Sep 23 15:37:26 2015 UTC (8 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.100: +1 -2 lines
Diff to previous 1.100 (colored)

remove lockmgr_printinfo stubs. from Martin Natano

Revision 1.100 / (download) - annotate - [select for diffs], Fri Apr 17 04:43:21 2015 UTC (9 years, 1 month ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.99: +6 -4 lines
Diff to previous 1.99 (colored)

Tweaks utimensat/futimens handling to always update ctime, even when both
atime and mtime are UTIME_OMIT (at least for ufs, tmpfs, and ext2fs), and
to correctly handle a timestamp of -1.

ok millert@

Revision 1.99 / (download) - annotate - [select for diffs], Sat Mar 14 03:38:51 2015 UTC (9 years, 3 months ago) by jsg
Branch: MAIN
Changes since 1.98: +1 -2 lines
Diff to previous 1.98 (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.98 / (download) - annotate - [select for diffs], Tue Feb 10 21:56:10 2015 UTC (9 years, 4 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.97: +5 -5 lines
Diff to previous 1.97 (colored)

First step towards making uiomove() take a size_t size argument:
- rename uiomove() to uiomovei() and update all its users.
- introduce uiomove(), which is similar to uiomovei() but with a size_t.
- rewrite uiomovei() as an uiomove() wrapper.
ok kettenis@

Revision 1.97 / (download) - annotate - [select for diffs], Tue Dec 16 18:30:04 2014 UTC (9 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.96: +2 -1 lines
Diff to previous 1.96 (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.96 / (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.95: +2 -1 lines
Diff to previous 1.95 (colored)

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

Revision 1.95 / (download) - annotate - [select for diffs], Sun Aug 10 09:23:06 2014 UTC (9 years, 10 months ago) by jsg
Branch: MAIN
Changes since 1.94: +34 -7 lines
Diff to previous 1.94 (colored)

fix kqueue read/write filters for msdosfs and fusefs
ok tedu@

Revision 1.94 / (download) - annotate - [select for diffs], Tue Jul 8 17:19:25 2014 UTC (9 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.93: +1 -3 lines
Diff to previous 1.93 (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.93 / (download) - annotate - [select for diffs], Fri May 9 03:48:58 2014 UTC (10 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.92: +3 -1 lines
Diff to previous 1.92 (colored)

disable IO_NOCACHE B_NOCACHE conversion until it works.

Revision 1.92 / (download) - annotate - [select for diffs], Tue Apr 8 18:48:41 2014 UTC (10 years, 2 months ago) by beck
Branch: MAIN
Changes since 1.91: +3 -1 lines
Diff to previous 1.91 (colored)

add IO_NOCACHE flag to vop_write arguments, which in turn sets B_NOCACHE
on the written buffers. Use the flag for writes from the page daemon to
ensure that we free buffers written out by the page daemon rather than
caching them.
ok kettenis@

Revision 1.91 / (download) - annotate - [select for diffs], Sat Dec 14 02:57:25 2013 UTC (10 years, 5 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.90: +2 -2 lines
Diff to previous 1.90 (colored)

Zero out dirent structures that will be copied out to avoid leaking garbage
in the padding or trailing name bytes.

ok beck@ millert@ espie@

Revision 1.90 / (download) - annotate - [select for diffs], Tue Oct 1 20:22:13 2013 UTC (10 years, 8 months ago) by sf
Branch: MAIN
Changes since 1.89: +2 -2 lines
Diff to previous 1.89 (colored)

Format string fixes: %hu/%hd for uint16_t, %u/%d/%x for uint32_t

- despite the name, ntohl returns uint32_t, not long
- also fix some %d into %u

Revision 1.89 / (download) - annotate - [select for diffs], Sat Sep 14 02:28:03 2013 UTC (10 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.88: +2 -2 lines
Diff to previous 1.88 (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.88 / (download) - annotate - [select for diffs], Tue Aug 13 05:52:24 2013 UTC (10 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.87: +7 -31 lines
Diff to previous 1.87 (colored)

Switch time_t, ino_t, clock_t, and struct kevent's ident and data
members to 64bit types.  Assign new syscall numbers for (almost
all) the syscalls that involve the affected types, including anything
with time_t, timeval, itimerval, timespec, rusage, dirent, stat,
or kevent arguments.  Add a d_off member to struct dirent and replace
getdirentries() with getdents(), thus immensely simplifying and
accelerating telldir/seekdir.  Build perl with -DBIG_TIME.

Bump the major on every single base library: the compat bits included
here are only good enough to make the transition; the T32 compat
option will be burned as soon as we've reached the new world are
are happy with the snapshots for all architectures.

DANGER: ABI incompatibility.  Updating to this kernel requires extra
work or you won't be able to login: install a snapshot instead.

Much assistance in fixing userland issues from deraadt@ and tedu@
and build assistance from todd@ and otto@

Revision 1.87 / (download) - annotate - [select for diffs], Tue Jun 11 16:42:16 2013 UTC (11 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.86: +6 -6 lines
Diff to previous 1.86 (colored)

final removal of daddr64_t.  daddr_t has been 64 bit for a long enough
test period; i think 3 years ago the last bugs fell out.
ok otto beck others

Revision 1.86 / (download) - annotate - [select for diffs], Thu May 23 09:11:00 2013 UTC (11 years ago) by espie
Branch: MAIN
Changes since 1.85: +3 -2 lines
Diff to previous 1.85 (colored)

revoke's default imp works.
okay tedu@

Revision 1.85 / (download) - annotate - [select for diffs], Thu Mar 28 03:29:44 2013 UTC (11 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.84: +4 -1 lines
Diff to previous 1.84 (colored)

Add support for _PC_TIMESTAMP_RESOLUTION for ffs/mfs, cd9600, ext2,
msdos, NFS, fifos and devices, plus support for querying it in
getconf(2) and the requisite pathconf(2) manpage blurb

ok tedu@

Revision 1.84 / (download) - annotate - [select for diffs], Thu Mar 28 02:08:39 2013 UTC (11 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.83: +1 -4 lines
Diff to previous 1.83 (colored)

Handle the pathconf _PC_PATH_MAX, _PC_PIPE_BUF, _PC_ASYNC_IO,
_PC_PRIO_IO, and _PC_SYNC_IO names in VOP_PATHCONF(), as they're
fs-independent for us.  Since we don't support latter three on any
fs, we can also define the related _POSIX_{ASYNC,PRIO,SYNC}_IO
symbols in <unistd.h> (via sys/unistd.h) with value -1.

Also, zap pointless tty-only values from procfs(!).

ok beck@, deraadt@

Revision 1.83 / (download) - annotate - [select for diffs], Tue Jan 15 06:05:47 2013 UTC (11 years, 4 months ago) by martynas
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.82: +119 -42 lines
Diff to previous 1.82 (colored)

Make the FAT setattr handling more consistent about unsupported
attributes;  making it more "user-friendly".  Mostly from FreeBSD.
OK guenther@, krw@.

Revision 1.82 / (download) - annotate - [select for diffs], Wed Jul 11 12:39:20 2012 UTC (11 years, 11 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.81: +10 -12 lines
Diff to previous 1.81 (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.81 / (download) - annotate - [select for diffs], Wed Jun 20 17:30:22 2012 UTC (11 years, 11 months ago) by matthew
Branch: MAIN
Changes since 1.80: +11 -8 lines
Diff to previous 1.80 (colored)

Cleanup our filesystem pathconf() code a little bit to make it easier
to diff against FreeBSD's.

From Brad; no object file change on amd64.

Revision 1.80 / (download) - annotate - [select for diffs], Thu Feb 16 08:58:49 2012 UTC (12 years, 3 months ago) by robert
Branch: MAIN
Changes since 1.79: +103 -2 lines
Diff to previous 1.79 (colored)

add kevent support for msdosfs to make applications
monitoring fs mounts happy

tested by ajacoutot@ and ok by thib@, krw@

Revision 1.79 / (download) - annotate - [select for diffs], Mon Jul 4 20:35:35 2011 UTC (12 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored)

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

Revision 1.78 / (download) - annotate - [select for diffs], Mon Jul 4 04:30:41 2011 UTC (12 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.77: +7 -9 lines
Diff to previous 1.77 (colored)

bread does nothing with its ucred argument.  remove it.  ok matthew

Revision 1.77 / (download) - annotate - [select for diffs], Tue Apr 5 14:14:07 2011 UTC (13 years, 2 months ago) by thib
Branch: MAIN
Changes since 1.76: +1 -2 lines
Diff to previous 1.76 (colored)

Every single vop_default is set to eopnotsupp, so retire it
and return EOPNOTSUPP directly from the VOP_* functions.

Filesystems should, at some point fill in every function
in the vop_default struct so we can get rid of the 'if'
statements in VOP_*.

Revision 1.76 / (download) - annotate - [select for diffs], Tue Dec 21 20:14:43 2010 UTC (13 years, 5 months ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.75: +37 -41 lines
Diff to previous 1.75 (colored)

Bring back the "End the VOP experiment." diff, naddy's issues where
unrelated, and his alpha is much happier now.

OK deraadt@

Revision 1.75 / (download) - annotate - [select for diffs], Fri Sep 10 16:34:08 2010 UTC (13 years, 9 months ago) by thib
Branch: MAIN
Changes since 1.74: +41 -37 lines
Diff to previous 1.74 (colored)

Backout the VOP diff until the issues naddy was seeing on alpha (gcc3)
have been resolved.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Sep 9 10:37:04 2010 UTC (13 years, 9 months ago) by thib
Branch: MAIN
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored)

Rename lookup/relookup to vfs_lookup/vfs_relookup.

OK oga@, beck@, matthew@

Revision 1.73 / (download) - annotate - [select for diffs], Mon Sep 6 23:44:10 2010 UTC (13 years, 9 months ago) by thib
Branch: MAIN
Changes since 1.72: +37 -41 lines
Diff to previous 1.72 (colored)

End the VOP experiment. Instead of the ridicolusly complicated operation
vector setup that has questionable features (that have, as far as I can
tell never been used in practice, atleast not in OpenBSD), remove all
the gunk and favor a simple struct full of function pointers that get
set directly by each of the filesystems.

Removes gobs of ugly code and makes things simpler by a magnitude.

The only downside of this is that we loose the vnoperate feature so
the spec/fifo operations of the filesystems need to be kept in sync
with specfs and fifofs, this is no big deal as the API it self is pretty
static.

Many thanks to armani@ who pulled an earlier version of this diff to
current after c2k10 and Gabriel Kihlman on tech@ for testing.

Liked by many. "come on, find your balls" deraadt@.

Revision 1.72 / (download) - annotate - [select for diffs], Fri Aug 14 11:35:03 2009 UTC (14 years, 10 months ago) by jasper
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.71: +11 -11 lines
Diff to previous 1.71 (colored)

- deregister; no binary change

ok thibski@

Revision 1.71 / (download) - annotate - [select for diffs], Thu Aug 13 22:34:29 2009 UTC (14 years, 10 months ago) by jasper
Branch: MAIN
Changes since 1.70: +29 -57 lines
Diff to previous 1.70 (colored)

- ansify function declarations, no binary change

"fine" thib@

Revision 1.70 / (download) - annotate - [select for diffs], Thu Aug 13 15:00:14 2009 UTC (14 years, 10 months ago) by jasper
Branch: MAIN
Changes since 1.69: +34 -34 lines
Diff to previous 1.69 (colored)

- remove super-obvious comments from $fs_vnodeop_entries[]

prodded by and ok thib@
agreed by art@ and blambert@

Revision 1.69 / (download) - annotate - [select for diffs], Thu Aug 13 12:20:52 2009 UTC (14 years, 10 months ago) by jasper
Branch: MAIN
Changes since 1.68: +2 -1 lines
Diff to previous 1.68 (colored)

- missing printf("\n"); after calling lockmgr_printinfo()

"do it" thib@

Revision 1.68 / (download) - annotate - [select for diffs], Sun Aug 9 21:58:00 2009 UTC (14 years, 10 months ago) by martynas
Branch: MAIN
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored)

indicate success for setting directory attributes;  first step towards
making directory moves work...  discussed w. & makes sense - millert@

Revision 1.67 / (download) - annotate - [select for diffs], Mon Jun 9 23:38:37 2008 UTC (16 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored)

Update access(2) to have modern semantics with respect to X_OK and
the superuser.  access(2) will now only indicate success for X_OK on
non-directories if there is at least one execute bit set on the file.
OK deraadt@ thib@ otto@

Revision 1.66 / (download) - annotate - [select for diffs], Thu May 8 17:45:45 2008 UTC (16 years, 1 month ago) by thib
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)

retire vn_default_error() and replace all instances
with eopnotsupp() instead;

ok blambert@

Revision 1.65 / (download) - annotate - [select for diffs], Mon Oct 29 15:39:01 2007 UTC (16 years, 7 months ago) by chl
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.64: +2 -3 lines
Diff to previous 1.64 (colored)

MALLOC/FREE -> malloc/free

ok krw@

Revision 1.64 / (download) - annotate - [select for diffs], Sat Jun 2 02:04:21 2007 UTC (17 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.63: +6 -7 lines
Diff to previous 1.63 (colored)

convert all daddr_t types to either daddr64_t or uint32_t or other such
things based on their use.  ok with fixes from tom, tested by grange too

Revision 1.63 / (download) - annotate - [select for diffs], Fri Jun 1 23:47:57 2007 UTC (17 years ago) by deraadt
Branch: MAIN
Changes since 1.62: +26 -140 lines
Diff to previous 1.62 (colored)

pedro ok'd this ~3500 line diff which removes the vop argument
"ap = v" comments in under 8 seconds, so it must be ok.  and it compiles
too.

Revision 1.62 / (download) - annotate - [select for diffs], Mon Apr 2 21:18:59 2007 UTC (17 years, 2 months ago) by pedro
Branch: MAIN
Changes since 1.61: +13 -3 lines
Diff to previous 1.61 (colored)

When running out of space to place a directory entry in msdosfs_readdir(),
save the correct offset in case the directory has support for long file
names, and return it to the caller so she can proceed from a valid point.
From Alexey Vatchenko, okay tedu@.

Revision 1.61 / (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.60: +3 -4 lines
Diff to previous 1.60 (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.60 / (download) - annotate - [select for diffs], Sun Mar 18 15:05:33 2007 UTC (17 years, 2 months ago) by mickey
Branch: MAIN
Changes since 1.59: +1 -17 lines
Diff to previous 1.59 (colored)

get rid of noop vop_reallocblks; pedro@ miod@ ok

Revision 1.59 / (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.58: +1 -2 lines
Diff to previous 1.58 (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.58 / (download) - annotate - [select for diffs], Mon Oct 16 11:27:53 2006 UTC (17 years, 7 months ago) by pedro
Branch: MAIN
Changes since 1.57: +2 -4 lines
Diff to previous 1.57 (colored)

Use daddr64_t for logical blocks, okay krw@ thib@ mickey@

Revision 1.57 / (download) - annotate - [select for diffs], Tue Oct 3 19:49:06 2006 UTC (17 years, 8 months ago) by pedro
Branch: MAIN
Changes since 1.56: +4 -3 lines
Diff to previous 1.56 (colored)

Introduce daddr64_t and use it for physical block numbers
Okay weingart@, "I'm game with putting my name on it" dlg@

Revision 1.53.4.1 / (download) - annotate - [select for diffs], Sat Jul 22 03:35:35 2006 UTC (17 years, 10 months ago) by brad
Branch: OPENBSD_3_8
Changes since 1.53: +5 -2 lines
Diff to previous 1.53 (colored) next main 1.54 (colored)

MFC:
Fixes by tom@ and pedro@

rev 1.56
Add missing cache_purge() in msdosfs_rename().

rev 1.54
When moving a directory to under a new parent, write the correct
cluster number into our . pointer.  This fixes filesystem corruption
seen under these circumstances.

ok tedu@

Revision 1.56 / (download) - annotate - [select for diffs], Thu Dec 1 22:13:33 2005 UTC (18 years, 6 months ago) by pedro
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.55: +4 -1 lines
Diff to previous 1.55 (colored)

Add missing cache_purge() in msdosfs_rename().
Spotted by tedu@, okay tom@ and tedu@.

Revision 1.55 / (download) - annotate - [select for diffs], Sat Nov 19 02:18:01 2005 UTC (18 years, 6 months ago) by pedro
Branch: MAIN
Changes since 1.54: +3 -4 lines
Diff to previous 1.54 (colored)

Remove unnecessary lockmgr() archaism that was costing too much in terms
of panics and bugfixes. Access curproc directly, do not expect a process
pointer as an argument. Should fix many "process context required" bugs.
Incentive and okay millert@, okay marc@. Various testing, thanks.

Revision 1.54 / (download) - annotate - [select for diffs], Sat Oct 8 09:38:22 2005 UTC (18 years, 8 months ago) by tom
Branch: MAIN
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

When moving a directory to under a new parent, write the correct
cluster number into our . pointer.  This fixes filesystem corruption
seen under these circumstances.

Testing nick@, krw@, ian@ and others - thanks.

"i agree" pedro@; "get it in" deraadt@

Revision 1.53 / (download) - annotate - [select for diffs], Mon Mar 14 22:31:52 2005 UTC (19 years, 3 months ago) by tom
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_7_BASE, OPENBSD_3_7
Branch point for: OPENBSD_3_8
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

Fix typo in comment

Revision 1.52 / (download) - annotate - [select for diffs], Wed Mar 2 00:44:12 2005 UTC (19 years, 3 months ago) by tom
Branch: MAIN
Changes since 1.51: +103 -41 lines
Diff to previous 1.51 (colored)

Add support for MS-DOS filesystems > 128 GB, by changing the way we
calculate fileids (fake inode numbers).  This uses some hash code by
Thomas Wang, who has agreed to the existing licence on the file (i.e.
his name just needed to be added to the copyright list).  Thanks.

Also a tiny bit of KNF.

Closes PR 4119; works for the OP Pawel Rogocz.

Help with testing todd@, thanks.

ok deraadt@

Revision 1.51 / (download) - annotate - [select for diffs], Tue Mar 1 14:29:01 2005 UTC (19 years, 3 months ago) by tom
Branch: MAIN
Changes since 1.50: +14 -6 lines
Diff to previous 1.50 (colored)

Fix an integer overflow that prevented us from reading files >= 2 GB
from MS-DOS filesystems.

Assistance otto@; thanks.

"looks ok" krw@; ok derradt@.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Mar 1 14:24:33 2005 UTC (19 years, 3 months ago) by tom
Branch: MAIN
Changes since 1.49: +5 -1 lines
Diff to previous 1.49 (colored)

The maximum file size on MS-DOS filesystems is 4 GB - 1 byte, so
don't bother trying to write files bigger than this.  Just return
EFBIG to caller, rather than panic()ing later.

Closes PR 4090.  Assistance from otto@, tested by OP and moritz@;
thanks.

ok tedu@ deraadt@

Revision 1.49 / (download) - annotate - [select for diffs], Tue Nov 30 12:39:43 2004 UTC (19 years, 6 months ago) by pedro
Branch: MAIN
Changes since 1.48: +6 -4 lines
Diff to previous 1.48 (colored)

kill breada(), from Sven Dehmlow. ok tedu@ millert@

Revision 1.48 / (download) - annotate - [select for diffs], Mon Nov 29 17:05:06 2004 UTC (19 years, 6 months ago) by grange
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

Don't use seltrue() in poll ops since it requires v_rdev dereferencing
which is not possible here. Problem found and fixed by form@.

ok millert@ fgsch@ pedro@

Revision 1.47 / (download) - annotate - [select for diffs], Sat Sep 18 22:01:18 2004 UTC (19 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

hierarchy is spelled hierarchy, from Jonathan Gray

Revision 1.46 / (download) - annotate - [select for diffs], Thu Jun 24 19:35:25 2004 UTC (19 years, 11 months ago) by tholo
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.45: +5 -5 lines
Diff to previous 1.45 (colored)

This moves access to wall and uptime variables in MI code,
encapsulating all such access into wall-defined functions
that makes sure locking is done as needed.

It also cleans up some uses of wall time vs. uptime some
places, but there is sure to be more of these needed as
well, particularily in MD code.  Also, many current calls
to microtime() should probably be changed to getmicrotime(),
or to the {,get}microuptime() versions.

ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others
"Oh, that is not your problem!" from miod@

Revision 1.21.6.11 / (download) - annotate - [select for diffs], Sat Jun 5 23:13:07 2004 UTC (20 years ago) by niklas
Branch: SMP
Changes since 1.21.6.10: +20 -19 lines
Diff to previous 1.21.6.10 (colored) to branchpoint 1.21 (colored) next main 1.22 (colored)

Merge with the trunk

Revision 1.45 / (download) - annotate - [select for diffs], Fri May 14 04:05:05 2004 UTC (20 years, 1 month ago) by tedu
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A
Changes since 1.44: +6 -5 lines
Diff to previous 1.44 (colored)

use pool for namei pathbuf.  testing ok millert@ tdeval@

Revision 1.44 / (download) - annotate - [select for diffs], Wed May 12 21:04:15 2004 UTC (20 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.43: +15 -15 lines
Diff to previous 1.43 (colored)

32 bit ints are uint32_t, not u_long.  works on 64bit now.  ok deraadt@

Revision 1.21.6.10 / (download) - annotate - [select for diffs], Thu Feb 19 10:57:20 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.21.6.9: +11 -14 lines
Diff to previous 1.21.6.9 (colored) to branchpoint 1.21 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.43 / (download) - annotate - [select for diffs], Thu Nov 13 17:19:40 2003 UTC (20 years, 7 months ago) by drahn
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Couple of typos in poll changes. ok millert@

Revision 1.42 / (download) - annotate - [select for diffs], Tue Sep 23 16:51:13 2003 UTC (20 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.41: +7 -10 lines
Diff to previous 1.41 (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.41 / (download) - annotate - [select for diffs], Fri Aug 15 20:32:19 2003 UTC (20 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.40: +4 -4 lines
Diff to previous 1.40 (colored)

change arguments to suser.  suser now takes the process, and a flags
argument.  old cred only calls user suser_ucred.  this will allow future
work to more flexibly implement the idea of a root process.  looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@  testing and further review miod@

Revision 1.34.2.3 / (download) - annotate - [select for diffs], Mon May 19 22:27:06 2003 UTC (21 years ago) by tedu
Branch: UBC
Changes since 1.34.2.2: +30 -8 lines
Diff to previous 1.34.2.2 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored)

sync

Revision 1.21.6.9 / (download) - annotate - [select for diffs], Tue May 13 19:21:30 2003 UTC (21 years, 1 month ago) by ho
Branch: SMP
Changes since 1.21.6.8: +30 -8 lines
Diff to previous 1.21.6.8 (colored) to branchpoint 1.21 (colored)

Sync the SMP branch to -current. This includes moving to ELF.

Revision 1.40 / (download) - annotate - [select for diffs], Wed May 7 22:16:26 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: UBC_SYNC_A
Changes since 1.39: +5 -3 lines
Diff to previous 1.39 (colored)

string cleaning; ok art tedu

Revision 1.39 / (download) - annotate - [select for diffs], Sat Apr 26 10:23:07 2003 UTC (21 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.38: +12 -4 lines
Diff to previous 1.38 (colored)

fix handling when renaming directories on fat32.  mv a/b . would mess up the
file system.

submitted by mpech@ in pr1675

Revision 1.38 / (download) - annotate - [select for diffs], Fri Apr 18 22:12:25 2003 UTC (21 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.37: +15 -3 lines
Diff to previous 1.37 (colored)

support for making directories +x without affecting normal files

ok millert@

Revision 1.21.6.8 / (download) - annotate - [select for diffs], Fri Mar 28 00:00:21 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.21.6.7: +3 -0 lines
Diff to previous 1.21.6.7 (colored) to branchpoint 1.21 (colored)

Sync the SMP branch with 3.3

Revision 1.34.2.2 / (download) - annotate - [select for diffs], Tue Jun 11 03:30:32 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.34.2.1: +5 -2 lines
Diff to previous 1.34.2.1 (colored) to branchpoint 1.34 (colored)

Sync UBC branch to -current

Revision 1.37 / (download) - annotate - [select for diffs], Fri May 24 08:54:24 2002 UTC (22 years ago) by art
Branch: MAIN
CVS Tags: UBC_SYNC_B, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.36: +4 -1 lines
Diff to previous 1.36 (colored)

protect biodone with splbio

Revision 1.21.6.7 / (download) - annotate - [select for diffs], Thu Mar 28 15:02:01 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.21.6.6: +2 -2 lines
Diff to previous 1.21.6.6 (colored) to branchpoint 1.21 (colored)

Merge in -current from roughly a week ago

Revision 1.36 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:09 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

First round of __P removal in sys

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

Merge in trunk

Revision 1.34.2.1 / (download) - annotate - [select for diffs], Sat Feb 2 03:28:26 2002 UTC (22 years, 4 months ago) by art
Branch: UBC
Changes since 1.34: +13 -35 lines
Diff to previous 1.34 (colored)

Merge in UBC performance changes from NetBSD.
Fix a bunch of merge errors from yesterday.

Revision 1.35 / (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.34: +108 -85 lines
Diff to previous 1.34 (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.34 / (download) - annotate - [select for diffs], Mon Dec 10 04:45:31 2001 UTC (22 years, 6 months ago) by art
Branch: MAIN
CVS Tags: UBC_BASE
Branch point for: UBC
Changes since 1.33: +2 -3 lines
Diff to previous 1.33 (colored)

Big cleanup inspired by NetBSD with some parts of the code from NetBSD.
 - get rid of VOP_BALLOCN and VOP_SIZE
 - move the generic getpages and putpages into miscfs/genfs
 - create a genfs_node which must be added to the top of the private portion
   of each vnode for filsystems that want to use genfs_{get,put}pages
 - rename genfs_mmap to vop_generic_mmap

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

Merge in struct uvm_vnode into struct vnode.

Revision 1.21.6.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.21.6.4: +86 -109 lines
Diff to previous 1.21.6.4 (colored) to branchpoint 1.21 (colored)

Merge in -current

Revision 1.32 / (download) - annotate - [select for diffs], Tue Dec 4 22:44:32 2001 UTC (22 years, 6 months ago) by art
Branch: MAIN
Changes since 1.31: +2 -1 lines
Diff to previous 1.31 (colored)

Readd VOP_MMAP, will be used soon. Right now it's just a question to
the filesystem if we're allowed to mmap the file.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Dec 2 18:30:30 2001 UTC (22 years, 6 months ago) by drahn
Branch: MAIN
Changes since 1.30: +3 -4 lines
Diff to previous 1.30 (colored)

Fix msdos filesystem read/write errors with large files, bug introduced
with UBC. part of fix from csapuntz@. ok art@

Revision 1.30 / (download) - annotate - [select for diffs], Wed Nov 28 23:28:32 2001 UTC (22 years, 6 months ago) by jakob
Branch: MAIN
Changes since 1.29: +4 -2 lines
Diff to previous 1.29 (colored)

don't generate an error if setting the gid/uid doesn't actually change
the gid/uid. among other things, this eliminates tons of warnings when
unpacking a tar file in an msdos fs. from NetBSD. ok millert@, fgs@.

Revision 1.29 / (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.28: +83 -107 lines
Diff to previous 1.28 (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.21.6.4 / (download) - annotate - [select for diffs], Tue Nov 13 23:04:24 2001 UTC (22 years, 7 months ago) by niklas
Branch: SMP
Changes since 1.21.6.3: +2 -2 lines
Diff to previous 1.21.6.3 (colored) to branchpoint 1.21 (colored)

merge in -current

Revision 1.28 / (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.27: +2 -2 lines
Diff to previous 1.27 (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.21.6.3 / (download) - annotate - [select for diffs], Wed Oct 31 03:26:30 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.21.6.2: +5 -17 lines
Diff to previous 1.21.6.2 (colored) to branchpoint 1.21 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.27 / (download) - annotate - [select for diffs], Thu Aug 23 13:52:35 2001 UTC (22 years, 9 months ago) by aaron
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

retreive -> retrieve

Revision 1.26 / (download) - annotate - [select for diffs], Thu Jul 26 01:53:09 2001 UTC (22 years, 10 months ago) by assar
Branch: MAIN
Changes since 1.25: +4 -16 lines
Diff to previous 1.25 (colored)

remove unused support for creating files and directories from
msdosfs_mknod.  ok'd by art

Revision 1.21.6.2 / (download) - annotate - [select for diffs], Wed Jul 4 10:49:27 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.21.6.1: +1 -88 lines
Diff to previous 1.21.6.1 (colored) to branchpoint 1.21 (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.25 / (download) - annotate - [select for diffs], Wed Jun 27 04:58:45 2001 UTC (22 years, 11 months ago) by art
Branch: MAIN
Changes since 1.24: +1 -9 lines
Diff to previous 1.24 (colored)

Remove old vm.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Jun 23 02:15:24 2001 UTC (22 years, 11 months ago) by csapuntz
Branch: MAIN
Changes since 1.23: +1 -80 lines
Diff to previous 1.23 (colored)

Get rid of several vnode operations

Revision 1.21.6.1 / (download) - annotate - [select for diffs], Mon May 14 22:32:59 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.21: +12 -17 lines
Diff to previous 1.21 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.23 / (download) - annotate - [select for diffs], Fri Feb 23 14:42:38 2001 UTC (23 years, 3 months ago) by csapuntz
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)



Remove the clustering fields from the vnodes and place them in the
file system inode instead

Revision 1.21.8.1 / (download) - annotate - [select for diffs], Fri Jun 9 05:22:16 2000 UTC (24 years ago) by jason
Branch: OPENBSD_2_7
Changes since 1.21: +10 -15 lines
Diff to previous 1.21 (colored) next main 1.22 (colored)

Pull in patch from current:
Errata:
Some operations in msdosfs could result in a system panic.
Fix (art):
Avoid superfluous vrele in msdosfs_rename.
fixes 1249.
From gluk@ptci.ru

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jun 7 15:04:06 2000 UTC (24 years ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.21: +10 -15 lines
Diff to previous 1.21 (colored)

Avoid superfluous vrele in msdosfs_rename.
fixes 1249.
From gluk@ptci.ru

Revision 1.21 / (download) - annotate - [select for diffs], Fri Feb 26 03:28:13 1999 UTC (25 years, 3 months ago) by art
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_7_BASE, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5
Branch point for: SMP, OPENBSD_2_7
Changes since 1.20: +9 -1 lines
Diff to previous 1.20 (colored)

compat with uvm vnode pager

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jan 11 05:12:28 1999 UTC (25 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

panic prints a newline for you, don't do it in the panic string

Revision 1.19 / (download) - annotate - [select for diffs], Sun Jan 10 23:21:19 1999 UTC (25 years, 5 months ago) by art
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

honor MNT_NOATIME. from FreeBSD

Revision 1.18 / (download) - annotate - [select for diffs], Thu Aug 6 19:34:54 1998 UTC (25 years, 10 months ago) by csapuntz
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.17: +3 -17 lines
Diff to previous 1.17 (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.17 / (download) - annotate - [select for diffs], Tue Jun 9 17:56:03 1998 UTC (26 years ago) by deraadt
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

the the

Revision 1.16 / (download) - annotate - [select for diffs], Mon Feb 23 20:10:39 1998 UTC (26 years, 3 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.15: +12 -10 lines
Diff to previous 1.15 (colored)

GAS 2.8 + KNF

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jan 11 20:39:10 1998 UTC (26 years, 5 months ago) by provos
Branch: MAIN
Changes since 1.14: +71 -39 lines
Diff to previous 1.14 (colored)

FAT32 support from NetBSD by Wolfgang Solfrank.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Nov 11 18:57:17 1997 UTC (26 years, 7 months ago) by niklas
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

Initialize the de_lock.  some KNF

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

Updates for VFS Lite 2 + soft update.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Oct 6 20:21:00 1997 UTC (26 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.11: +23 -33 lines
Diff to previous 1.11 (colored)

back out vfs lite2 till after 2.2

Revision 1.11 / (download) - annotate - [select for diffs], Mon Oct 6 15:22:40 1997 UTC (26 years, 8 months ago) by csapuntz
Branch: MAIN
Changes since 1.10: +34 -24 lines
Diff to previous 1.10 (colored)

VFS Lite2 Changes

Revision 1.10 / (download) - annotate - [select for diffs], Sat Oct 4 19:08:13 1997 UTC (26 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +19 -9 lines
Diff to previous 1.9 (colored)

cleanup timestamp code for NT/Win95; khym@bga.com

Revision 1.9 / (download) - annotate - [select for diffs], Thu Jul 3 17:49:53 1997 UTC (26 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +8 -3 lines
Diff to previous 1.8 (colored)

rm of dir returns EPERM; more careful about ..; netbsd

Revision 1.8 / (download) - annotate - [select for diffs], Sun Mar 2 18:02:01 1997 UTC (27 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.7: +107 -53 lines
Diff to previous 1.7 (colored)

Sync msdosfs with NetBSD sans const-ness.  NetSBD log messages:
    Fix panic on mkdir.
    Thanks to Dave Huang for finding the bug.
    Fixes a bug with allowed/forbidden characters in non-W95 filenames.
    Don't extend directory when nothing is written to it.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Oct 24 17:56:18 1996 UTC (27 years, 7 months ago) by tholo
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

<sys/dir.h> is for use as a compatibility interface only.  Warn if
included by kernel modules, and also remove use from any modules that
currently attempt to use it.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Oct 4 03:05:32 1996 UTC (27 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.5: +8 -8 lines
Diff to previous 1.5 (colored)

sync

Revision 1.5 / (download) - annotate - [select for diffs], Sun Apr 21 22:28:24 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.4: +11 -6 lines
Diff to previous 1.4 (colored)

partial sync with netbsd 960418, more to come

Revision 1.4 / (download) - annotate - [select for diffs], Fri Apr 19 16:10:03 1996 UTC (28 years, 1 month ago) by niklas
Branch: MAIN
Changes since 1.3: +4 -4 lines
Diff to previous 1.3 (colored)

NetBSD 960317 merge

Revision 1.3 / (download) - annotate - [select for diffs], Thu Feb 29 10:46:59 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.2: +218 -152 lines
Diff to previous 1.2 (colored)

From NetBSD: merge with 960217

Revision 1.2 / (download) - annotate - [select for diffs], Thu Dec 14 04:19:57 1995 UTC (28 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +199 -151 lines
Diff to previous 1.1 (colored)

from netbsd (mostly by ws):
Win95 ignores case on lookup
Really don't generate long names when mounted with -s
Fix cookie handling
Don't forward credentials to bread, it makes nfs panic
(Of course, nfs shouldn't rely on the credentials not being referenced)
Don't give directory entry to deget, it could result in a deadlock
Use device blocks, not clusters for logical block numbers
Add support for Win'95 separate creation/modification/access timestamps
Re-introduce lowercase filenames for non-Win'95-filesystems
Fix thinko with block boundaries in directories
Don't overwrite dirclust, it's needed later on
Enable flock(2).

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:53:04 1995 UTC (28 years, 8 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:53:04 1995 UTC (28 years, 8 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.