aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2_fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/ocfs2_fs.h')
-rw-r--r--fs/ocfs2/ocfs2_fs.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/fs/ocfs2/ocfs2_fs.h b/fs/ocfs2/ocfs2_fs.h
index e61e218f5e0b..71306479c68f 100644
--- a/fs/ocfs2/ocfs2_fs.h
+++ b/fs/ocfs2/ocfs2_fs.h
@@ -86,7 +86,8 @@
86 OCFS2_SB(sb)->s_feature_incompat &= ~(mask) 86 OCFS2_SB(sb)->s_feature_incompat &= ~(mask)
87 87
88#define OCFS2_FEATURE_COMPAT_SUPP OCFS2_FEATURE_COMPAT_BACKUP_SB 88#define OCFS2_FEATURE_COMPAT_SUPP OCFS2_FEATURE_COMPAT_BACKUP_SB
89#define OCFS2_FEATURE_INCOMPAT_SUPP OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT 89#define OCFS2_FEATURE_INCOMPAT_SUPP (OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT \
90 | OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC)
90#define OCFS2_FEATURE_RO_COMPAT_SUPP 0 91#define OCFS2_FEATURE_RO_COMPAT_SUPP 0
91 92
92/* 93/*
@@ -155,6 +156,12 @@
155#define OCFS2_FL_MODIFIABLE (0x000100FF) /* User modifiable flags */ 156#define OCFS2_FL_MODIFIABLE (0x000100FF) /* User modifiable flags */
156 157
157/* 158/*
159 * Extent record flags (e_node.leaf.flags)
160 */
161#define OCFS2_EXT_UNWRITTEN (0x01) /* Extent is allocated but
162 * unwritten */
163
164/*
158 * ioctl commands 165 * ioctl commands
159 */ 166 */
160#define OCFS2_IOC_GETFLAGS _IOR('f', 1, long) 167#define OCFS2_IOC_GETFLAGS _IOR('f', 1, long)
@@ -282,10 +289,21 @@ static unsigned char ocfs2_type_by_mode[S_IFMT >> S_SHIFT] = {
282/* 289/*
283 * On disk extent record for OCFS2 290 * On disk extent record for OCFS2
284 * It describes a range of clusters on disk. 291 * It describes a range of clusters on disk.
292 *
293 * Length fields are divided into interior and leaf node versions.
294 * This leaves room for a flags field (OCFS2_EXT_*) in the leaf nodes.
285 */ 295 */
286struct ocfs2_extent_rec { 296struct ocfs2_extent_rec {
287/*00*/ __le32 e_cpos; /* Offset into the file, in clusters */ 297/*00*/ __le32 e_cpos; /* Offset into the file, in clusters */
288 __le32 e_clusters; /* Clusters covered by this extent */ 298 union {
299 __le32 e_int_clusters; /* Clusters covered by all children */
300 struct {
301 __le16 e_leaf_clusters; /* Clusters covered by this
302 extent */
303 __u8 e_reserved1;
304 __u8 e_flags; /* Extent flags */
305 };
306 };
289 __le64 e_blkno; /* Physical disk offset, in blocks */ 307 __le64 e_blkno; /* Physical disk offset, in blocks */
290/*10*/ 308/*10*/
291}; 309};
@@ -311,7 +329,10 @@ struct ocfs2_extent_list {
311/*00*/ __le16 l_tree_depth; /* Extent tree depth from this 329/*00*/ __le16 l_tree_depth; /* Extent tree depth from this
312 point. 0 means data extents 330 point. 0 means data extents
313 hang directly off this 331 hang directly off this
314 header (a leaf) */ 332 header (a leaf)
333 NOTE: The high 8 bits cannot be
334 used - tree_depth is never that big.
335 */
315 __le16 l_count; /* Number of extent records */ 336 __le16 l_count; /* Number of extent records */
316 __le16 l_next_free_rec; /* Next unused extent slot */ 337 __le16 l_next_free_rec; /* Next unused extent slot */
317 __le16 l_reserved1; 338 __le16 l_reserved1;
@@ -446,7 +467,9 @@ struct ocfs2_dinode {
446 __le32 i_ctime_nsec; 467 __le32 i_ctime_nsec;
447 __le32 i_mtime_nsec; 468 __le32 i_mtime_nsec;
448 __le32 i_attr; 469 __le32 i_attr;
449 __le32 i_reserved1; 470 __le16 i_orphaned_slot; /* Only valid when OCFS2_ORPHANED_FL
471 was set in i_flags */
472 __le16 i_reserved1;
450/*70*/ __le64 i_reserved2[8]; 473/*70*/ __le64 i_reserved2[8];
451/*B8*/ union { 474/*B8*/ union {
452 __le64 i_pad1; /* Generic way to refer to this 475 __le64 i_pad1; /* Generic way to refer to this