Viewing: ext4-misc.patch
commit b175e2441b0cd9fae60341ba92b0f7f192e71446
Author: girish <girish>
b=16893
i=adilger
i=johann
ext4 ldiskfs patches for rhel5
ported to linux 6.10
---
fs/ext4/ext4.h | 23 ++++++++++++++++++++++-
fs/ext4/ialloc.c | 3 ++-
fs/ext4/inode.c | 17 +++++++++++++++++
fs/ext4/namei.c | 9 ++++++---
fs/ext4/super.c | 6 ------
fs/ext4/xattr.c | 2 ++
6 files changed, 49 insertions(+), 11 deletions(-)
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index b5827d01..95bbfd52 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2225,7 +2225,21 @@ static inline bool ext4_has_unknown_ext##ver##_incompat_features(struct super_bl
EXTN_FEATURE_FUNCS(2)
EXTN_FEATURE_FUNCS(3)
-EXTN_FEATURE_FUNCS(4)
+static inline bool ext4_has_unknown_ext4_compat_features(struct super_block *sb)
+{
+ return ((EXT4_SB(sb)->s_es->s_feature_compat &
+ cpu_to_le32(~EXT4_FEATURE_COMPAT_SUPP)) != 0);
+}
+static inline bool ext4_has_unknown_ext4_ro_compat_features(struct super_block *sb)
+{
+ return ((EXT4_SB(sb)->s_es->s_feature_ro_compat &
+ cpu_to_le32(~EXT4_FEATURE_RO_COMPAT_SUPP)) != 0);
+}
+static inline bool ext4_has_unknown_ext4_incompat_features(struct super_block *sb)
+{
+ return ((EXT4_SB(sb)->s_es->s_feature_incompat &
+ cpu_to_le32(~EXT4_FEATURE_INCOMPAT_SUPP)) != 0);
+}
static inline bool ext4_has_compat_features(struct super_block *sb)
{
@@ -3695,6 +3709,13 @@ struct ext4_extent;
#define EXT_MAX_BLOCKS 0xffffffff
extern void ext4_ext_tree_init(handle_t *handle, struct inode *inode);
+extern struct buffer_head *ext4_read_inode_bitmap(struct super_block *sb,
+ ext4_group_t block_group);
+extern void ext4_inc_count(struct inode *inode);
+extern void ext4_dec_count(struct inode *inode);
+extern struct buffer_head *ext4_append(handle_t *handle,
+ struct inode *inode,
+ ext4_lblk_t *block);
extern int ext4_ext_index_trans_blocks(struct inode *inode, int extents);
extern int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
struct ext4_map_blocks *map, int flags);
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 93689dae..31480792 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -120,7 +120,7 @@ verified:
*
* Return buffer_head of bitmap on success, or an ERR_PTR on error.
*/
-static struct buffer_head *
+struct buffer_head *
ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)
{
struct ext4_group_desc *desc;
@@ -215,6 +215,7 @@ out:
put_bh(bh);
return ERR_PTR(err);
}
+EXPORT_SYMBOL(ext4_read_inode_bitmap);
/*
* NOTE! When we get the inode, we're the only people
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 339bdfac..cd8ab8d3 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -6166,3 +6166,21 @@ out_error:
ext4_journal_stop(handle);
goto out;
}
+EXPORT_SYMBOL(ext4_map_blocks);
+EXPORT_SYMBOL(ext4_truncate);
+EXPORT_SYMBOL(ext4_iget);
+EXPORT_SYMBOL(ext4_bread);
+EXPORT_SYMBOL(ext4_itable_unused_count);
+EXPORT_SYMBOL(ext4_force_commit);
+EXPORT_SYMBOL(__ext4_mark_inode_dirty);
+EXPORT_SYMBOL(ext4_get_group_desc);
+EXPORT_SYMBOL(__ext4_journal_get_create_access);
+EXPORT_SYMBOL(__ext4_journal_get_write_access);
+EXPORT_SYMBOL(__ext4_journal_start_sb);
+EXPORT_SYMBOL(__ext4_journal_stop);
+EXPORT_SYMBOL(__ext4_handle_dirty_metadata);
+EXPORT_SYMBOL(__ext4_std_error);
+EXPORT_SYMBOL(ext4fs_dirhash);
+EXPORT_SYMBOL(ext4_get_inode_loc);
+EXPORT_SYMBOL(__ext4_journal_ensure_credits);
+EXPORT_SYMBOL(ext4_chunk_trans_blocks);
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 8f9c3c0e..bfd849ca 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -50,7 +50,7 @@
#define NAMEI_RA_BLOCKS 4
#define NAMEI_RA_SIZE (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS)
-static struct buffer_head *ext4_append(handle_t *handle,
+struct buffer_head *ext4_append(handle_t *handle,
struct inode *inode,
ext4_lblk_t *block)
{
@@ -210,6 +210,7 @@ static struct buffer_head *__ext4_read_dirblock(struct inode *inode,
}
return bh;
}
+EXPORT_SYMBOL(ext4_append);
#ifdef DX_DEBUG
#define dxtrace(command) command
@@ -2786,23 +2787,25 @@ EXPORT_SYMBOL(ext4_delete_entry);
* for checking S_ISDIR(inode) (since the INODE_INDEX feature will not be set
* on regular files) and to avoid creating huge/slow non-HTREE directories.
*/
-static void ext4_inc_count(struct inode *inode)
+void ext4_inc_count(struct inode *inode)
{
inc_nlink(inode);
if (is_dx(inode) &&
(inode->i_nlink > EXT4_LINK_MAX || inode->i_nlink == 2))
set_nlink(inode, 1);
}
+EXPORT_SYMBOL(ext4_inc_count);
/*
* If a directory had nlink == 1, then we should let it be 1. This indicates
* directory has >EXT4_LINK_MAX subdirs.
*/
-static void ext4_dec_count(struct inode *inode)
+void ext4_dec_count(struct inode *inode)
{
if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2)
drop_nlink(inode);
}
+EXPORT_SYMBOL(ext4_dec_count);
/*
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index c682fb92..5250fa60 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -7365,16 +7365,12 @@ static int __init ext4_init_fs(void)
if (err)
goto out05;
- register_as_ext3();
- register_as_ext2();
err = register_filesystem(&ext4_fs_type);
if (err)
goto out;
return 0;
out:
- unregister_as_ext2();
- unregister_as_ext3();
ext4_fc_destroy_dentry_cache();
out05:
destroy_inodecache();
@@ -7399,8 +7395,6 @@ out7:
static void __exit ext4_exit_fs(void)
{
ext4_destroy_lazyinit_thread();
- unregister_as_ext2();
- unregister_as_ext3();
unregister_filesystem(&ext4_fs_type);
ext4_fc_destroy_dentry_cache();
destroy_inodecache();
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 6460879b..4b94e270 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -716,6 +716,7 @@ ext4_xattr_get(struct inode *inode, int name_index, const char *name,
up_read(&EXT4_I(inode)->xattr_sem);
return error;
}
+EXPORT_SYMBOL(ext4_xattr_get);
static int
ext4_xattr_list_entries(struct dentry *dentry, struct ext4_xattr_entry *entry,
@@ -2490,6 +2491,7 @@ cleanup:
ext4_write_unlock_xattr(inode, &no_expand);
return error;
}
+EXPORT_SYMBOL(ext4_xattr_set_handle);
int ext4_xattr_set_credits(struct inode *inode, size_t value_len,
bool is_create, int *credits)
--
2.34.1