frequently enough.
- As we are initializing dk_select to 0 (via dkinit), no need to check it.
- Re-order the code in display() to highlight the fact that -x is
exclusive with others.
- If user really specified some drives and none of them are found,
just bail out rather than falling back to default behaviour.
- Other misc. cosmetic changes while I'm here.
and update fsck_lfs and dumplfs to deal with it. Note that while the argument
to -O is given in disk sectors, it must be a multiple of the fragment size,
and although it can be lower than the label or superblock, it can't intersect
either.
- use size_t where appropriate
- use err/warn instead of printf, and don't hide the error messages from ioctl.
- keep units in sync (someone added integer in the header file and forgot
to update envsys.c)
(there are still some details to work out) but expect that to go
away soon. To support these basic changes (creation of lfs_putpages,
lfs_gop_write, mods to lfs_balloc) several other changes were made, to
wit:
* Create a writer daemon kernel thread whose purpose is to handle page
writes for the pagedaemon, but which also takes over some of the
functions of lfs_check(). This thread is started the first time an
LFS is mounted.
* Add a "flags" parameter to GOP_SIZE. Current values are
GOP_SIZE_READ, meaning that the call should return the size of the
in-core version of the file, and GOP_SIZE_WRITE, meaning that it
should return the on-disk size. One of GOP_SIZE_READ or
GOP_SIZE_WRITE must be specified.
* Instead of using malloc(...M_WAITOK) for everything, reserve enough
resources to get by and use malloc(...M_NOWAIT), using the reserves if
necessary. Use the pool subsystem for structures small enough that
this is feasible. This also obsoletes LFS_THROTTLE.
And a few that are not strictly necessary:
* Moves the LFS inode extensions off onto a separately allocated
structure; getting closer to LFS as an LKM. "Welcome to 1.6O."
* Unified GOP_ALLOC between FFS and LFS.
* Update LFS copyright headers to correct values.
* Actually cast to unsigned in lfs_shellsort, like the comment says.
* Keep track of which segments were empty before the previous
checkpoint; any segments that pass two checkpoints both dirty and
empty can be summarily cleaned. Do this. Right now lfs_segclean
still works, but this should be turned into an effectless
compatibility syscall.
- Don't invoke kevent(2) for every single event change. Instead collect
event changes and try to do them in the event loop.
- Handle signals via kevent(2) to avoid race conditions for SIGHUP (which
probably exist in the select(2) based implementation, too).
such pseudo-devices, create cfdrivers for them which carry the appropriate
attributes. This allows devices in the config file to be attached to
pseudo-devices.