Skip to content

Commit 9cbc012

Browse files
Joel BeckerTao Ma
Joel Becker
authored and
Tao Ma
committed
ocfs2: Add suballoc_loc to metadata blocks.
We need a suballoc_loc field on any suballocated block. Define them. Signed-off-by: Joel Becker <joel.becker@oracle.com>
1 parent 7d1fe09 commit 9cbc012

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

fs/ocfs2/ocfs2_fs.h

+24-5
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,10 @@ struct ocfs2_extent_block
507507
block group */
508508
__le32 h_fs_generation; /* Must match super block */
509509
__le64 h_blkno; /* Offset on disk, in blocks */
510-
/*20*/ __le64 h_reserved3;
510+
/*20*/ __le64 h_suballoc_loc; /* Suballocator block group this
511+
eb belongs to. Only valid
512+
if allocated from a
513+
discontiguous block group */
511514
__le64 h_next_leaf_blk; /* Offset on disk, in blocks,
512515
of next leaf header pointing
513516
to data */
@@ -674,7 +677,11 @@ struct ocfs2_dinode {
674677
/*80*/ struct ocfs2_block_check i_check; /* Error checking */
675678
/*88*/ __le64 i_dx_root; /* Pointer to dir index root block */
676679
/*90*/ __le64 i_refcount_loc;
677-
__le64 i_reserved2[4];
680+
__le64 i_suballoc_loc; /* Suballocator block group this
681+
inode belongs to. Only valid
682+
if allocated from a
683+
discontiguous block group */
684+
/*A0*/ __le64 i_reserved2[3];
678685
/*B8*/ union {
679686
__le64 i_pad1; /* Generic way to refer to this
680687
64bit union */
@@ -809,7 +816,12 @@ struct ocfs2_dx_root_block {
809816
__le32 dr_reserved2;
810817
__le64 dr_free_blk; /* Pointer to head of free
811818
* unindexed block list. */
812-
__le64 dr_reserved3[15];
819+
__le64 dr_suballoc_loc; /* Suballocator block group
820+
this root belongs to.
821+
Only valid if allocated
822+
from a discontiguous
823+
block group */
824+
__le64 dr_reserved3[14];
813825
union {
814826
struct ocfs2_extent_list dr_list; /* Keep this aligned to 128
815827
* bits for maximum space
@@ -929,7 +941,11 @@ struct ocfs2_refcount_block {
929941
/*40*/ __le32 rf_generation; /* generation number. all be the same
930942
* for the same refcount tree. */
931943
__le32 rf_reserved0;
932-
__le64 rf_reserved1[7];
944+
__le64 rf_suballoc_loc; /* Suballocator block group this
945+
refcount block belongs to. Only
946+
valid if allocated from a
947+
discontiguous block group */
948+
/*50*/ __le64 rf_reserved1[6];
933949
/*80*/ union {
934950
struct ocfs2_refcount_list rf_records; /* List of refcount
935951
records */
@@ -1041,7 +1057,10 @@ struct ocfs2_xattr_block {
10411057
real xattr or a xattr tree. */
10421058
__le16 xb_reserved0;
10431059
__le32 xb_reserved1;
1044-
__le64 xb_reserved2;
1060+
__le64 xb_suballoc_loc; /* Suballocator block group this
1061+
xattr block belongs to. Only
1062+
valid if allocated from a
1063+
discontiguous block group */
10451064
/*30*/ union {
10461065
struct ocfs2_xattr_header xb_header; /* xattr header if this
10471066
block contains xattr */

0 commit comments

Comments
 (0)