| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
aplomb. 16 lines of 'C' can be so hard to grok at a glance.
Prompted to look more closely at those 16 lines by mpi@.
|
|
|
|
|
|
|
|
| |
possibility. i.e. when bailing out before calling hashinit()..
COVERITY 1452907
ok mpi@
|
|
|
|
| |
OK visa@
|
| |
|
|
|
|
|
|
| |
unnecessary because curproc always does the locking.
OK mpi@
|
|
|
|
|
|
|
| |
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.
OK mpi@, deraadt@
|
|
|
|
|
|
|
|
| |
to appease WITNESS. ext2fs and ffs already use the flag. The same
locking pattern appears with other file systems too, so this patch
addresses the remaining cases.
OK mpi@
|
|
|
|
|
|
|
|
|
|
| |
are pushed to disk. Dangling vnodes (unlinked files still in use) and
vnodes undergoing change by long-running syscalls are identified -- and
such filesystems are marked dirty on-disk while we are suspended (in case
power is lost, a fsck will be required). Filesystems without dangling or
busy vnodes are marked clean, resulting in faster boots following
"battery died" circumstances.
Tested by numerous developers, thanks for the feedback.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for blocks re-fetchable from the filesystem. However at reboot time,
filesystems are unmounted, and since processes lack backing store they
are killed. Since the scheduler is still running, in some cases init is
killed... which drops us to ddb [noted by bluhm]. Solution is to convert
filesystems to read-only [proposed by kettenis]. The tale follows:
sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which
completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT()
with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a
copyin() late... so store the sizes in vfsconflist[] and move the copyin()
to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill
legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is
sharp and rusty especially wrt softdep, so fix some bugs adn add
~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help,
so tie them to &dead_vnops.
ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but
this issue is seperate and will be dealt with in time.
couple hundred reboots by bluhm and myself, advice from guenther and
others at the hut
|
| |
|
|
|
|
| |
on amd64 and i386.
|
|
|
|
| |
ok krw@
|
|
|
|
| |
ok guenther
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.
most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.
the manpage and subr_pool.c bits i did myself.
ok tedu@ jmatthew@
@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);
|
| |
|
|
|
|
| |
ok phessler@ krw@
|
|
|
|
| |
ok kettenis@ krw@ natano@ dlg@ espie@
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
usb stack was busy, the kernel could trigger an uvm fault. There
is a race between vop_generic_revoke() and sys_mount() where vgonel()
could reset v_specinfo. Then v_specmountpoint is no longer valid.
So after sleeping, msdosfs_mountfs() could crash in the error path.
The code in the different *_mountfs() functions was inconsistent,
implement the same check everywhere.
OK krw@ natano@
|
|
|
|
|
|
|
|
|
|
| |
msdosfs and nfsv2 don't set f_namemax. ntfs and ext2fs don't set
f_namemeax and f_favail. fusefs doesn't set f_mntfromspec, f_favail and
f_iosize. Also, make all filesystems use copy_statfs_info(), so that all
statfs information is filled in correctly for the (sb != &mp->mnt-stat)
case.
ok stefan
|
|
|
|
|
|
|
|
|
|
|
|
| |
could end up in an inconsistent state. The fstype dependent
mp->mnt_data was NULL, but the general mp was still listed as a
valid mount point. Next access to the file system would crash with
a NULL pointer dereference.
If closing the device fails, the mount point must go away anyway.
There is nothing we can do about it. Remove the workaround for the
EIO error in the general unmount code, but do not generate any error
in the file system specific unmount functions.
OK natano@ beck@
|
|
|
|
|
|
| |
torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt
|
|
|
|
| |
OK krw@ natano@ as part of a larger diff
|
|
|
|
|
|
| |
instead of using pool_allocator_nointr.
ok tedu@
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
|
|
|
|
| |
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
|
|
|
|
| |
ok deraadt@ tedu@
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
| |
only using ino_t in the VFS layer APIs: vget, readdir, getattr.
ok matthew@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the special provided when the mount was requested. This may be the same as
the special that was actually used for the mount (e.g. in the case of a
device node) or it may be different (e.g. in the case of a DUID).
Whilst here, change f_ctime to a 64 bit type and remove the pointless
f_spare members.
Compatibility goo courtesy of guenther@
ok krw@ millert@
|
|
|
|
|
|
|
|
|
|
|
| |
- Avoid using copyinstr() without checking the return value.
- sys_mount() has already copied the path in, so pass this to the
filesystem mount code so that it does not have to copy it in again.
- Avoid copyinstr()/bzero() dance when we can simply bzero() and strlcpy().
ok krw@
|
| |
|
| |
|
|
|
|
|
|
| |
unrelated, and his alpha is much happier now.
OK deraadt@
|
|
|
|
| |
have been resolved.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@.
|
|
|
|
| |
and remove the function. ok thib
|
|
|
|
|
|
|
| |
locking fixes. Tweak cd9660 code to be the same as everywhere else,
no functional change.
ok beck@
|
|
|
|
| |
ok krw/phessler
|
|
|
|
|
|
|
|
|
|
| |
and Blu-ray disks. Previously working DVDs should still work.
Done at f2k9 with phessler@. Vnode bug squashing by beck@. Thanks
to Bryan Brake for sending HDDVD/Blu-ray hardware and disks to f2k9
in Stockholm.
ok beck@ dlg@ phessler@
|
|
|
|
|
|
|
|
|
|
|
| |
which is exactly what the macro does.
Macro's that are nothing more then:
#define FUNCTION(arg) function(arg)
are almost always pointless and should go away.
OK blambert@
Agreed by many.
|
|
|
|
|
|
|
| |
and make textual tweaks to .c files to keep them compiling. From
NetBSD.
No changes to .o's at this point.
|
|
|
|
|
|
|
| |
conversions that should shave a few bytes off the kernel.
ok henning, krw, jsing, oga, miod, and thib (``even though i usually prefer
FOO|BAR''; thanks for looking.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
In ip_esp.c all allocated memory is now zero'd in the
"malloc(sizeof(*tc) + alen ..." case. The +alen memory was not
initialized by the bzero() call. Noticed by chl@.
"Looks good" art@ "seems ok" chl@
|
| |
|
|
|
|
|
|
| |
and mount error paths.
ok sturm@ pedro@
|
| |
|
| |
|