diff options
author | Jan Kara <jack@suse.cz> | 2008-08-20 09:43:36 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-01-05 11:40:23 -0500 |
commit | 1a224ad11eeb190da4a123e156601aad1bb67f24 (patch) | |
tree | 093f4e8449c0fed95af2d73904f67c65a93241ff /fs/ocfs2/ocfs2_fs.h | |
parent | 90e86a63eadf1a3b2f19b68d82150dc63fe01443 (diff) |
ocfs2: Assign feature bits and system inodes to quota feature and quota files
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/ocfs2_fs.h')
-rw-r--r-- | fs/ocfs2/ocfs2_fs.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/fs/ocfs2/ocfs2_fs.h b/fs/ocfs2/ocfs2_fs.h index 5e0c0d0aef7d..06e3bd632ff3 100644 --- a/fs/ocfs2/ocfs2_fs.h +++ b/fs/ocfs2/ocfs2_fs.h | |||
@@ -94,7 +94,7 @@ | |||
94 | | OCFS2_FEATURE_INCOMPAT_EXTENDED_SLOT_MAP \ | 94 | | OCFS2_FEATURE_INCOMPAT_EXTENDED_SLOT_MAP \ |
95 | | OCFS2_FEATURE_INCOMPAT_USERSPACE_STACK \ | 95 | | OCFS2_FEATURE_INCOMPAT_USERSPACE_STACK \ |
96 | | OCFS2_FEATURE_INCOMPAT_XATTR) | 96 | | OCFS2_FEATURE_INCOMPAT_XATTR) |
97 | #define OCFS2_FEATURE_RO_COMPAT_SUPP OCFS2_FEATURE_RO_COMPAT_UNWRITTEN | 97 | #define OCFS2_FEATURE_RO_COMPAT_SUPP (OCFS2_FEATURE_RO_COMPAT_UNWRITTEN) |
98 | 98 | ||
99 | /* | 99 | /* |
100 | * Heartbeat-only devices are missing journals and other files. The | 100 | * Heartbeat-only devices are missing journals and other files. The |
@@ -163,6 +163,12 @@ | |||
163 | */ | 163 | */ |
164 | #define OCFS2_FEATURE_RO_COMPAT_UNWRITTEN 0x0001 | 164 | #define OCFS2_FEATURE_RO_COMPAT_UNWRITTEN 0x0001 |
165 | 165 | ||
166 | /* | ||
167 | * Maintain quota information for this filesystem | ||
168 | */ | ||
169 | #define OCFS2_FEATURE_RO_COMPAT_USRQUOTA 0x0002 | ||
170 | #define OCFS2_FEATURE_RO_COMPAT_GRPQUOTA 0x0004 | ||
171 | |||
166 | /* The byte offset of the first backup block will be 1G. | 172 | /* The byte offset of the first backup block will be 1G. |
167 | * The following will be 4G, 16G, 64G, 256G and 1T. | 173 | * The following will be 4G, 16G, 64G, 256G and 1T. |
168 | */ | 174 | */ |
@@ -192,6 +198,7 @@ | |||
192 | #define OCFS2_HEARTBEAT_FL (0x00000200) /* Heartbeat area */ | 198 | #define OCFS2_HEARTBEAT_FL (0x00000200) /* Heartbeat area */ |
193 | #define OCFS2_CHAIN_FL (0x00000400) /* Chain allocator */ | 199 | #define OCFS2_CHAIN_FL (0x00000400) /* Chain allocator */ |
194 | #define OCFS2_DEALLOC_FL (0x00000800) /* Truncate log */ | 200 | #define OCFS2_DEALLOC_FL (0x00000800) /* Truncate log */ |
201 | #define OCFS2_QUOTA_FL (0x00001000) /* Quota file */ | ||
195 | 202 | ||
196 | /* | 203 | /* |
197 | * Flags on ocfs2_dinode.i_dyn_features | 204 | * Flags on ocfs2_dinode.i_dyn_features |
@@ -329,13 +336,17 @@ enum { | |||
329 | #define OCFS2_FIRST_ONLINE_SYSTEM_INODE SLOT_MAP_SYSTEM_INODE | 336 | #define OCFS2_FIRST_ONLINE_SYSTEM_INODE SLOT_MAP_SYSTEM_INODE |
330 | HEARTBEAT_SYSTEM_INODE, | 337 | HEARTBEAT_SYSTEM_INODE, |
331 | GLOBAL_BITMAP_SYSTEM_INODE, | 338 | GLOBAL_BITMAP_SYSTEM_INODE, |
332 | #define OCFS2_LAST_GLOBAL_SYSTEM_INODE GLOBAL_BITMAP_SYSTEM_INODE | 339 | USER_QUOTA_SYSTEM_INODE, |
340 | GROUP_QUOTA_SYSTEM_INODE, | ||
341 | #define OCFS2_LAST_GLOBAL_SYSTEM_INODE GROUP_QUOTA_SYSTEM_INODE | ||
333 | ORPHAN_DIR_SYSTEM_INODE, | 342 | ORPHAN_DIR_SYSTEM_INODE, |
334 | EXTENT_ALLOC_SYSTEM_INODE, | 343 | EXTENT_ALLOC_SYSTEM_INODE, |
335 | INODE_ALLOC_SYSTEM_INODE, | 344 | INODE_ALLOC_SYSTEM_INODE, |
336 | JOURNAL_SYSTEM_INODE, | 345 | JOURNAL_SYSTEM_INODE, |
337 | LOCAL_ALLOC_SYSTEM_INODE, | 346 | LOCAL_ALLOC_SYSTEM_INODE, |
338 | TRUNCATE_LOG_SYSTEM_INODE, | 347 | TRUNCATE_LOG_SYSTEM_INODE, |
348 | LOCAL_USER_QUOTA_SYSTEM_INODE, | ||
349 | LOCAL_GROUP_QUOTA_SYSTEM_INODE, | ||
339 | NUM_SYSTEM_INODES | 350 | NUM_SYSTEM_INODES |
340 | }; | 351 | }; |
341 | 352 | ||
@@ -349,6 +360,8 @@ static struct ocfs2_system_inode_info ocfs2_system_inodes[NUM_SYSTEM_INODES] = { | |||
349 | [SLOT_MAP_SYSTEM_INODE] = { "slot_map", 0, S_IFREG | 0644 }, | 360 | [SLOT_MAP_SYSTEM_INODE] = { "slot_map", 0, S_IFREG | 0644 }, |
350 | [HEARTBEAT_SYSTEM_INODE] = { "heartbeat", OCFS2_HEARTBEAT_FL, S_IFREG | 0644 }, | 361 | [HEARTBEAT_SYSTEM_INODE] = { "heartbeat", OCFS2_HEARTBEAT_FL, S_IFREG | 0644 }, |
351 | [GLOBAL_BITMAP_SYSTEM_INODE] = { "global_bitmap", 0, S_IFREG | 0644 }, | 362 | [GLOBAL_BITMAP_SYSTEM_INODE] = { "global_bitmap", 0, S_IFREG | 0644 }, |
363 | [USER_QUOTA_SYSTEM_INODE] = { "aquota.user", OCFS2_QUOTA_FL, S_IFREG | 0644 }, | ||
364 | [GROUP_QUOTA_SYSTEM_INODE] = { "aquota.group", OCFS2_QUOTA_FL, S_IFREG | 0644 }, | ||
352 | 365 | ||
353 | /* Slot-specific system inodes (one copy per slot) */ | 366 | /* Slot-specific system inodes (one copy per slot) */ |
354 | [ORPHAN_DIR_SYSTEM_INODE] = { "orphan_dir:%04d", 0, S_IFDIR | 0755 }, | 367 | [ORPHAN_DIR_SYSTEM_INODE] = { "orphan_dir:%04d", 0, S_IFDIR | 0755 }, |
@@ -356,7 +369,9 @@ static struct ocfs2_system_inode_info ocfs2_system_inodes[NUM_SYSTEM_INODES] = { | |||
356 | [INODE_ALLOC_SYSTEM_INODE] = { "inode_alloc:%04d", OCFS2_BITMAP_FL | OCFS2_CHAIN_FL, S_IFREG | 0644 }, | 369 | [INODE_ALLOC_SYSTEM_INODE] = { "inode_alloc:%04d", OCFS2_BITMAP_FL | OCFS2_CHAIN_FL, S_IFREG | 0644 }, |
357 | [JOURNAL_SYSTEM_INODE] = { "journal:%04d", OCFS2_JOURNAL_FL, S_IFREG | 0644 }, | 370 | [JOURNAL_SYSTEM_INODE] = { "journal:%04d", OCFS2_JOURNAL_FL, S_IFREG | 0644 }, |
358 | [LOCAL_ALLOC_SYSTEM_INODE] = { "local_alloc:%04d", OCFS2_BITMAP_FL | OCFS2_LOCAL_ALLOC_FL, S_IFREG | 0644 }, | 371 | [LOCAL_ALLOC_SYSTEM_INODE] = { "local_alloc:%04d", OCFS2_BITMAP_FL | OCFS2_LOCAL_ALLOC_FL, S_IFREG | 0644 }, |
359 | [TRUNCATE_LOG_SYSTEM_INODE] = { "truncate_log:%04d", OCFS2_DEALLOC_FL, S_IFREG | 0644 } | 372 | [TRUNCATE_LOG_SYSTEM_INODE] = { "truncate_log:%04d", OCFS2_DEALLOC_FL, S_IFREG | 0644 }, |
373 | [LOCAL_USER_QUOTA_SYSTEM_INODE] = { "aquota.user:%04d", OCFS2_QUOTA_FL, S_IFREG | 0644 }, | ||
374 | [LOCAL_GROUP_QUOTA_SYSTEM_INODE] = { "aquota.group:%04d", OCFS2_QUOTA_FL, S_IFREG | 0644 }, | ||
360 | }; | 375 | }; |
361 | 376 | ||
362 | /* Parameter passed from mount.ocfs2 to module */ | 377 | /* Parameter passed from mount.ocfs2 to module */ |