ext4: Add sysfs support
Theodore Ts'o
maintainerPATCH 1/1 ext4: Add sysfs support
Add basic sysfs support so that information about the mounted filesystem and various tuning parameters can be accessed via /sys/fs/ext4/<dev>/*.
--- fs/ext4/ext4_sb.h | 2 + fs/ext4/super.c | 198 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 200 insertions(+), 0 deletions(-)
fs/ext4/ext4_sb.h +2 -0
@@ -64,6 +64,8 @@ struct ext4_sb_info {struct percpu_counter s_dirtyblocks_counter;struct blockgroup_lock *s_blockgroup_lock;struct proc_dir_entry *s_proc; +struct kobject s_kobj; +struct completion s_kobj_unregister;/* Journaling */ struct inode *s_journal_inode;
fs/ext4/super.c +198 -0
246 lines not on this page · raw message
Signature · 1 line
1.5.6.3
Theodore Ts'o
maintainerPATCH 1/1 ext4: remove /proc tuning knobs
Remove tuning knobs in /proc/fs/ext4/<dev/* since they have been replaced by knobs in sysfs at /sys/fs/ext4/<dev>/*.
--- fs/ext4/ext4.h | 16 ------- fs/ext4/inode.c | 7 +--- fs/ext4/mballoc.c | 117 +++++++++++++---------------------------------------- fs/ext4/super.c | 46 --------------------- 4 files changed, 30 insertions(+), 156 deletions(-)
fs/ext4/ext4.h +0 -16
@@ -975,22 +975,6 @@ void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr,extern struct proc_dir_entry *ext4_proc_root; -#ifdef CONFIG_PROC_FS -extern const struct file_operations ext4_ui_proc_fops; - -#define EXT4_PROC_HANDLER (name, var) \ -do { \ - proc = proc_create_data(name, mode, sbi->s_proc, \ - &ext4_ui_proc_fops, &sbi->s_##var); \ - if (proc == NULL) { \ - printk(KERN_ERR "EXT4-fs: can't create %s\n", name); \ - goto err_out; \ - } \ -} while (0) -#else -#define EXT4_PROC_HANDLER (name, var) -#endif -/* * Function prototypes */
fs/ext4/inode.c +1 -6
@@ -4124,12 +4124,7 @@ make_io:unsigned num; table =ext4_inode_table (sb, gdp); -/* Make sure s_inode_readahead_blks is a power of 2 */ -while (EXT4_SB (sb)->s_inode_readahead_blks & - (EXT4_SB (sb)->s_inode_readahead_blks-1 )) -EXT4_SB (sb)->s_inode_readahead_blks = - (EXT4_SB (sb)->s_inode_readahead_blks & - (EXT4_SB (sb)->s_inode_readahead_blks-1 )); +/* s_inode_readahead_blks is always a power of 2 */ b = block & ~(EXT4_SB (sb)->s_inode_readahead_blks-1 );if (table > b) b = table;
fs/ext4/mballoc.c +29 -88
185 lines not on this page · raw message
fs/ext4/super.c +0 -45
66 lines not on this page · raw message
Re: [PATCH] ext4: remove /proc tuning knobs
Quoted 11 lines · Theodore Ts'o
Remove tuning knobs in /proc/fs/ext4/<dev/* since they have been replaced by knobs in sysfs at /sys/fs/ext4/<dev>/*.
Signed-off-by "Theodore Ts'o" <[email protected]>--- fs/ext4/ext4.h | 16 ------- fs/ext4/inode.c | 7 +--- fs/ext4/mballoc.c | 117 +++++++++++++---------------------------------------- fs/ext4/super.c | 46 --------------------- 4 files changed, 30 insertions(+), 156 deletions(-)
This patch would need changes to Documentation/filesystems/proc.txt
-aneesh
Theodore Tso
maintainerRe: [PATCH] ext4: remove /proc tuning knobs
Quoted 13 lines · Aneesh Kumar K.V
Quoted 11 lines · Theodore Ts'o
Remove tuning knobs in /proc/fs/ext4/<dev/* since they have been replaced by knobs in sysfs at /sys/fs/ext4/<dev>/*.
Signed-off-by "Theodore Ts'o" <[email protected]>--- fs/ext4/ext4.h | 16 ------- fs/ext4/inode.c | 7 +--- fs/ext4/mballoc.c | 117 +++++++++++++---------------------------------------- fs/ext4/super.c | 46 --------------------- 4 files changed, 30 insertions(+), 156 deletions(-)
Quoted 1 line
This patch would need changes to
Documentation/filesystems/proc.txt
Good point, added, thanks.
- Ted
Quoted 10 lines · Theodore Ts'o
Add basic sysfs support so that information about the mounted filesystem and various tuning parameters can be accessed via /sys/fs/ext4/<dev>/*.
Signed-off-by "Theodore Ts'o" <[email protected]>--- fs/ext4/ext4_sb.h | 2 + fs/ext4/super.c | 198 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 200 insertions(+), 0 deletions(-)
This needs documentation in Documentation/ABI/testing.
-aneesh
Theodore Tso
maintainerQuoted 5 lines · Aneesh Kumar K.V
Quoted 4 lines · Theodore Ts'o
Add basic sysfs support so that information about the mounted filesystem and various tuning parameters can be accessed via /sys/fs/ext4/<dev>/*.
Quoted 8 lines
Quoted 6 lines
Signed-off-by "Theodore Ts'o" <[email protected]>--- fs/ext4/ext4_sb.h | 2 + fs/ext4/super.c | 198 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 200 insertions(+), 0 deletions(-)This needs documentation in
Documentation/ABI/testing.
Good point, added, thanks.
- Ted