Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
the same semantics as NetBSD anyway, so it's good to avoid name collissions.
- Always fdremove before freeing the file, not the other way around.
- falloc FREFs the file.
- have FILE_SET_MATURE FRELE the file (It feels like a good ortogonality to
falloc FREFing the file).
- Use closef as much as possible instead of ffree in error paths of
falloc:ing functions. closef is much more careful with the fd and can
deal with the fd being forcibly closed by dup2. Also try to avoid
manually calling *fo_close when closef can do that for us (this makes
some error paths mroe complicated (sys_socketpair and sys_pipe), but
others become simpler (sys_open)).
|
|
from fd tables and other long-lived objects). This is to avoid races between
using a file descriptor and having another process (with shared fd table)
close it. We use a separate refence count so that error values from close(2)
will be correctly returned to the caller of close(2).
The macros for those reference counts are FILE_USE(fp) and FILE_UNUSE(fp).
Make sure that the cases where closef can be called "incorrectly" (most notably
dup2(2)) are handled.
Right now only callers of closef (and {,p}read) use FILE_{,UN}USE correctly,
more fixes incoming soon.
|
|
In some cases that could cause dupfdopen->fd_getfile to access freed memory
setting fd_ofiles[fd] to NULL is not a solution because that would cause
a race condition.
Free the new file after dupfdopen and use closef (because it will be necessary
in the future.
XXX - consider more cleanup of the code around dupfdopen.
|
|
to detect whether the path passed in from userland is too long.
Based on a patch from peterw AT ifost.org.au.
|
|
|
|
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.
|
|
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.
|
|
(Look ma, I might have broken the tree)
|
|
any anyone. Every caller of falloc matures the fd when it's usable.
- Since every lookup in the fd table must now check this flag and all of
them do the same thing, move all the necessary checks into a function -
fd_getfile.
|
|
A simple mknod at causes a kernel panic (uvm_fault).
|
|
refed, so that the caller can actually use it. update callers and
file systems that implement these vnode operations
ok'd by art
|
|
|
|
|
|
|
|
Create COMPAT_23 and move __osemctl, omsgctl, oshmctl there.
|
|
kern_ipc_10.c for other compat modules.
|
|
|
|
|
|
consistency with syscallargs.h as well as sys_lseek.
|
|
and otherwise are disabled.
art@ ok.
|
|
|
|
Snapshot-related code has been commented out.
|
|
|
|
fsync; art@ ok.
|
|
|
|
|
|
|
|
(sys_fhopen, sys_fhstat, sys_fhstatfs): new system calls that use file
handles instead of file names. largely based on NetBSD
|
|
|
|
Require that the mount point is vfs_busy on entry to dounmount.
|
|
even if they happen to own them at the moment.
|
|
sure that the fd_freefile hints stay in sync, otherwise free file
descriptors might not be overlooked by fdalloc(); ok millert@
|
|
fstatfs(2), and getfsstat(2) so you will need to build a new kernel
before doing a "make build" or you will get "unimplemented syscall" errors.
The new struct statfs has the following featuires:
o Has a u_int32_t flags field--now softdep can have a real flag.
o Uses u_int32_t instead of longs (nicer on the alpha). Note: the man
page used to lie about setting invalid/unused fields to -1. SunOS does
that but our code never has.
o Gets rid of f_type completely. It hasn't been used since NetBSD 0.9
and having it there but always 0 is confusing. It is conceivable
that this may cause some old code to not compile but that is better
than silently breaking.
o Adds a mount_info union that contains the FSTYPE_args struct. This
means that "mount" can now tell you all the options a filesystem was
mounted with. This is especially nice for NFS.
Other changes:
o The linux statfs emulation didn't convert between BSD fs names
and linux f_type numbers. Now it does, since the BSD f_type
number is useless to linux apps (and has been removed anyway)
o FreeBSD's struct statfs is different from our (both old and new)
and thus needs conversion. Previously, the OpenBSD syscalls
were used without any real translation.
o mount(8) will now show extra info when invoked with no arguments.
However, to see *everything* you need to use the -v (verbose) flag.
|
|
|
|
|
|
and the typenum is out of range
|
|
|
|
|
|
|
|
|
|
This is what most mount_* expect.
|
|
- Check for MNT_UNMOUNT before doing the actual unmount. It shouldn't
matter for normal unmounts that go through sys_unmount, because they
won't be able to do a lookup on the mountpoint when it's being unmounted,
but mfs calls dounmount directly (and there was still a race).
- clear the MNT_UNMOUNT flag after reenabling the lock (almost impossible
race).
- clear the MNT_MWAIT flag after doing a wakeup on the mountpoint.
|
|
Integrate cleaner ffs mount code from FreeBSD. Most notably, this mount
code prevents you from mounting an unclean file system read-write.
|
|
|