Home | History | Annotate | Download | only in ext2fs
History log of /src/sys/ufs/ext2fs/ext2fs_readwrite.c
RevisionDateAuthorComments
 1.79  19-Oct-2024  jakllsch ufs: base amount of data to sync on MAXPHYS instead of constant

No functional change except on sun2 and sun3, as ilog2(MAXPHYS) is the
same as the previous constant (16) on all other ports. On sun[23] this
changes amount written from 56KiB/8KiB to 2x 32KiB.
 1.78  20-Oct-2021  thorpej Overhaul of the EVFILT_VNODE kevent(2) filter:

- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
forcing each individual file system to deal with it (except VOP_RENAME(),
because VOP_RENAME() is a mess and we currently have 2 different ways
of handling it; at least it's reasonably well-centralized in the "new"
way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
to avoid doing work for events no one cares about (avoiding, e.g.
taking locks and traversing the klist to send a NOTE_WRITE when
someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
to be invoked before and after vop_pre() and vop_post(), respectively.
Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
vop_*_args structures. These context fields are used to convey information
between the file system VOP function and the VOP wrapper, but do not
occupy an argument slot in the VOP_*() call itself. These context fields
are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
back the resulting link count of the target vnode. Return this in tmpfs,
udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.
 1.77  23-Apr-2020  ad PR kern/54759 (vm.ubc_direct deadlock when read()/write() into mapping of itself)

- Add new flag UBC_ISMAPPED which tells ubc_uiomove() the object is mmap()ed
somewhere. Use it to decide whether to do direct-mapped copy, rather than
poking around directly in the vnode in ubc_uiomove(), which is ugly and
doesn't work for tmpfs. It would be nicer to contain all this in UVM but
the filesystem provides the needed locking here (VV_MAPPED) and to
reinvent that would suck more.

- Rename UBC_UNMAP_FLAG() to UBC_VNODE_FLAGS(). Pass in UBC_ISMAPPED where
appropriate.
 1.76  23-Feb-2020  ad branches: 1.76.4;
UVM locking changes, proposed on tech-kern:

- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart. v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap. Others to follow later.
 1.75  13-Aug-2016  christos branches: 1.75.16; 1.75.22;
KNF, no functional changes...
 1.74  28-Mar-2015  maxv Remove the 'cred' argument from bread(). Remove a now unused var in
ffs_snapshot.c. Update the man page accordingly.

ok hannken@
 1.73  28-Mar-2015  riastradh Let I/O errors override inode update errors in UFS.

Fixes tests/fs/vfs/t_io:read_fault for UFS.
 1.72  28-Mar-2015  maxv Remove the 'cred' argument from breadn(), and update the man page
accordingly.

ok hannken@
 1.71  28-Mar-2015  riastradh Factor out post-read/write inode updates in UFS.
 1.70  28-Mar-2015  riastradh Turn some `#if DIAGNOSTIC' into KASSERT.
 1.69  28-Mar-2015  riastradh Missed another spot, in ext2fs_write.
 1.68  28-Mar-2015  riastradh Missed a spot in ext2fs_read
 1.67  27-Mar-2015  riastradh Disentangle buffer-cached I/O from page-cached I/O in UFS.

Page-cached I/O is used for regular files, and is initiated by VFS
users such as userland and NFS.

Buffer-cached I/O is used for directories and symlinks, and is issued
only internally by UFS.

New UFS routine ufs_bufio replaces vn_rdwr for internal use.
ufs_bufio is implemented by new UFS operations uo_bufrd/uo_bufwr,
which sit in ufs_readwrite.c alongside the VOP_READ/VOP_WRITE
implementations.

I preserved the code as much as possible and will leave further
simplification for future commits. I kept the ulfs_readwrite.c
copypasta close to ufs_readwrite.c in case we ever want to merge them
back; likewise ext2fs_readwrite.c.

No externally visible semantic change. All atf fs tests still pass.
 1.66  09-Nov-2014  maxv branches: 1.66.2;
Do not uselessly include <sys/malloc.h>.
 1.65  12-Aug-2014  maxv http://m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-2

#04-0x02: Remove 'doclusterread' and 'doclusterwrite' (unused).
 1.64  23-Jun-2013  dholland branches: 1.64.8;
Stick ffs_, ext2_, chfs_, filecore_, cd9660_, or mfs_ in front of
the following symbols so as to disambiguate fully. (Christos already
did the lfs ones.)

lblkno
lblktosize
lfragtosize
numfrags
blkroundup
fragroundup
 1.63  19-Jun-2013  dholland Rename ambiguous macros:
MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE
NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR
INOPB -> FFS_INOPB, LFS_INOPB
INOPF -> FFS_INOPF, LFS_INOPF
blksize -> ffs_blksize, ext2_blksize, or lfs_blksize
sblksize -> ffs_blksize

These are not the only ambiguously defined filesystem macros, of
course, there's a pile more. I may not have found all the ambiguous
definitions of blksize(), too, as there are a lot of other things
called 'blksize' in the system.
 1.62  21-Nov-2012  jakllsch Write support for the Ext4 Read-only Compatible Feature "huge_file".

Primarily, this feature extends the inode block count field to 48 bits.
Additionally, this feature allows this field to be represented in file
system block size units rather than DEV_BSIZE units.
 1.61  29-Apr-2012  chs branches: 1.61.2;
change vflushbuf() to take the full FSYNC_* flags.
translate FSYNC_LAZY into PGO_LAZY for VOP_PUTPAGES() so that
genfs_do_io() can set the appropriate io priority for the I/O.
this is the first part of addressing PR 46325.
 1.60  17-Apr-2012  christos it is not an error if the kernel needs to clear the setuid/
setgid bit on write/chown/chgrp
 1.59  13-Mar-2012  elad Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.
 1.58  18-Nov-2011  christos branches: 1.58.4; 1.58.6;
Obey MNT_RELATIME, the only addition is that mkdir in ufs sets IN_ACCESS too.
 1.57  12-Jun-2011  rmind branches: 1.57.2;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.56  23-Apr-2010  pooka branches: 1.56.6;
Enforce RLIMIT_FSIZE before VOP_WRITE. This adds support to file
system drivers where it was missing from and fixes one buggy
implementation. The arguably weird semantics of the check are
maintained (v_size vs. va_bytes, overwrite).
 1.55  19-Oct-2009  bouyer branches: 1.55.2; 1.55.4;
Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.54  12-Sep-2009  tsutsui Migrate from u_intNN_t to uintNN_t.
 1.53  26-Nov-2008  pooka Rototill all remaining file systems to use ubc_uiomove() instead
of the ubc_alloc() - uiomove() - ubc_release() dance.
 1.52  16-May-2008  hannken branches: 1.52.4; 1.52.6;
Make sure all cached buffers with valid, not yet written data have been
run through copy-on-write. Call fscow_run() with valid data where possible.

The LP_UFSCOW hack is no longer needed to protect ffs_copyonwrite() against
endless recursion.

- Add a flag B_MODIFY to bread(), breada() and breadn(). If set the caller
intends to modify the buffer returned.

- Always run copy-on-write on buffers returned from ffs_balloc().

- Add new function ffs_getblk() that gets a buffer, assigns a new blkno,
may clear the buffer and runs copy-on-write. Process possible errors
from getblk() or fscow_run(). Part of PR kern/38664.

Welcome to 4.99.63

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>
 1.51  24-Apr-2008  ad branches: 1.51.2; 1.51.4;
Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
be sent from a hardware interrupt handler. Signal activity must be
deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.
 1.50  02-Jan-2008  ad branches: 1.50.6; 1.50.8;
Merge vmlocking2 to head.
 1.49  08-Dec-2007  pooka branches: 1.49.4;
Remove cn_lwp from struct componentname. curlwp should be used
from on. The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.
 1.48  08-Oct-2007  ad branches: 1.48.4; 1.48.6;
Merge ffs locking & brelse changes from the vmlocking branch.
 1.47  05-Jun-2007  yamt branches: 1.47.6; 1.47.8; 1.47.10;
improve post-ubc file overwrite performance in common cases.
ie. when it's safe, actually overwrite blocks rather than doing
read-modify-write.

also fixes PR/33152 and PR/36303.
 1.46  19-Apr-2007  yamt hold proclist_mutex when calling psignal().
 1.45  21-Feb-2007  thorpej branches: 1.45.4; 1.45.6;
Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.44  04-Jan-2007  elad branches: 1.44.2;
Consistent usage of KAUTH_GENERIC_ISSUSER.
 1.43  14-May-2006  elad branches: 1.43.8;
integrate kauth.
 1.42  01-Mar-2006  yamt branches: 1.42.2; 1.42.4; 1.42.6;
merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
the latter is more natural to specify an address space.
(and less likely to be abused for random purposes.)
- fix a swdmover race.
 1.41  14-Jan-2006  christos branches: 1.41.2; 1.41.4;
Protect against uio_lwp being NULL from Pavel Cahyna
 1.40  11-Dec-2005  christos branches: 1.40.2;
merge ktrace-lwp.
 1.39  29-Nov-2005  yamt merge yamt-readahead branch.
 1.38  02-Nov-2005  yamt branches: 1.38.2;
merge yamt-vop branch. remove following VOPs.

VOP_BLKATOFF
VOP_VALLOC
VOP_BALLOC
VOP_REALLOCBLKS
VOP_VFREE
VOP_TRUNCATE
VOP_UPDATE
 1.37  30-Aug-2005  xtraeme branches: 1.37.2;
* Remove __P()
* Use ANSI function declarations on ext2fs and mfs
 1.36  09-Feb-2005  ws branches: 1.36.6;
Add support for large files (>2GB).
Like Linux, automagically convert old filesystem to use this,
if they are already at revision 1.
For revision 0, just punt (unlike Linux; makes me a bit too nervous.)

There should be an option to fsck_ext2fs to upgrade revision 0 to revision 1.

Reviewd by Manuel (bouyer@).
 1.35  09-Jan-2005  chs branches: 1.35.2; 1.35.4;
adjust the UBC mapping code to support non-vnode uvm_objects.
this means we can no longer look at the vnode size to determine how many
pages to request in a fault, which is good since for NFS the size can change
out from under us on the server anyway. there's also a new flag UBC_UNMAP
for ubc_release(), so that the file system code can make the decision about
whether to cache mappings for files being used as executables.
 1.34  14-Nov-2004  christos Remove erroneous KASSERT; i_size is one of the fields mentioned in
<ufs/inode.h> as unused by ext2fs.
 1.33  15-Aug-2004  mycroft Fixing age old cruft:
* Rather than using mnt_maxsymlinklen to indicate that a file systems returns
d_type fields(!), add a new internal flag, IMNT_DTYPE.

Add 3 new elements to ufsmount:
* um_maxsymlinklen, replaces mnt_maxsymlinklen (which never should have existed
in the first place).
* um_dirblksiz, which tracks the current directory block size, eliminating the
FS-specific checks littered throughout the code. This may be used later to
make the block size variable.
* um_maxfilesize, which is the maximum file size, possibly adjusted lower due
to implementation issues.

Sync some bug fixes from FFS into ext2fs, particularly:
* ffs_lookup.c 1.21, 1.28, 1.33, 1.48
* ffs_inode.c 1.43, 1.44, 1.45, 1.66, 1.67
* ffs_vnops.c 1.84, 1.85, 1.86

Clean up some crappy pointer frobnication.
 1.32  22-Mar-2004  bouyer Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.31  05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.30  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.29  29-Jun-2003  fvdl branches: 1.29.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.28  28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.27  24-Jan-2003  fvdl Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
 1.26  23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.25  22-Sep-2002  jdolecek don't need <sys/conf.h> here
 1.24  25-Mar-2002  chs if the size argument to write(2) is 0, do not modify the file in any way,
including updating timestamps. required for standards conformance.
 1.23  17-Mar-2002  chs don't do any flush-behind for async mounts.
this matches the traditional behaviour.
 1.22  30-Nov-2001  chs VOP_PUTPAGES() requires page-aligned offsets, so be sure to provide such.
fixes PR 14759.

(while I'm here, call VOP_PUTPAGES() directly instead of indirecting through
the UVM pager op vector.)
 1.21  10-Nov-2001  chs track some changes in the ufs code:
update UVM's notion of the file size in *_write() rather than
*_balloc().
 1.20  08-Nov-2001  lukem add RCSID
 1.19  26-Oct-2001  lukem remove #include <ufs/ufs/quota.h> where it was just to appease
<ufs/ufs/inode.h>, since the latter now includes the former. leave the former
in source that obviously uses specific bits of it (for completeness.)
 1.18  22-Sep-2001  chs branches: 1.18.2;
check early for reads beyond EOF.
 1.17  15-Sep-2001  chs a whole bunch of changes to improve performance and robustness under load:

- remove special treatment of pager_map mappings in pmaps. this is
required now, since I've removed the globals that expose the address range.
pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
no longer any need to special-case it.
- eliminate struct uvm_vnode by moving its fields into struct vnode.
- rewrite the pageout path. the pager is now responsible for handling the
high-level requests instead of only getting control after a bunch of work
has already been done on its behalf. this will allow us to UBCify LFS,
which needs tighter control over its pages than other filesystems do.
writing a page to disk no longer requires making it read-only, which
allows us to write wired pages without causing all kinds of havoc.
- use a new PG_PAGEOUT flag to indicate that a page should be freed
on behalf of the pagedaemon when it's unlocked. this flag is very similar
to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
pageout fails due to eg. an indirect-block buffer being locked.
this allows us to remove the "version" field from struct vm_page,
and together with shrinking "loan_count" from 32 bits to 16,
struct vm_page is now 4 bytes smaller.
- no longer use PG_RELEASED for swap-backed pages. if the page is busy
because it's being paged out, we can't release the swap slot to be
reallocated until that write is complete, but unlike with vnodes we
don't keep a count of in-progress writes so there's no good way to
know when the write is done. instead, when we need to free a busy
swap-backed page, just sleep until we can get it busy ourselves.
- implement a fast-path for extending writes which allows us to avoid
zeroing new pages. this substantially reduces cpu usage.
- encapsulate the data used by the genfs code in a struct genfs_node,
which must be the first element of the filesystem-specific vnode data
for filesystems which use genfs_{get,put}pages().
- eliminate many of the UVM pagerops, since they aren't needed anymore
now that the pager "put" operation is a higher-level operation.
- enhance the genfs code to allow NFS to use the genfs_{get,put}pages
instead of a modified copy.
- clean up struct vnode by removing all the fields that used to be used by
the vfs_cluster.c code (which we don't use anymore with UBC).
- remove kmem_object and mb_object since they were useless.
instead of allocating pages to these objects, we now just allocate
pages with no object. such pages are mapped in the kernel until they
are freed, so we can use the mapping to find the page to free it.
this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.
 1.16  27-Feb-2001  chs branches: 1.16.2; 1.16.6; 1.16.8;
min() -> MIN(), max() -> MAX().
fixes more problems with file offsets > 4GB.
 1.15  01-Dec-2000  chs fix merge error: ext2fs uses a custom balloc rather than a VOP-style one.
 1.14  27-Nov-2000  chs Initial integration of the Unified Buffer Cache project.
 1.13  28-Jun-2000  mrg remove include of <vm/vm.h> and <uvm/uvm_extern.h>
 1.12  13-May-2000  perseant Change the sementics of the last parameter from a boolean ("waitfor") to
a set of flags ("flags"). Two flags are defined, UPDATE_WAIT and
UPDATE_DIROP.

Under the old semantics, VOP_UPDATE would block if waitfor were set,
under the assumption that directory operations should be done
synchronously. At least LFS and FFS+softdep do not make this
assumption; FFS+softdep got around the problem by enclosing all relevant
calls to VOP_UPDATE in a "if(!DOINGSOFTDEP(vp))", while LFS simply
ignored waitfor, one of the reasons why NFS-serving an LFS filesystem
did not work properly.

Under the new semantics, the UPDATE_DIROP flag is a hint to the
fs-specific update routine that the call comes from a dirop routine, and
should be wait for, or not, accordingly.

Closes PR#8996.
 1.11  30-Mar-2000  augustss Remove register declarations.
 1.10  24-Mar-1999  mrg branches: 1.10.4; 1.10.8;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.9  05-Mar-1999  mycroft Pass null pointers to VOP_UPDATE rather than having all the callers fetch the
current time themselves.
 1.8  29-Sep-1998  bouyer #include opt_uvm.h only if _KENREL and !_LKM
Make ext2fs_init() call ufs_init(). it was doing the init by itself,
testing for extern done != 0. This bug was hidden by the fact that
ext2fs_init() is called before ffs_init().
 1.7  02-Aug-1998  kleink Implement support for IEEE Std 1003.1b-1993 synchronous I/O:
* in the read vnode operator, check for IO_SYNC being set in the ioflag and
synchronously update the file's meta-data if appropriate.
* in the write vnode operator, update the appropriate checks for IO_SYNC being
set in the ioflag to reflect that IO_DSYNC is now inclusive-or'ed into
IO_SYNC, and require all IO_SYNC bits to be set for operations defined by
synchronized I/O file integrity completion but not by synchronized I/O data
integrity completion.
 1.6  01-Mar-1998  fvdl Merge with Lite2 + local changes
 1.5  10-Feb-1998  mrg - add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.
 1.4  05-Feb-1998  mrg initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code. i provided some help
getting swap and paging working, and other bug fixes/ideas. chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly. :-)
 1.3  23-Oct-1997  bouyer Uses ext2fs_vinit not ufs_vinit.
In ext2fs, an inode is deleted either when mode == 0 or dtime != 0. If
dtime != 0, reset others fields before using the inode, or we could end
up with the wrong v_op in ext2fs_vinit.
While I'm there, kill a unused variable in ext2fs_readwrite
 1.2  04-Jul-1997  drochner branches: 1.2.6;
Don't cast 64bit (off_t) file sizes to vm_offset_t (32bit on many
architectures), truncate them intelligently instead.
The truncation is done centralized in vnode_pager.c.
This prevents from wrap-over effects when parts of large (>2^32 byte) files
are mmapped.
Don't allow to mmap above the numerical range of vm_offset_t.
This is considered a temporary solution until the vm system handles the
object sizes/offsets more cleanly.
 1.1  11-Jun-1997  bouyer The ext2fs layer, based on the ffs/ufs one. Uses a few functions from
sys/ufs/ufs/
 1.2.6.1  24-Oct-1997  thorpej Pull up from trunk: kill an unused variable.
 1.10.8.3  12-Mar-2001  bouyer Sync with HEAD.
 1.10.8.2  08-Dec-2000  bouyer Sync with HEAD.
 1.10.8.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.10.4.2  06-Aug-1999  chs UBCify.
 1.10.4.1  11-Jul-1999  chs remove uvm_vnp_uncache(), it's no longer needed.
 1.16.8.1  01-Oct-2001  fvdl Catch up with -current.
 1.16.6.4  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.16.6.3  26-Sep-2002  jdolecek add support for kevents - sprikle VN_KNOTE() and add genfs_kqfilter()
to vnode ops; basically same thing as in ufs_readwrite.c and ufs_vnops.c
 1.16.6.2  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.16.6.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.16.2.7  11-Nov-2002  nathanw Catch up to -current
 1.16.2.6  18-Oct-2002  nathanw Catch up to -current.
 1.16.2.5  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.16.2.4  08-Jan-2002  nathanw Catch up to -current.
 1.16.2.3  14-Nov-2001  nathanw Catch up to -current.
 1.16.2.2  26-Sep-2001  nathanw Catch up to -current.
Again.
 1.16.2.1  21-Sep-2001  nathanw Catch up to -current.
 1.18.2.1  12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.29.2.10  11-Dec-2005  christos Sync with head.
 1.29.2.9  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.29.2.8  15-Feb-2005  skrll Sync with HEAD.
 1.29.2.7  17-Jan-2005  skrll Sync with HEAD.
 1.29.2.6  29-Nov-2004  skrll Sync with HEAD.
 1.29.2.5  21-Sep-2004  skrll Fix the sync with head I botched.
 1.29.2.4  18-Sep-2004  skrll Sync with HEAD.
 1.29.2.3  25-Aug-2004  skrll Sync with HEAD.
 1.29.2.2  03-Aug-2004  skrll Sync with HEAD
 1.29.2.1  02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.35.4.1  12-Feb-2005  yamt sync with head.
 1.35.2.1  29-Apr-2005  kent sync with -current
 1.36.6.5  21-Jan-2008  yamt sync with head
 1.36.6.4  27-Oct-2007  yamt sync with head.
 1.36.6.3  03-Sep-2007  yamt sync with head.
 1.36.6.2  26-Feb-2007  yamt sync with head.
 1.36.6.1  21-Jun-2006  yamt sync with head.
 1.37.2.1  20-Oct-2005  yamt adapt ufs.
 1.38.2.6  22-Nov-2005  yamt revert a whitespace change.
 1.38.2.5  19-Nov-2005  yamt - as read-ahead context is per-vnode now,
there are less reasons to make VOP_READ call uvm_ra_request explicitly.
move it to pager (uvn_get) so that it can handle accesses via mmap as well.
- pass advice to pager via ubc.
- tweak DPRINTF.

XXX can be disturbed by PGO_LOCKED.

XXX it's controversial where it should be done.
(uvm_fault, uvn_get or genfs_getpages.)
 1.38.2.4  19-Nov-2005  yamt - finish reverting VOP_READ prototype changes.
- remove unused variables.
- fix typos.
some of them are pointed by Juan RP.
 1.38.2.3  18-Nov-2005  yamt - associate read-ahead context to vnode, rather than file.
- revert VOP_READ prototype.
 1.38.2.2  15-Nov-2005  yamt add missing include.
 1.38.2.1  15-Nov-2005  yamt - adapt to the new prototype of VOP_READ.
- adapt ext2fs and union.
 1.40.2.3  18-Feb-2006  yamt fix proc/lwp mismatch.
 1.40.2.2  15-Jan-2006  yamt convert the rest of ufs.
 1.40.2.1  15-Jan-2006  yamt sync with head.
 1.41.4.2  01-Jun-2006  kardel Sync with head.
 1.41.4.1  22-Apr-2006  simonb Sync with head.
 1.41.2.1  09-Sep-2006  rpaulo sync with head
 1.42.6.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.42.4.2  06-May-2006  christos - Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
that need it.

Approved by core.
 1.42.4.1  08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.42.2.1  24-May-2006  yamt sync with head.
 1.43.8.1  12-Jan-2007  ad Sync with head.
 1.44.2.2  07-May-2007  yamt sync with head.
 1.44.2.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.45.6.1  11-Jul-2007  mjf Sync with head.
 1.45.4.4  09-Jun-2007  ad Sync with head.
 1.45.4.3  08-Jun-2007  ad Sync with head.
 1.45.4.2  13-May-2007  ad - Pass the error number and residual count to biodone(), and let it handle
setting error indicators. Prepare to eliminate B_ERROR.
- Add a flag argument to brelse() to be set into the buf's flags, instead
of doing it directly. Typically used to set B_INVAL.
- Add a "struct cpu_info *" argument to kthread_create(), to be used to
create bound threads. Change "bool mpsafe" to "int flags".
- Allow exit of LWPs in the IDL state when (l != curlwp).
- More locking fixes & conversion to the new API.
 1.45.4.1  05-Apr-2007  ad Compile fixes.
 1.47.10.1  14-Oct-2007  yamt sync with head.
 1.47.8.2  09-Jan-2008  matt sync with HEAD
 1.47.8.1  06-Nov-2007  matt sync with HEAD
 1.47.6.2  09-Dec-2007  jmcneill Sync with HEAD.
 1.47.6.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.48.6.2  26-Dec-2007  ad Sync with head.
 1.48.6.1  04-Dec-2007  ad Pull the vmlocking changes into a new branch.
 1.48.4.1  18-Feb-2008  mjf Sync with HEAD.
 1.49.4.1  02-Jan-2008  bouyer Sync with HEAD
 1.50.8.1  18-May-2008  yamt sync with head.
 1.50.6.2  17-Jan-2009  mjf Sync with HEAD.
 1.50.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.51.4.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.51.2.4  11-Aug-2010  yamt sync with head.
 1.51.2.3  11-Mar-2010  yamt sync with head
 1.51.2.2  16-Sep-2009  yamt sync with head
 1.51.2.1  04-May-2009  yamt sync with head.
 1.52.6.1  19-Jan-2009  skrll Sync with HEAD.
 1.52.4.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.55.4.2  30-May-2010  rmind sync with head
 1.55.4.1  16-Mar-2010  rmind Change struct uvm_object::vmobjlock to be dynamically allocated with
mutex_obj_alloc(). It allows us to share the locks among UVM objects.
 1.55.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.56.6.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.57.2.4  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.57.2.3  16-Jan-2013  yamt sync with (a bit old) head
 1.57.2.2  23-May-2012  yamt sync with head.
 1.57.2.1  17-Apr-2012  yamt sync with head
 1.58.6.1  07-May-2012  riz Pull up following revision(s) (requested by chs in ticket #204):
sys/fs/sysvbfs/sysvbfs_vnops.c: revision 1.44
sys/ufs/ffs/ffs_vfsops.c: revision 1.277
sys/fs/v7fs/v7fs_vnops.c: revision 1.11
sys/ufs/chfs/chfs_vnops.c: revision 1.7
sys/ufs/ext2fs/ext2fs_readwrite.c: revision 1.61
sys/miscfs/genfs/genfs_io.c: revision 1.54
sys/kern/vfs_wapbl.c: revision 1.52
sys/uvm/uvm_pager.h: revision 1.43
sys/ufs/ffs/ffs_vnops.c: revision 1.121
sys/kern/vfs_subr.c: revision 1.434
sys/fs/msdosfs/msdosfs_vnops.c: revision 1.83
sys/fs/ntfs/ntfs_vnops.c: revision 1.51
sys/fs/udf/udf_subr.c: revision 1.119
sys/miscfs/specfs/spec_vnops.c: revision 1.135
sys/ufs/ext2fs/ext2fs_vnops.c: revision 1.103
sys/fs/udf/udf_vnops.c: revision 1.71
sys/ufs/ufs/ufs_readwrite.c: revision 1.104
change vflushbuf() to take the full FSYNC_* flags.
translate FSYNC_LAZY into PGO_LAZY for VOP_PUTPAGES() so that
genfs_do_io() can set the appropriate io priority for the I/O.
this is the first part of addressing PR 46325.
mark all wapbl I/O as BPRIO_TIMECRITICAL.
this is the second part of addressing PR 46325.
 1.58.4.3  02-Jun-2012  mrg sync to latest -current.
 1.58.4.2  29-Apr-2012  mrg sync to latest -current.
 1.58.4.1  05-Apr-2012  mrg sync to latest -current.
 1.61.2.4  03-Dec-2017  jdolecek update from HEAD
 1.61.2.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.61.2.2  23-Jun-2013  tls resync from head
 1.61.2.1  25-Feb-2013  tls resync with head
 1.64.8.2  17-Jan-2015  martin Pull up following revision(s) (requested by maxv in ticket #427):
sys/compat/svr4/svr4_schedctl.c: revision 1.8
sys/netinet/tcp_timer.c: revision 1.88
sys/miscfs/genfs/layer_vfsops.c: revision 1.45
sys/compat/svr4/svr4_ioctl.c: revision 1.37
sys/ufs/chfs/chfs_vfsops.c: revision 1.14
sys/miscfs/fdesc/fdesc_vfsops.c: revision 1.91
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.30
sys/compat/common/kern_time_50.c: revision 1.28
sys/netinet6/ip6_forward.c: revision 1.74
sys/miscfs/umapfs/umap_vnops.c: revision 1.57
sys/compat/svr4/svr4_fcntl.c: revision 1.74
distrib/sets/lists/comp/mi: revision 1.1931
sys/netinet6/udp6_output.c: revision 1.46
sys/fs/puffs/puffs_compat.c: revision 1.3
sys/fs/udf/udf_rename.c: revision 1.11
sys/compat/svr4/svr4_filio.c: revision 1.24
sys/fs/udf/udf_rename.c: revision 1.12
sys/netinet/tcp_usrreq.c: revision 1.202
sys/miscfs/umapfs/umap_subr.c: revision 1.29
sys/compat/linux/common/linux_fadvise64.c: revision 1.3
sys/netinet/if_atm.c: revision 1.34
sys/miscfs/procfs/procfs_subr.c: revision 1.106
sys/miscfs/genfs/layer_subr.c: revision 1.37
sys/netinet/tcp_sack.c: revision 1.30
sys/compat/freebsd/freebsd_misc.c: revision 1.33
sys/compat/freebsd/freebsd_file.c: revision 1.33
sys/ufs/chfs/chfs_vnode.c: revision 1.12
sys/compat/svr4/svr4_ttold.c: revision 1.34
sys/compat/linux/common/linux_file.c: revision 1.114
sys/compat/linux/arch/mips/linux_machdep.c: revision 1.43
sys/compat/linux/common/linux_signal.c: revision 1.76
sys/compat/common/compat_util.c: revision 1.46
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.18
sys/compat/svr4/svr4_sockio.c: revision 1.36
sys/compat/linux/arch/arm/linux_machdep.c: revision 1.32
sys/compat/svr4/svr4_signal.c: revision 1.66
sys/kern/kern_exec.c: revision 1.410
sys/fs/puffs/puffs_vfsops.c: revision 1.115
sys/compat/svr4/svr4_exec_elf64.c: revision 1.15
sys/compat/linux/arch/i386/linux_machdep.c: revision 1.159
sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.50
sys/compat/linux32/common/linux32_misc.c: revision 1.24
sys/netinet/in_pcb.c: revision 1.153
sys/sys/malloc.h: revision 1.116
sys/compat/common/if_43.c: revision 1.9
share/man/man9/Makefile: revision 1.380
sys/netinet/tcp_vtw.c: revision 1.12
sys/miscfs/umapfs/umap_vfsops.c: revision 1.95
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.186
sys/compat/common/uipc_syscalls_43.c: revision 1.46
sys/ufs/ext2fs/ext2fs_vnops.c: revision 1.115
sys/fs/puffs/puffs_msgif.c: revision 1.97
sys/compat/svr4/svr4_ipc.c: revision 1.27
sys/compat/linux/common/linux_exec.c: revision 1.117
sys/ufs/ext2fs/ext2fs_readwrite.c: revision 1.66
sys/netinet/tcp_output.c: revision 1.179
sys/compat/svr4/svr4_termios.c: revision 1.28
sys/fs/udf/udf_strat_bootstrap.c: revision 1.4
sys/fs/puffs/puffs_subr.c: revision 1.67
sys/fs/puffs/puffs_node.c: revision 1.36
sys/miscfs/overlay/overlay_vnops.c: revision 1.21
sys/fs/cd9660/cd9660_node.c: revision 1.34
sys/netinet/raw_ip.c: revision 1.146
sys/sys/mallocvar.h: revision 1.13
sys/miscfs/overlay/overlay_vfsops.c: revision 1.63
share/man/man9/malloc.9: revision 1.50
sys/netinet6/dest6.c: revision 1.18
sys/compat/linux/common/linux_uselib.c: revision 1.33
sys/compat/linux/common/linux_socket.c: revision 1.120
share/man/man9/malloc.9: revision 1.51
sys/netinet/tcp_subr.c: revision 1.257
sys/compat/linux/common/linux_socketcall.c: revision 1.45
sys/compat/linux/common/linux_fadvise64_64.c: revision 1.3
sys/compat/freebsd/freebsd_ipc.c: revision 1.17
sys/compat/linux/common/linux_misc_notalpha.c: revision 1.109
sys/compat/linux/arch/alpha/linux_pipe.c: revision 1.17
sys/netinet6/in6_pcb.c: revision 1.132
sys/netinet6/in6_ifattach.c: revision 1.94
sys/compat/svr4/svr4_exec_elf32.c: revision 1.15
sys/miscfs/nullfs/null_vfsops.c: revision 1.90
sys/fs/cd9660/cd9660_util.c: revision 1.12
sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.48
sys/compat/freebsd/freebsd_exec_elf32.c: revision 1.20
sys/miscfs/procfs/procfs_vfsops.c: revision 1.94
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.28
sys/compat/linux/common/linux_sched.c: revision 1.67
sys/compat/linux/common/linux_exec_aout.c: revision 1.67
sys/compat/linux/common/linux_pipe.c: revision 1.67
sys/compat/linux/common/linux_llseek.c: revision 1.34
sys/compat/linux/arch/mips/linux_ptrace.c: revision 1.10
Do not uselessly include <sys/malloc.h>.
Cleanup:
- remove struct kmembuckets (dead)
- correctly deadify MALLOC_XX
- remove MALLOC_DEFINE_LIMIT and MALLOC_JUSTDEFINE_LIMIT (dead)
- remove malloc_roundup(), malloc_type_setlimit(), MALLOC_DEFINE_LIMIT()
and MALLOC_JUSTDEFINE_LIMIT() from man 9 malloc
New sentence, new line. Bump date for previous.
Obsolete malloc_roundup(9), malloc_type_setlimit(9) and MALLOC_DEFINE_LIMIT(9)
man pages.
 1.64.8.1  20-Oct-2014  martin Pullup the following revisions, requested by maxv in ticket #148:

sys/compat/svr4/svr4_stat.c 1.70
sys/dev/dm/dm_target_snapshot.c 1.17
sys/dev/if_ndis/if_ndis_pci.c 1.20
sys/fs/smbfs/smbfs_smb.c 1.45
sys/ufs/ext2fs/ext2fs_readwrite.c 1.65

Various fixes: two memory leaks, a typo, a dead compiler condition and
unused macros, respectively in if_ndis and dm, smbfs, svr4 and ext2fs.
 1.66.2.2  05-Oct-2016  skrll Sync with HEAD
 1.66.2.1  06-Apr-2015  skrll Sync with HEAD
 1.75.22.1  29-Feb-2020  ad Sync with head.
 1.75.16.1  08-Apr-2020  martin Merge changes from current as of 20200406
 1.76.4.1  25-Apr-2020  bouyer Sync with bouyer-xenpvh-base2 (HEAD)

RSS XML Feed