[PATCH 02/10] dm snapshot: make the disk format endian explict

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

 



The two disk formats of dm snapshot (disk_header and disk_exception)
are little endian. This makes it explicit.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
---
 drivers/md/dm-exception-store.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/md/dm-exception-store.c b/drivers/md/dm-exception-store.c
index fe5f8b4..8931364 100644
--- a/drivers/md/dm-exception-store.c
+++ b/drivers/md/dm-exception-store.c
@@ -60,27 +60,27 @@
 #define SNAPSHOT_DISK_VERSION 1
 
 struct disk_header {
-	uint32_t magic;
+	__le32 magic;
 
 	/*
 	 * Is this snapshot valid.  There is no way of recovering
 	 * an invalid snapshot.
 	 */
-	uint32_t valid;
+	__le32 valid;
 
 	/*
 	 * Simple, incrementing version. no backward
 	 * compatibility.
 	 */
-	uint32_t version;
+	__le32 version;
 
 	/* In sectors */
-	uint32_t chunk_size;
+	__le32 chunk_size;
 };
 
 struct disk_exception {
-	uint64_t old_chunk;
-	uint64_t new_chunk;
+	__le64 old_chunk;
+	__le64 new_chunk;
 };
 
 struct commit_callback {
-- 
1.5.5.GIT

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux