aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ext3_fs.h
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2008-10-28 13:21:55 -0400
committerTheodore Ts'o <tytso@mit.edu>2008-10-28 13:21:55 -0400
commit5e1f8c9e20a92743eefc9a82c2db835213905e26 (patch)
tree0c945d1e31b87d1d8c18381f4ffe99122ddb797b /include/linux/ext3_fs.h
parent8f72fbdf0d92e6127583cc548bf043c60cd4720f (diff)
ext3: Add support for non-native signed/unsigned htree hash algorithms
The original ext3 hash algorithms assumed that variables of type char were signed, as God and K&R intended. Unfortunately, this assumption is not true on some architectures. Userspace support for marking filesystems with non-native signed/unsigned chars was added two years ago, but the kernel-side support was never added (until now). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org
Diffstat (limited to 'include/linux/ext3_fs.h')
-rw-r--r--include/linux/ext3_fs.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
index d14f02918483..9004794a35fe 100644
--- a/include/linux/ext3_fs.h
+++ b/include/linux/ext3_fs.h
@@ -354,6 +354,13 @@ struct ext3_inode {
354#define EXT3_ORPHAN_FS 0x0004 /* Orphans being recovered */ 354#define EXT3_ORPHAN_FS 0x0004 /* Orphans being recovered */
355 355
356/* 356/*
357 * Misc. filesystem flags
358 */
359#define EXT2_FLAGS_SIGNED_HASH 0x0001 /* Signed dirhash in use */
360#define EXT2_FLAGS_UNSIGNED_HASH 0x0002 /* Unsigned dirhash in use */
361#define EXT2_FLAGS_TEST_FILESYS 0x0004 /* to test development code */
362
363/*
357 * Mount flags 364 * Mount flags
358 */ 365 */
359#define EXT3_MOUNT_CHECK 0x00001 /* Do mount-time checks */ 366#define EXT3_MOUNT_CHECK 0x00001 /* Do mount-time checks */
@@ -489,7 +496,23 @@ struct ext3_super_block {
489 __u16 s_reserved_word_pad; 496 __u16 s_reserved_word_pad;
490 __le32 s_default_mount_opts; 497 __le32 s_default_mount_opts;
491 __le32 s_first_meta_bg; /* First metablock block group */ 498 __le32 s_first_meta_bg; /* First metablock block group */
492 __u32 s_reserved[190]; /* Padding to the end of the block */ 499 __le32 s_mkfs_time; /* When the filesystem was created */
500 __le32 s_jnl_blocks[17]; /* Backup of the journal inode */
501 /* 64bit support valid if EXT4_FEATURE_COMPAT_64BIT */
502/*150*/ __le32 s_blocks_count_hi; /* Blocks count */
503 __le32 s_r_blocks_count_hi; /* Reserved blocks count */
504 __le32 s_free_blocks_count_hi; /* Free blocks count */
505 __le16 s_min_extra_isize; /* All inodes have at least # bytes */
506 __le16 s_want_extra_isize; /* New inodes should reserve # bytes */
507 __le32 s_flags; /* Miscellaneous flags */
508 __le16 s_raid_stride; /* RAID stride */
509 __le16 s_mmp_interval; /* # seconds to wait in MMP checking */
510 __le64 s_mmp_block; /* Block for multi-mount protection */
511 __le32 s_raid_stripe_width; /* blocks on all data disks (N*stride)*/
512 __u8 s_log_groups_per_flex; /* FLEX_BG group size */
513 __u8 s_reserved_char_pad2;
514 __le16 s_reserved_pad;
515 __u32 s_reserved[162]; /* Padding to the end of the block */
493}; 516};
494 517
495#ifdef __KERNEL__ 518#ifdef __KERNEL__
@@ -694,6 +717,9 @@ static inline __le16 ext3_rec_len_to_disk(unsigned len)
694#define DX_HASH_LEGACY 0 717#define DX_HASH_LEGACY 0
695#define DX_HASH_HALF_MD4 1 718#define DX_HASH_HALF_MD4 1
696#define DX_HASH_TEA 2 719#define DX_HASH_TEA 2
720#define DX_HASH_LEGACY_UNSIGNED 3
721#define DX_HASH_HALF_MD4_UNSIGNED 4
722#define DX_HASH_TEA_UNSIGNED 5
697 723
698#ifdef __KERNEL__ 724#ifdef __KERNEL__
699 725