From 8c55e20411c9499c52890a081724a8b71f3dc3a1 Mon Sep 17 00:00:00 2001 From: Dave Kleikamp Date: Thu, 24 May 2007 13:04:54 -0400 Subject: EXT4: Fix whitespace Replace a lot of spaces with tabs Signed-off-by: Dave Kleikamp Signed-off-by: "Theodore Ts'o" --- include/linux/ext4_fs.h | 24 ++++++++++++------------ include/linux/ext4_fs_extents.h | 4 ++-- include/linux/ext4_fs_i.h | 6 +++--- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'include') diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h index 54c576d414c..14886847a04 100644 --- a/include/linux/ext4_fs.h +++ b/include/linux/ext4_fs.h @@ -32,9 +32,9 @@ /* * Define EXT4_RESERVATION to reserve data blocks for expanding files */ -#define EXT4_DEFAULT_RESERVE_BLOCKS 8 +#define EXT4_DEFAULT_RESERVE_BLOCKS 8 /*max window size: 1024(direct blocks) + 3([t,d]indirect blocks) */ -#define EXT4_MAX_RESERVE_BLOCKS 1027 +#define EXT4_MAX_RESERVE_BLOCKS 1027 #define EXT4_RESERVE_WINDOW_NOT_ALLOCATED 0 /* * Always enable hashed directories @@ -204,12 +204,12 @@ struct ext4_group_desc /* Used to pass group descriptor data when online resize is done */ struct ext4_new_group_input { - __u32 group; /* Group number for this data */ - __u64 block_bitmap; /* Absolute block number of block bitmap */ - __u64 inode_bitmap; /* Absolute block number of inode bitmap */ - __u64 inode_table; /* Absolute block number of inode table start */ - __u32 blocks_count; /* Total number of blocks in this group */ - __u16 reserved_blocks; /* Number of reserved blocks in this group */ + __u32 group; /* Group number for this data */ + __u64 block_bitmap; /* Absolute block number of block bitmap */ + __u64 inode_bitmap; /* Absolute block number of inode bitmap */ + __u64 inode_table; /* Absolute block number of inode table start */ + __u32 blocks_count; /* Total number of blocks in this group */ + __u16 reserved_blocks; /* Number of reserved blocks in this group */ __u16 unused; }; @@ -310,7 +310,7 @@ struct ext4_inode { __u8 l_i_frag; /* Fragment number */ __u8 l_i_fsize; /* Fragment size */ __le16 l_i_file_acl_high; - __le16 l_i_uid_high; /* these 2 fields */ + __le16 l_i_uid_high; /* these 2 fields */ __le16 l_i_gid_high; /* were reserved2[0] */ __u32 l_i_reserved2; } linux2; @@ -780,9 +780,9 @@ void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr, * Ok, these declarations are also in but none of the * ext4 source programs needs to include it so they are duplicated here. */ -# define NORET_TYPE /**/ -# define ATTRIB_NORET __attribute__((noreturn)) -# define NORET_AND noreturn, +# define NORET_TYPE /**/ +# define ATTRIB_NORET __attribute__((noreturn)) +# define NORET_AND noreturn, /* balloc.c */ extern unsigned int ext4_block_group(struct super_block *sb, diff --git a/include/linux/ext4_fs_extents.h b/include/linux/ext4_fs_extents.h index 7eb1d73fc5d..da23233a662 100644 --- a/include/linux/ext4_fs_extents.h +++ b/include/linux/ext4_fs_extents.h @@ -151,8 +151,8 @@ typedef int (*ext_prepare_callback)(struct inode *, struct ext4_ext_path *, ((struct ext4_extent_idx *) (((char *) (__hdr__)) + \ sizeof(struct ext4_extent_header))) #define EXT_HAS_FREE_INDEX(__path__) \ - (le16_to_cpu((__path__)->p_hdr->eh_entries) \ - < le16_to_cpu((__path__)->p_hdr->eh_max)) + (le16_to_cpu((__path__)->p_hdr->eh_entries) \ + < le16_to_cpu((__path__)->p_hdr->eh_max)) #define EXT_LAST_EXTENT(__hdr__) \ (EXT_FIRST_EXTENT((__hdr__)) + le16_to_cpu((__hdr__)->eh_entries) - 1) #define EXT_LAST_INDEX(__hdr__) \ diff --git a/include/linux/ext4_fs_i.h b/include/linux/ext4_fs_i.h index d5b177e5b39..9de49440699 100644 --- a/include/linux/ext4_fs_i.h +++ b/include/linux/ext4_fs_i.h @@ -41,14 +41,14 @@ struct ext4_reserve_window_node { struct ext4_block_alloc_info { /* information about reservation window */ - struct ext4_reserve_window_node rsv_window_node; + struct ext4_reserve_window_node rsv_window_node; /* * was i_next_alloc_block in ext4_inode_info * is the logical (file-relative) number of the * most-recently-allocated block in this file. * We use this for detecting linearly ascending allocation requests. */ - __u32 last_alloc_logical_block; + __u32 last_alloc_logical_block; /* * Was i_next_alloc_goal in ext4_inode_info * is the *physical* companion to i_next_alloc_block. @@ -56,7 +56,7 @@ struct ext4_block_alloc_info { * allocated to this file. This give us the goal (target) for the next * allocation when we detect linearly ascending requests. */ - ext4_fsblk_t last_alloc_physical_block; + ext4_fsblk_t last_alloc_physical_block; }; #define rsv_start rsv_window._rsv_start -- cgit v1.2.3 From 25d14f983f70ddbeb15fa2d0f32f6b70bca42a15 Mon Sep 17 00:00:00 2001 From: Amit Arora Date: Thu, 24 May 2007 13:04:13 -0400 Subject: ext4: Extent overlap bugfix This patch adds a check for overlap of extents and cuts short the new extent to be inserted, if there is a chance of overlap. Signed-off-by: Amit Arora Signed-off-by: "Theodore Ts'o" --- include/linux/ext4_fs_extents.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/ext4_fs_extents.h b/include/linux/ext4_fs_extents.h index da23233a662..acfe59740b0 100644 --- a/include/linux/ext4_fs_extents.h +++ b/include/linux/ext4_fs_extents.h @@ -190,6 +190,7 @@ ext4_ext_invalidate_cache(struct inode *inode) extern int ext4_extent_tree_init(handle_t *, struct inode *); extern int ext4_ext_calc_credits_for_insert(struct inode *, struct ext4_ext_path *); +extern unsigned int ext4_ext_check_overlap(struct inode *, struct ext4_extent *, struct ext4_ext_path *); extern int ext4_ext_insert_extent(handle_t *, struct inode *, struct ext4_ext_path *, struct ext4_extent *); extern int ext4_ext_walk_space(struct inode *, unsigned long, unsigned long, ext_prepare_callback, void *); extern struct ext4_ext_path * ext4_ext_find_extent(struct inode *, int, struct ext4_ext_path *); -- cgit v1.2.3 From 436bd75e47cf804dfe89f805106bb53ff577e99a Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 31 May 2007 12:43:28 -0400 Subject: Define/reserve new ext4 superblock fields Signed-off-by: "Theodore Ts'o" --- include/linux/ext4_fs.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h index 14886847a04..de1f9f78625 100644 --- a/include/linux/ext4_fs.h +++ b/include/linux/ext4_fs.h @@ -513,7 +513,14 @@ struct ext4_super_block { /*150*/ __le32 s_blocks_count_hi; /* Blocks count */ __le32 s_r_blocks_count_hi; /* Reserved blocks count */ __le32 s_free_blocks_count_hi; /* Free blocks count */ - __u32 s_reserved[169]; /* Padding to the end of the block */ + __u16 s_min_extra_isize; /* All inodes have at least # bytes */ + __u16 s_want_extra_isize; /* New inodes should reserve # bytes */ + __u32 s_flags; /* Miscellaneous flags */ + __u16 s_raid_stride; /* RAID stride */ + __u16 s_mmp_interval; /* # seconds to wait in MMP checking */ + __u64 s_mmp_block; /* Block for multi-mount protection */ + __u32 s_raid_stripe_width; /* blocks on all data disks (N*stride)*/ + __u32 s_reserved[163]; /* Padding to the end of the block */ }; #ifdef __KERNEL__ -- cgit v1.2.3