Re: PATCH: Ramdisk version 2.0.1

Matthias Urlichs (smurf@smurf.noris.de)
Thu, 4 Jul 1996 14:01:23 +0100


In linux.dev.kernel, article <9607030426.AA27244@dcl.MIT.EDU>,
"Theodore Y. Ts'o" <tytso@mit.edu> writes:
>=20
> The only reason why ramdisk is still supporting a ram disk limit is
> partiailly to protect sysops from their won stupidity, and so that

This is Unix. If the sysop is stupid s/he'll run Lose95 anyway. :-/

If that happens, main memory is full. Then you return an error, clear t=
he
RAM disk since presumably it's unusable anyway, thereby returning the
system to a usable state immediately.

> commands that take a disk size (such as mke2fs /dev/ram) will still w=
ork
> properly.

Solution: Return the number of the last written block (plus one and
multiplied with the block size, of course). At first that'll be zero, b=
ut
mke2fs accepts a size parameter as its second parameter so this is not =
a
problem.

Return EOF when reading past that last block.

--=20
Bizoos, n.:
The millions of tiny individual bumps that make up a basketball.
-- Rich Hall, "Sniglets"
--=20
Matthias Urlichs \ noris network GmbH / Xlink-POP N=FCrnberg=
=20
Schleiermacherstra=DFe 12 \ Linux+Internet / EMail: urlichs@nor=
is.de
90491 N=FCrnberg (Germany) \ Consulting+Programming+Networking+etc=
'ing
PGP: 1024/4F578875 1B 89 E2 1C 43 EA 80 44 15 D2 29 CF C6 C7 E0 D=
E
Click <A HREF=3D"http://info.noris.de/~smurf/finger">here</A>. =
42