Commit graph

16 commits

Author SHA1 Message Date
Ben Gras
50b06261b6 Implementation of truncate(), ftruncate() and the F_FREESP fcntl().
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().
2006-01-11 17:14:51 +00:00
Ben Gras
b5e3e6d18c Two 'dynamic driver' features in FS:
.  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.
2005-10-20 19:39:32 +00:00
Ben Gras
40ca9c0a8e Als select.c fixes. 2005-09-22 21:17:22 +00:00
Ben Gras
42fbd9aced Andy's formatting changes. 2005-09-11 16:45:46 +00:00
Ben Gras
911ff6a873 Formatting fixes for the book 2005-08-29 16:47:18 +00:00
Jorrit Herder
207f4731dc FS cleanup with gcc. 2005-08-25 12:30:43 +00:00
Ben Gras
d11b2e4b8c Al's double-blank-line removal request 2005-08-22 15:23:47 +00:00
Jorrit Herder
f44725b777 Created new devctl system call to FS. Moved dmap.h header to include/minix/.
Various updates to support dynamically starting servers and suppress output.
2005-08-02 15:29:17 +00:00
Ben Gras
ed6459b304 *** empty log message *** 2005-07-27 14:30:25 +00:00
Ben Gras
08934187c9 FS understanding revives and selects as alerts (new notifies) 2005-07-27 13:08:52 +00:00
Ben Gras
6e8f484b3b . added cd-probe logic; tries to find the right root filesystem
if the boot monitor parameter is set. it also sets a boot monitor
  parameter (by talking to the PM) so userland knows it.
. ramdisk copy code made slightly smarter
. various select() prettifications (work in progress)
2005-07-22 18:28:32 +00:00
Jorrit Herder
570eac1f53 Renamed system library functionality.
Updated debug dumps of IS server.
2005-07-14 15:16:12 +00:00
Ben Gras
42050e39f8 kernel and servers send diagnostic messages to IS; IS sends them to TTY
and the new log driver if enabled.

new usyslogd is started from /usr/etc/rc. New device created by
MAKEDEV.sh. /var/log created by etc/mtree/minix.tree (on root for
now). Made select() slightly more generic, with less code duplication.
2005-07-08 17:30:01 +00:00
Philip Homburg
18458079f8 quick hacks for select 2005-06-28 14:59:00 +00:00
Ben Gras
9664ba0c4f Started select() implementation.
Added interface to select() for pipes (also named pipes), and select()
stubs for regular files.

Added timer library in FS that select() is the first customer of.


This is unfinished, but committed anyway to get a new release out to
Al and testers.
2005-06-17 13:41:12 +00:00
Ben Gras
e44e9ad261 small compile fixes; initial select() stubs; release.sh script doesn't
need /tmp any more since 16MB root device; increase to 3.0.5 to make new
CD with working FXP driver. (not tagged 3.0.5 yet as at driver bios-copy
workaround hasn't been done.)
2005-06-06 11:40:32 +00:00