Re: mkswap

Matti Aarnio (matti.aarnio@tele.fi)
Fri, 20 Feb 1998 00:25:09 +0200 (EET)


> I just noticed that I can do
> mkswap foo; swapon foo
> which fails, ("Unable to find swap-space signature"), while
> mkswap foo; sync; swapon foo
> succeeds. In other words (2.0.33): the swapon system call
> does not look at the cache for the file foo.
> This is a kernel bug (but there are more aliasing problems
> somewhat like this, like between /dev/hda and /dev/hda1).

The fix is ok, but diagnostics of it being a "bug" in
the kernel is somewhat inappropriate. Lets call it
"feature"; file-io uses buffer-cache, while swapping
does direct uncached io from disk to the memory pages.

The problem is actually about aliasing of uncached, and
cached io. How to solve it, is another issue.

/Matti Aarnio <matti.aarnio@tele.fi>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu