[RFC PATCH 3/4] mkswap: Add additional fields in swapheader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the padding section to add useful information in
swap header. This is backward compatible with
SWAPSPACE2 headers.

Signed-off-by: Venkatraman S <venkat@xxxxxxxxxx>
---
 include/swapheader.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/swapheader.h b/include/swapheader.h
index 42d521a..90d13ef 100644
--- a/include/swapheader.h
+++ b/include/swapheader.h
@@ -21,7 +21,12 @@ struct swap_header_v1_2 {
 	unsigned int  nr_badpages;
 	unsigned char uuid[SWAP_UUID_LENGTH];
 	char	      volume_name[SWAP_LABEL_LENGTH];
-	unsigned int  padding[117];
+	union {
+		struct {
+			unsigned int erase_blk_size;
+		} blkdevinfo;
+		unsigned int  padding[117];
+	} swp_headerinfo ;
 	unsigned int  badpages[1];
 };
 
-- 
1.7.11.1.25.g0e18bef

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux