diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2006-09-12 18:22:18 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-09-24 16:50:45 -0400 |
commit | 4d3b83f7364269b66cdda271f680bd99e77afd96 (patch) | |
tree | fcae1aca5ab487d07cd7ad4f01e71b961dc99107 /fs/ocfs2 | |
parent | 0027dd5bc213bc639e09dd002a4ab56bd18317c3 (diff) |
ocfs2: Free up some space in the lvb
lvb_version doesn't need to be a whole 32 bits. Make it an 8 bit field to
free up some space. This should be backwards compatible until we use one of
the fields, in which case we'd bump the lvb version anyway.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/dlmglue.c | 6 | ||||
-rw-r--r-- | fs/ocfs2/dlmglue.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 764d15defd88..f80fb14ee815 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c | |||
@@ -1413,7 +1413,7 @@ static void __ocfs2_stuff_meta_lvb(struct inode *inode) | |||
1413 | 1413 | ||
1414 | lvb = (struct ocfs2_meta_lvb *) lockres->l_lksb.lvb; | 1414 | lvb = (struct ocfs2_meta_lvb *) lockres->l_lksb.lvb; |
1415 | 1415 | ||
1416 | lvb->lvb_version = cpu_to_be32(OCFS2_LVB_VERSION); | 1416 | lvb->lvb_version = OCFS2_LVB_VERSION; |
1417 | lvb->lvb_isize = cpu_to_be64(i_size_read(inode)); | 1417 | lvb->lvb_isize = cpu_to_be64(i_size_read(inode)); |
1418 | lvb->lvb_iclusters = cpu_to_be32(oi->ip_clusters); | 1418 | lvb->lvb_iclusters = cpu_to_be32(oi->ip_clusters); |
1419 | lvb->lvb_iuid = cpu_to_be32(inode->i_uid); | 1419 | lvb->lvb_iuid = cpu_to_be32(inode->i_uid); |
@@ -1486,7 +1486,7 @@ static inline int ocfs2_meta_lvb_is_trustable(struct ocfs2_lock_res *lockres) | |||
1486 | { | 1486 | { |
1487 | struct ocfs2_meta_lvb *lvb = (struct ocfs2_meta_lvb *) lockres->l_lksb.lvb; | 1487 | struct ocfs2_meta_lvb *lvb = (struct ocfs2_meta_lvb *) lockres->l_lksb.lvb; |
1488 | 1488 | ||
1489 | if (be32_to_cpu(lvb->lvb_version) == OCFS2_LVB_VERSION) | 1489 | if (lvb->lvb_version == OCFS2_LVB_VERSION) |
1490 | return 1; | 1490 | return 1; |
1491 | return 0; | 1491 | return 0; |
1492 | } | 1492 | } |
@@ -3167,7 +3167,7 @@ void ocfs2_dump_meta_lvb_info(u64 level, | |||
3167 | mlog(level, "LVB information for %s (called from %s:%u):\n", | 3167 | mlog(level, "LVB information for %s (called from %s:%u):\n", |
3168 | lockres->l_name, function, line); | 3168 | lockres->l_name, function, line); |
3169 | mlog(level, "version: %u, clusters: %u\n", | 3169 | mlog(level, "version: %u, clusters: %u\n", |
3170 | be32_to_cpu(lvb->lvb_version), be32_to_cpu(lvb->lvb_iclusters)); | 3170 | lvb->lvb_version, be32_to_cpu(lvb->lvb_iclusters)); |
3171 | mlog(level, "size: %llu, uid %u, gid %u, mode 0x%x\n", | 3171 | mlog(level, "size: %llu, uid %u, gid %u, mode 0x%x\n", |
3172 | (unsigned long long)be64_to_cpu(lvb->lvb_isize), | 3172 | (unsigned long long)be64_to_cpu(lvb->lvb_isize), |
3173 | be32_to_cpu(lvb->lvb_iuid), be32_to_cpu(lvb->lvb_igid), | 3173 | be32_to_cpu(lvb->lvb_iuid), be32_to_cpu(lvb->lvb_igid), |
diff --git a/fs/ocfs2/dlmglue.h b/fs/ocfs2/dlmglue.h index 340251567e99..3476a1611341 100644 --- a/fs/ocfs2/dlmglue.h +++ b/fs/ocfs2/dlmglue.h | |||
@@ -32,7 +32,9 @@ | |||
32 | #define OCFS2_LVB_VERSION 3 | 32 | #define OCFS2_LVB_VERSION 3 |
33 | 33 | ||
34 | struct ocfs2_meta_lvb { | 34 | struct ocfs2_meta_lvb { |
35 | __be32 lvb_version; | 35 | __be16 lvb_reserved0; |
36 | __u8 lvb_reserved1; | ||
37 | __u8 lvb_version; | ||
36 | __be32 lvb_iclusters; | 38 | __be32 lvb_iclusters; |
37 | __be32 lvb_iuid; | 39 | __be32 lvb_iuid; |
38 | __be32 lvb_igid; | 40 | __be32 lvb_igid; |