aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Dilger <adilger@shaw.ca>2006-06-23 05:03:14 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 10:42:47 -0400
commite8f03d02080b25f53cd6bba8dc3a297803f18c01 (patch)
tree64d2731203aa3e90273322620c3b964bba7abed9
parent6937a25cff818d32d0f9ff58a518c9ab96760aeb (diff)
[PATCH] reserve space for swap label
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>
-rw-r--r--include/linux/swap.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index aca9bfae208f..cd28ad206dae 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -48,12 +48,14 @@ union swap_header {
48 char magic[10]; /* SWAP-SPACE or SWAPSPACE2 */ 48 char magic[10]; /* SWAP-SPACE or SWAPSPACE2 */
49 } magic; 49 } magic;
50 struct { 50 struct {
51 char bootbits[1024]; /* Space for disklabel etc. */ 51 char bootbits[1024]; /* Space for disklabel etc. */
52 unsigned int version; 52 __u32 version;
53 unsigned int last_page; 53 __u32 last_page;
54 unsigned int nr_badpages; 54 __u32 nr_badpages;
55 unsigned int padding[125]; 55 unsigned char sws_uuid[16];
56 unsigned int badpages[1]; 56 unsigned char sws_volume[16];
57 __u32 padding[117];
58 __u32 badpages[1];
57 } info; 59 } info;
58}; 60};
59 61