Implemented by changing write_map to accept a WMAP_FREE flag. In that
case, it doesn't update the datablock (creating indirect zones as
necessary) pointer, but it frees the datablock if present. Also it
frees the single and double indirect blocks if unused.
This makes the implementation of truncate_inode() simpler.
truncate_inode() now accepts a truncation length which makes
implementing truncate() and ftruncate() simple.
This also allowed implementing the F_FREESP fcntl().
. When drivers disappear that have pending select()s, wake up
those user processes with EAGAIN so that they can retry their
select() and won't hang forever on it.
. When drivers re-appear and are mapped into the dmap, run through
the list of mounted filesystems and re-dev_open() every one (for
partition tables and such). This can't happen before the driver
has exec()ced itself, so processes that have fork()ed but not
exec()ced yet are marked as DMAP_BABY in the dmap table if they
are dmapped before they are execced. If that happens, the above
procedure happens after the exec(). If the exec() happens before
the dmapping, it (the dev_open()ing) happens right away.
. unmap device drivers from dmap when PM signals they are dead
. new null-io function (no_dev_io) to fill in for io functions
of unmapped drivers
. driver (process number) of unmapped drivers is NONE instead of
0 (a valid process number)
IS:
. print mutable flag of dmap table too
FS changes require sync() to be done 'manually' (currently by
reboot/shutdown) at shutdown time; could be caught by SIGTERM in
the future.