FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 08-15-2008, 06:42 AM
FUJITA Tomonori
 
Default dm snapshot: make the disk format endian explict

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@lab.ntt.co.jp>
---
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@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 03:50 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org