Re: writepage return value check in vmscan.c

Andreas Dilger (adilger@clusterfs.com)
Tue, 29 Oct 2002 00:08:31 -0700


On Oct 28, 2002 22:10 -0800, Randy.Dunlap wrote:
> On Mon, 28 Oct 2002, Andrea Arcangeli wrote:
> | that's a silly restriction of mkswap, the kernel doesn't care, it can
> | handle way more than 2G (however there's an high bound at some
> | unpractical level, to go safe the math limit should be re-encoded in
> | mkswap, of course it changes for every arch because the pte layout is
> | different).
>
> Heh, you hit one of my personal todo list items (larger swap spaces :),
> so I'll be looking into it, or trying to help anyone else on it
> if they want it.

If you start playing with the swap code, could you please change the
on-disk swap struct definition to look like:

union swap_header {
:
:
struct {
char bootbits[1024]; /* Space for disklabel etc. */
unsigned __u32 version;
unsigned __u32 last_page;
unsigned __u32 nr_badpages;
char volume_label[16];
unsigned __u32 padding[121];
unsigned __u32 badpages[1];
} info;
};

1) change all of the "int" definitions in info to be __u32, because this
is written to disk and we want the sizes to be unambiguous
2) the volume label field has been previously discussed and doesn't
impose any compatibility, but allows one to "swapon by label"
(old patch URL at http://user.it.uu.se/~mikpe/linux/swap-label/)

Cheers, Andreas

--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/