]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] reserve space for swap label
authorAndreas Dilger <adilger@shaw.ca>
Fri, 23 Jun 2006 09:03:14 +0000 (02:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Jun 2006 14:42:47 +0000 (07:42 -0700)
Reserve space in the swap disk header for a LABEL and UUID to be specified.
 This has been possible with util-linux-2.12b (via e2fsprogs 1.36
libblkid), and is used by at least FC3 and later.  The kernel doesn't
really care about this, but the space shouldn't accidentally be used by
something else either.

Also make the on-disk structures be fixed-size types, instead of "int",
though I don't know of any architecture in use where an "int" isn't the
same size as a "__u32" (all current kernel arches have it as "unsigned
int").

Signed-off-by: Andreas Dilger <adilger@shaw.ca>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/swap.h

index aca9bfae208f8780dc0d7c0523a6e4280e317403..cd28ad206dae3f8b4b66964321ec7091d3f52ddd 100644 (file)
@@ -48,12 +48,14 @@ union swap_header {
                char magic[10];                 /* SWAP-SPACE or SWAPSPACE2 */
        } magic;
        struct {
-               char         bootbits[1024];    /* Space for disklabel etc. */
-               unsigned int version;
-               unsigned int last_page;
-               unsigned int nr_badpages;
-               unsigned int padding[125];
-               unsigned int badpages[1];
+               char            bootbits[1024]; /* Space for disklabel etc. */
+               __u32           version;
+               __u32           last_page;
+               __u32           nr_badpages;
+               unsigned char   sws_uuid[16];
+               unsigned char   sws_volume[16];
+               __u32           padding[117];
+               __u32           badpages[1];
        } info;
 };