On Tue, Jul 5, 2011 at 11:01 AM, David Miller [off-list ref] wrote:
That issue only exists because you haven't defined a common header
struct that the current, and all future, block descriptor variants can
include at the start of their definitions.
what's common today may not be common tomorrow. After much thinking I
decided to not provide a generic header because I wouldn't want to
enforce anything.
new format:
union bd_header_u {
/* renamed struct bd_v1 to hdr_v1 */
struct hdr_v1 h1;
} __attribute__ ((__packed__));
struct block_desc {
__u16 version;
__u16 offset_to_priv;
union bd_header_u hdr;
} __attribute__ ((__packed__));
Is this ok with you?
Use real data structures, not opaque "offset+size" poking into the
descriptors.
Used to writing firmware APIs. APIs use words/bytes so that they can
be interpreted by firmware folks too.
Chetan Loke