linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: Swap Questions (includes possible bug) - swapfile.c / swap.c
@ 1999-05-12 10:30 Manfred Spraul
  1999-05-12 18:36 ` Stephen C. Tweedie
  0 siblings, 1 reply; 4+ messages in thread
From: Manfred Spraul @ 1999-05-12 10:30 UTC (permalink / raw)
  To: Rik van Riel, Joseph Pranevich; +Cc: Linux Kernel, Linux MM

>On Tue, 11 May 1999, Joseph Pranevich wrote:
> case 2:
>  error = -EINVAL;
>  if (swap_header->info.nr_badpages > MAX_SWAP_BADPAGES)
>  goto bad_swap;

MAX_SWAP_BADPAGES is a limitation of the swap format 2,
it's not a kernel limitation. (check include/linux/swap.h)
 
Rik wrote:
>On Tue, 11 May 1999, Joseph Pranevich wrote:
>> set_blocksize(p->swap_device, PAGE_SIZE);
>
>Hmm, haven't we seen this one before? Stephen?


There is another problem with this line:
set_blocksize() also means that the previous block size
doesn't work anymore:
if you accidentially enter 'swapon /dev/hda1' (my root drive)
instead of 'swapon /dev/hda3', then you have to fsck:
sys_swapon sets the blocksize, then it rejects the call
because there is no swap signature, but now ext2
can't access the partition (blocksize 4096, ext2 needs 1024).

I've posted a patch a few weeks ago, but I received no reply.

Are such problems ignored? (The super user can crash the
machine at will, one more crash doesn't matter)

Regards,
    Manfred

--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <Pine.LNX.4.03.9905111114210.19954-100000@baltimore.wwaves.com>]

end of thread, other threads:[~1999-05-12 19:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-12 10:30 Swap Questions (includes possible bug) - swapfile.c / swap.c Manfred Spraul
1999-05-12 18:36 ` Stephen C. Tweedie
1999-05-12 19:45   ` Manfred Spraul
     [not found] <Pine.LNX.4.03.9905111114210.19954-100000@baltimore.wwaves.com>
1999-05-11 21:30 ` Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox