[Ocfs2-tools-devel] [PATCH 01/10] Add very basic support for i_dyn_features read/write.
Tao Ma
tao.ma at oracle.com
Thu Jul 10 23:20:54 PDT 2008
From: Mark Fasheh <mfasheh at suse.com>
Signed-off-by: Mark Fasheh <mfasheh at suse.com>
Signed-off-by: Tao Ma <tao.ma at oracle.com>
---
libocfs2/inode.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/libocfs2/inode.c b/libocfs2/inode.c
index 90f83b2..33d9c9d 100644
--- a/libocfs2/inode.c
+++ b/libocfs2/inode.c
@@ -145,6 +145,10 @@ static void ocfs2_swap_inode_second(struct ocfs2_dinode *di)
tl->tl_count = bswap_16(tl->tl_count);
tl->tl_used = bswap_16(tl->tl_used);
+ } else if (di->i_dyn_features & OCFS2_INLINE_DATA_FL) {
+ struct ocfs2_inline_data *id = &di->id2.i_data;
+
+ id->id_count = bswap_16(id->id_count);
}
}
@@ -171,6 +175,7 @@ static void ocfs2_swap_inode_first(struct ocfs2_dinode *di)
di->i_ctime_nsec = bswap_32(di->i_ctime_nsec);
di->i_mtime_nsec = bswap_32(di->i_mtime_nsec);
di->i_attr = bswap_32(di->i_attr);
+ di->i_dyn_features = bswap_16(di->i_dyn_features);
}
static int has_extents(struct ocfs2_dinode *di)
@@ -182,6 +187,8 @@ static int has_extents(struct ocfs2_dinode *di)
/* i_flags doesn't indicate when id2 is a fast symlink */
if (S_ISLNK(di->i_mode) && di->i_size && di->i_clusters == 0)
return 0;
+ if (di->i_dyn_features & OCFS2_INLINE_DATA_FL)
+ return 0;
return 1;
}
--
1.5.4.GIT
More information about the Ocfs2-tools-devel
mailing list