Skip to content

Commit a72950b

Browse files
author
Sunil Mushran
committed
include: Sync up headers from the kernel
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
1 parent 296cb06 commit a72950b

File tree

5 files changed

+75
-30
lines changed

5 files changed

+75
-30
lines changed

include/o2cb/ocfs2_heartbeat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ struct o2hb_disk_heartbeat_block {
3232
__u8 hb_pad1[3];
3333
__le32 hb_cksum;
3434
__le64 hb_generation;
35+
__le32 hb_dead_ms;
3536
};
3637

3738
#endif /* _OCFS2_HEARTBEAT_H */

include/o2cb/ocfs2_nodemanager.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,10 @@
3636
/* host name, group name, cluster name all 64 bytes */
3737
#define O2NM_MAX_NAME_LEN 64 // __NEW_UTS_LEN
3838

39+
/*
40+
* Maximum number of global heartbeat regions allowed.
41+
* **CAUTION** Changing this number will break dlm compatibility.
42+
*/
43+
#define O2NM_MAX_REGIONS 32
44+
3945
#endif /* _OCFS2_NODEMANAGER_H */

include/ocfs2-kernel/ocfs1_fs_compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct ocfs1_disk_lock
7777
{
7878
/*00*/ __u32 curr_master;
7979
__u8 file_lock;
80-
__u8 compat_pad[3]; /* Not in orignal definition. Used to
80+
__u8 compat_pad[3]; /* Not in original definition. Used to
8181
make the already existing alignment
8282
explicit */
8383
__u64 last_write_time;

include/ocfs2-kernel/ocfs2_fs.h

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@
6666
#define OCFS2_GROUP_DESC_SIGNATURE "GROUP01"
6767
#define OCFS2_XATTR_BLOCK_SIGNATURE "XATTR01"
6868
#define OCFS2_DIR_TRAILER_SIGNATURE "DIRTRL1"
69-
#define OCFS2_REFCOUNT_BLOCK_SIGNATURE "REFCNT1"
7069
#define OCFS2_DX_ROOT_SIGNATURE "DXDIR01"
7170
#define OCFS2_DX_LEAF_SIGNATURE "DXLEAF1"
71+
#define OCFS2_REFCOUNT_BLOCK_SIGNATURE "REFCNT1"
7272

7373
/* Compatibility flags */
7474
#define OCFS2_HAS_COMPAT_FEATURE(sb,mask) \
@@ -97,11 +97,11 @@
9797
| OCFS2_FEATURE_INCOMPAT_INLINE_DATA \
9898
| OCFS2_FEATURE_INCOMPAT_EXTENDED_SLOT_MAP \
9999
| OCFS2_FEATURE_INCOMPAT_USERSPACE_STACK \
100-
| OCFS2_FEATURE_INCOMPAT_META_ECC \
101100
| OCFS2_FEATURE_INCOMPAT_XATTR \
102-
| OCFS2_FEATURE_INCOMPAT_REFCOUNT_TREE \
101+
| OCFS2_FEATURE_INCOMPAT_META_ECC \
103102
| OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS \
104-
| OCFS2_FEATURE_INCOMPAT_DISCONTIG_BG \
103+
| OCFS2_FEATURE_INCOMPAT_REFCOUNT_TREE \
104+
| OCFS2_FEATURE_INCOMPAT_DISCONTIG_BG \
105105
| OCFS2_FEATURE_INCOMPAT_CLUSTERINFO)
106106
#define OCFS2_FEATURE_RO_COMPAT_SUPP (OCFS2_FEATURE_RO_COMPAT_UNWRITTEN \
107107
| OCFS2_FEATURE_RO_COMPAT_USRQUOTA \
@@ -243,28 +243,41 @@
243243
#define OCFS2_HAS_XATTR_FL (0x0002)
244244
#define OCFS2_INLINE_XATTR_FL (0x0004)
245245
#define OCFS2_INDEXED_DIR_FL (0x0008)
246-
#define OCFS2_HAS_REFCOUNT_FL (0x0010)
246+
#define OCFS2_HAS_REFCOUNT_FL (0x0010)
247247

248248
/* Inode attributes, keep in sync with EXT2 */
249-
#define OCFS2_SECRM_FL (0x00000001) /* Secure deletion */
250-
#define OCFS2_UNRM_FL (0x00000002) /* Undelete */
251-
#define OCFS2_COMPR_FL (0x00000004) /* Compress file */
252-
#define OCFS2_SYNC_FL (0x00000008) /* Synchronous updates */
253-
#define OCFS2_IMMUTABLE_FL (0x00000010) /* Immutable file */
254-
#define OCFS2_APPEND_FL (0x00000020) /* writes to file may only append */
255-
#define OCFS2_NODUMP_FL (0x00000040) /* do not dump file */
256-
#define OCFS2_NOATIME_FL (0x00000080) /* do not update atime */
257-
#define OCFS2_DIRSYNC_FL (0x00010000) /* dirsync behaviour (directories only) */
258-
259-
#define OCFS2_FL_VISIBLE (0x000100FF) /* User visible flags */
260-
#define OCFS2_FL_MODIFIABLE (0x000100FF) /* User modifiable flags */
249+
#define OCFS2_SECRM_FL FS_SECRM_FL /* Secure deletion */
250+
#define OCFS2_UNRM_FL FS_UNRM_FL /* Undelete */
251+
#define OCFS2_COMPR_FL FS_COMPR_FL /* Compress file */
252+
#define OCFS2_SYNC_FL FS_SYNC_FL /* Synchronous updates */
253+
#define OCFS2_IMMUTABLE_FL FS_IMMUTABLE_FL /* Immutable file */
254+
#define OCFS2_APPEND_FL FS_APPEND_FL /* writes to file may only append */
255+
#define OCFS2_NODUMP_FL FS_NODUMP_FL /* do not dump file */
256+
#define OCFS2_NOATIME_FL FS_NOATIME_FL /* do not update atime */
257+
/* Reserved for compression usage... */
258+
#define OCFS2_DIRTY_FL FS_DIRTY_FL
259+
#define OCFS2_COMPRBLK_FL FS_COMPRBLK_FL /* One or more compressed clusters */
260+
#define OCFS2_NOCOMP_FL FS_NOCOMP_FL /* Don't compress */
261+
#define OCFS2_ECOMPR_FL FS_ECOMPR_FL /* Compression error */
262+
/* End compression flags --- maybe not all used */
263+
#define OCFS2_BTREE_FL FS_BTREE_FL /* btree format dir */
264+
#define OCFS2_INDEX_FL FS_INDEX_FL /* hash-indexed directory */
265+
#define OCFS2_IMAGIC_FL FS_IMAGIC_FL /* AFS directory */
266+
#define OCFS2_JOURNAL_DATA_FL FS_JOURNAL_DATA_FL /* Reserved for ext3 */
267+
#define OCFS2_NOTAIL_FL FS_NOTAIL_FL /* file tail should not be merged */
268+
#define OCFS2_DIRSYNC_FL FS_DIRSYNC_FL /* dirsync behaviour (directories only) */
269+
#define OCFS2_TOPDIR_FL FS_TOPDIR_FL /* Top of directory hierarchies*/
270+
#define OCFS2_RESERVED_FL FS_RESERVED_FL /* reserved for ext2 lib */
271+
272+
#define OCFS2_FL_VISIBLE FS_FL_USER_VISIBLE /* User visible flags */
273+
#define OCFS2_FL_MODIFIABLE FS_FL_USER_MODIFIABLE /* User modifiable flags */
261274

262275
/*
263276
* Extent record flags (e_node.leaf.flags)
264277
*/
265278
#define OCFS2_EXT_UNWRITTEN (0x01) /* Extent is allocated but
266279
* unwritten */
267-
#define OCFS2_EXT_REFCOUNTED (0x02) /* Extent is reference
280+
#define OCFS2_EXT_REFCOUNTED (0x02) /* Extent is reference
268281
* counted in an associated
269282
* refcount tree */
270283

@@ -333,6 +346,7 @@ enum {
333346
USER_QUOTA_SYSTEM_INODE,
334347
GROUP_QUOTA_SYSTEM_INODE,
335348
#define OCFS2_LAST_GLOBAL_SYSTEM_INODE GROUP_QUOTA_SYSTEM_INODE
349+
#define OCFS2_FIRST_LOCAL_SYSTEM_INODE ORPHAN_DIR_SYSTEM_INODE
336350
ORPHAN_DIR_SYSTEM_INODE,
337351
EXTENT_ALLOC_SYSTEM_INODE,
338352
INODE_ALLOC_SYSTEM_INODE,
@@ -341,8 +355,12 @@ enum {
341355
TRUNCATE_LOG_SYSTEM_INODE,
342356
LOCAL_USER_QUOTA_SYSTEM_INODE,
343357
LOCAL_GROUP_QUOTA_SYSTEM_INODE,
358+
#define OCFS2_LAST_LOCAL_SYSTEM_INODE LOCAL_GROUP_QUOTA_SYSTEM_INODE
344359
NUM_SYSTEM_INODES
345360
};
361+
#define NUM_GLOBAL_SYSTEM_INODES OCFS2_FIRST_LOCAL_SYSTEM_INODE
362+
#define NUM_LOCAL_SYSTEM_INODES \
363+
(NUM_SYSTEM_INODES - OCFS2_FIRST_LOCAL_SYSTEM_INODE)
346364

347365
static struct ocfs2_system_inode_info ocfs2_system_inodes[NUM_SYSTEM_INODES] = {
348366
/* Global system inodes (single copy) */
@@ -404,6 +422,7 @@ static struct ocfs2_system_inode_info ocfs2_system_inodes[NUM_SYSTEM_INODES] = {
404422
#define OCFS2_LINK_MAX 32000
405423
#define OCFS2_DX_LINK_MAX ((1U << 31) - 1U)
406424
#define OCFS2_LINKS_HI_SHIFT 16
425+
#define OCFS2_DX_ENTRIES_MAX (0xffffffffU)
407426

408427
#define S_SHIFT 12
409428
static unsigned char ocfs2_type_by_mode[S_IFMT >> S_SHIFT] = {
@@ -430,7 +449,7 @@ static unsigned char ocfs2_type_by_mode[S_IFMT >> S_SHIFT] = {
430449
struct ocfs2_block_check {
431450
/*00*/ __le32 bc_crc32e; /* 802.3 Ethernet II CRC32 */
432451
__le16 bc_ecc; /* Single-error-correction parity vector.
433-
This is a simple Hamming code dependant
452+
This is a simple Hamming code dependent
434453
on the blocksize. OCFS2's maximum
435454
blocksize, 4K, requires 16 parity bits,
436455
so we fit in __le16. */
@@ -712,7 +731,7 @@ struct ocfs2_dinode {
712731
__le16 i_dyn_features;
713732
__le64 i_xattr_loc;
714733
/*80*/ struct ocfs2_block_check i_check; /* Error checking */
715-
__le64 i_dx_root;
734+
/*88*/ __le64 i_dx_root; /* Pointer to dir index root block */
716735
/*90*/ __le64 i_refcount_loc;
717736
__le64 i_suballoc_loc; /* Suballocator block group this
718737
inode belongs to. Only valid
@@ -739,7 +758,7 @@ struct ocfs2_dinode {
739758
after an unclean
740759
shutdown */
741760
} journal1;
742-
} id1; /* Inode type dependant 1 */
761+
} id1; /* Inode type dependent 1 */
743762
/*C0*/ union {
744763
struct ocfs2_super_block i_super;
745764
struct ocfs2_local_alloc i_lab;
@@ -853,11 +872,11 @@ struct ocfs2_dx_root_block {
853872
__le32 dr_reserved2;
854873
__le64 dr_free_blk; /* Pointer to head of free
855874
* unindexed block list. */
856-
__le64 dr_suballoc_loc; /* Suballocator block group
857-
* this root belongs to.
858-
* Only valid if allocated
859-
* from a discontiguous
860-
* block group. */
875+
__le64 dr_suballoc_loc; /* Suballocator block group
876+
this root belongs to.
877+
Only valid if allocated
878+
from a discontiguous
879+
block group */
861880
__le64 dr_reserved3[14];
862881
union {
863882
struct ocfs2_extent_list dr_list; /* Keep this aligned to 128
@@ -1008,7 +1027,7 @@ struct ocfs2_xattr_entry {
10081027
__le16 xe_name_offset; /* byte offset from the 1st entry in the
10091028
local xattr storage(inode, xattr block or
10101029
xattr bucket). */
1011-
__u8 xe_name_len; /* xattr name len, does't include prefix. */
1030+
__u8 xe_name_len; /* xattr name len, doesn't include prefix. */
10121031
__u8 xe_type; /* the low 7 bits indicate the name prefix
10131032
* type and the highest bit indicates whether
10141033
* the EA is stored in the local storage. */
@@ -1068,13 +1087,13 @@ struct ocfs2_xattr_tree_root {
10681087
/*10*/ struct ocfs2_extent_list xt_list; /* Extent record list */
10691088
};
10701089

1090+
#define OCFS2_XATTR_INLINE_SIZE 80
10711091
#define OCFS2_XATTR_INDEXED 0x1
10721092
#define OCFS2_HASH_SHIFT 5
10731093
#define OCFS2_XATTR_ROUND 3
10741094
#define OCFS2_XATTR_SIZE(size) (((size) + OCFS2_XATTR_ROUND) & \
10751095
~(OCFS2_XATTR_ROUND))
10761096

1077-
#define OCFS2_XATTR_INLINE_SIZE 80
10781097
#define OCFS2_XATTR_BUCKET_SIZE 4096
10791098
#define OCFS2_XATTR_MAX_BLOCKS_PER_BUCKET (OCFS2_XATTR_BUCKET_SIZE \
10801099
/ OCFS2_MIN_BLOCKSIZE)
@@ -1455,7 +1474,6 @@ ocfs2_get_ref_rec_low_cpos(const struct ocfs2_refcount_rec *rec)
14551474
{
14561475
return le64_to_cpu(rec->r_cpos) & OCFS2_32BIT_POS_MASK;
14571476
}
1458-
14591477
#else
14601478
static inline int ocfs2_fast_symlink_chars(int blocksize)
14611479
{

include/ocfs2-kernel/ocfs2_lockid.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ enum ocfs2_lock_type {
4646
OCFS2_LOCK_TYPE_DENTRY,
4747
OCFS2_LOCK_TYPE_OPEN,
4848
OCFS2_LOCK_TYPE_FLOCK,
49+
OCFS2_LOCK_TYPE_QINFO,
50+
OCFS2_LOCK_TYPE_NFS_SYNC,
51+
OCFS2_LOCK_TYPE_ORPHAN_SCAN,
52+
OCFS2_LOCK_TYPE_REFCOUNT,
4953
OCFS2_NUM_LOCK_TYPES
5054
};
5155

@@ -77,6 +81,18 @@ static inline char ocfs2_lock_type_char(enum ocfs2_lock_type type)
7781
case OCFS2_LOCK_TYPE_FLOCK:
7882
c = 'F';
7983
break;
84+
case OCFS2_LOCK_TYPE_QINFO:
85+
c = 'Q';
86+
break;
87+
case OCFS2_LOCK_TYPE_NFS_SYNC:
88+
c = 'Y';
89+
break;
90+
case OCFS2_LOCK_TYPE_ORPHAN_SCAN:
91+
c = 'P';
92+
break;
93+
case OCFS2_LOCK_TYPE_REFCOUNT:
94+
c = 'T';
95+
break;
8096
default:
8197
c = '\0';
8298
}
@@ -95,6 +111,10 @@ static char *ocfs2_lock_type_strings[] = {
95111
[OCFS2_LOCK_TYPE_DENTRY] = "Dentry",
96112
[OCFS2_LOCK_TYPE_OPEN] = "Open",
97113
[OCFS2_LOCK_TYPE_FLOCK] = "Flock",
114+
[OCFS2_LOCK_TYPE_QINFO] = "Quota",
115+
[OCFS2_LOCK_TYPE_NFS_SYNC] = "NFSSync",
116+
[OCFS2_LOCK_TYPE_ORPHAN_SCAN] = "OrphanScan",
117+
[OCFS2_LOCK_TYPE_REFCOUNT] = "Refcount",
98118
};
99119

100120
static inline const char *ocfs2_lock_type_string(enum ocfs2_lock_type type)

0 commit comments

Comments
 (0)