Commit graph

109 commits

Author SHA1 Message Date
Ben Gras
6e7ba75acb Driver disappearing during dev_io() is not a fatal error. 2006-03-15 21:55:32 +00:00
Ben Gras
ff67776995 FS:
. loops checked for PID_FREE
  . exit broken down in exit and cleanup functions; when reboot happens,
    cleanup is done but not exit (as processes have not actually exited),
    this keeps drivers working
  . fixed a few uninitialized and unused variables

scripts:
  . new packaging system
2006-03-15 15:34:12 +00:00
Philip Homburg
50d805144c dmap_io now returns a status. map_driver no longer calls dev_up. 2006-03-15 13:37:20 +00:00
Ben Gras
def8c13ba8 Do a sync() before reboot()ing in FS. 2006-03-14 13:54:20 +00:00
Jorrit Herder
021e3234d8 Jorrit's ... "progress?" 2006-03-10 16:10:05 +00:00
Ben Gras
6fe89cfbe8 Hack small and big fs into a single image. Must now set BIG or SMALL label. 2006-03-10 14:11:19 +00:00
Ben Gras
25fdc7657d panic() on inconsistent endpoints 2006-03-10 12:59:46 +00:00
Ben Gras
6746ee10f5 If re-open fails, mark fd as unusable but not-reusable either (until
close()d).
2006-03-09 16:00:33 +00:00
Ben Gras
b103bf5dc7 Fix of endpointless slot message in FS
Removed some leftover '#if 0'ed debug code in PM
2006-03-03 10:25:28 +00:00
Ben Gras
7967177710 endpoint-aware conversion of servers.
'who', indicating caller number in pm and fs and some other servers, has
been removed in favour of 'who_e' (endpoint) and 'who_p' (proc nr.).

In both PM and FS, isokendpt() convert endpoints to process slot
numbers, returning OK if it was a valid and consistent endpoint number.
okendpt() does the same but panic()s if it doesn't succeed. (In PM,
this is pm_isok..)

pm and fs keep their own records of process endpoints in their proc tables,
which are needed to make kernel calls about those processes.

message field names have changed.

fs drivers are endpoints.

fs now doesn't try to get out of driver deadlock, as the protocol isn't
supposed to let that happen any more. (A warning is printed if ELOCKED
is detected though.)

fproc[].fp_task (indicating which driver the process is suspended on)
became an int.

PM and FS now get endpoint numbers of initial boot processes from the
kernel. These happen to be the same as the old proc numbers, to let
user processes reach them with the old numbers, but FS and PM don't know
that. All new processes after INIT, even after the generation number
wraps around, get endpoint numbers with generation 1 and higher, so
the first instances of the boot processes are the only processes ever
to have endpoint numbers in the old proc number range.

More return code checks of sys_* functions have been added.

IS has become endpoint-aware. Ditched the 'text' and 'data' fields
in the kernel dump (which show locations, not sizes, so aren't terribly
useful) in favour of the endpoint number. Proc number is still visible.

Some other dumps (e.g. dmap, rs) show endpoint numbers now too which got
the formatting changed.

PM reading segments using rw_seg() has changed - it uses other fields
in the message now instead of encoding the segment and process number and
fd in the fd field. For that it uses _read_pm() and _write_pm() which to
_taskcall()s directly in pm/misc.c.

PM now sys_exit()s itself on panic(), instead of sys_abort().

RS also talks in endpoints instead of process numbers.
2006-03-03 10:20:58 +00:00
Ben Gras
7d83ef196d Don't include cdprobe any more 2006-02-24 12:56:06 +00:00
Philip Homburg
c3a88d15d8 Initial root filesystem is now on a ramdisk that is part of the image. 2006-02-15 11:18:21 +00:00
Ben Gras
b9bdbcba1b Don't sync before exiting drivers.
Wipe inodes of pipes in truncate_inode(), to avoid the size remaining
at PIPE_SIZE causing pipes to break.
2006-02-13 10:28:42 +00:00
Ben Gras
040cebcefe Don't kill processes by signals in process group 0, and do a sync before
killing all processes in FS reboot.
2006-02-03 15:21:00 +00:00
Philip Homburg
f4ae126596 Cosmetic changes. 2006-01-27 13:26:42 +00:00
Ben Gras
43051c182a Safety feature for symlink() - verify length of symlink contents
buffer with strlen()
2006-01-26 14:31:00 +00:00
Ben Gras
f806a66edf Fix for fchdir(). 2006-01-20 12:43:35 +00:00
Ben Gras
3bddaaf580 Let other uids (temporarily) set their mapping. 2006-01-20 12:43:19 +00:00
Ben Gras
966905d295 Not having a driver isn't a print-worthy error. Just return ENXIO. 2006-01-17 17:55:35 +00:00
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
6a911b5284 Merge of minix-vmd symlink code.
. new_node() now returns inode of parent dir as argument that
	  has to be put_node()d again by the caller of new_node().
	  it can also return the name of the last component as last_dir()
	  did.
	. advance() takes a pointer to a pointer of an inode as the
	  parent now. This parent can change, in which case the old
	  one is put_node()d and a new one is put there.
	. eat_path() replaced by more flexible parse_path()
	. last_dir() replaced by call to parse_path().
	. do_slink(), do_readlink(), do_lstat() and slink_traverse() added.

Also added some truncate()/ftruncate()-introduction related changes.
(e.g. renamed truncate() to truncate_inode().)
2005-12-20 14:23:44 +00:00
Ben Gras
743bdb038e Backout of symlink patches. 2005-12-19 10:45:50 +00:00
Ben Gras
eb1919722d Priority explicitization. 2005-12-14 12:08:49 +00:00
Ben Gras
f6e5052597 seteuid() and setegid() 2005-12-13 09:48:29 +00:00
Ben Gras
dd99ee67e0 Rename some #defines such as MAX_BLOCK_SIZE to _MAX_BLOCK_SIZE and such
so as to not pollute application namespace.
2005-11-14 18:41:27 +00:00
Ben Gras
fa76dcb8c1 Giovanni's symlink patches. 2005-11-01 13:19:40 +00:00
Philip Homburg
6a0a7c1a76 More filedescriptors 2005-10-24 13:43:03 +00:00
Ben Gras
bbcecf5e6d Don't panic on missing drivers. 2005-10-21 19:31:38 +00:00
Ben Gras
aac4f32f51 Don't print SIGKSTOP message 2005-10-21 11:28:50 +00:00
Ben Gras
f7f30a3a44 2 extra error conditions on disappearing processes during/before sendrec() 2005-10-20 20:46:04 +00:00
Ben Gras
8d99d24ce6 Also dev_open opened block and character special files 2005-10-20 20:32:09 +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
Jorrit Herder
5a9dec8bd2 New signal handling behaviour at PM (services can be killed).
New Shift-F6 dump for RS server at IS.
New getnpid, getnproc, getpproc library calls at PM.
New reincarnation server (basic functionality is there now).
2005-10-12 15:07:38 +00:00
Ben Gras
46678bdb7f Compile fix 2005-10-12 15:07:26 +00:00
Ben Gras
fc58687905 rw_block is private to cache.c 2005-10-12 15:06:47 +00:00
Ben Gras
2eca6f9374 If processes are blocked on device drivers (returning SUSPEND),
unblock the processes when the device drivers die.
2005-10-12 15:01:23 +00:00
Ben Gras
86ed54ee94 FS:
. 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.
2005-10-05 15:38:15 +00:00
Ben Gras
2986c11811 DEV_UNMAP devctl()
FSDEVUNMAP svrctl()
2005-10-03 14:17:33 +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
119f9c714c diagnostics will look funny during setup 2005-09-08 16:00:44 +00:00
Ben Gras
a9302ba6e3 Propagate EXTRA_OPTS 2005-08-29 20:00:49 +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
4da92e20db Don't keep looping on bogus device message. 2005-08-24 16:57:12 +00:00
Ben Gras
d11b2e4b8c Al's double-blank-line removal request 2005-08-22 15:23:47 +00:00
Ben Gras
2382b9a1d3 Don't allow arbitrary ram disks being loaded any more, due to funny check. 2005-08-11 11:32:37 +00:00
Ben Gras
abeebb1ac9 Little formatting fix. 2005-08-10 15:18:13 +00:00
Ben Gras
244b1db564 Remove debug messages 2005-08-10 15:13:13 +00:00
Ben Gras
9d92258e55 Minor message improvement 2005-08-09 17:02:27 +00:00