Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2595b8a authored by Theodore Ts'o's avatar Theodore Ts'o
Browse files

ext4: Add second mount options field since the s_mount_opt is full up



Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 673c6100
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -908,6 +908,13 @@ struct ext4_inode_info {
#define test_opt(sb, opt)		(EXT4_SB(sb)->s_mount_opt & \
#define test_opt(sb, opt)		(EXT4_SB(sb)->s_mount_opt & \
					 EXT4_MOUNT_##opt)
					 EXT4_MOUNT_##opt)


#define clear_opt2(sb, opt)		EXT4_SB(sb)->s_mount_opt2 &= \
						~EXT4_MOUNT2_##opt
#define set_opt2(sb, opt)		EXT4_SB(sb)->s_mount_opt2 |= \
						EXT4_MOUNT2_##opt
#define test_opt2(sb, opt)		(EXT4_SB(sb)->s_mount_opt2 & \
					 EXT4_MOUNT2_##opt)

#define ext4_set_bit			ext2_set_bit
#define ext4_set_bit			ext2_set_bit
#define ext4_set_bit_atomic		ext2_set_bit_atomic
#define ext4_set_bit_atomic		ext2_set_bit_atomic
#define ext4_clear_bit			ext2_clear_bit
#define ext4_clear_bit			ext2_clear_bit
@@ -1073,6 +1080,7 @@ struct ext4_sb_info {
	struct ext4_super_block *s_es;	/* Pointer to the super block in the buffer */
	struct ext4_super_block *s_es;	/* Pointer to the super block in the buffer */
	struct buffer_head **s_group_desc;
	struct buffer_head **s_group_desc;
	unsigned int s_mount_opt;
	unsigned int s_mount_opt;
	unsigned int s_mount_opt2;
	unsigned int s_mount_flags;
	unsigned int s_mount_flags;
	ext4_fsblk_t s_sb_block;
	ext4_fsblk_t s_sb_block;
	uid_t s_resuid;
	uid_t s_resuid;
+5 −2
Original line number Original line Diff line number Diff line
@@ -1895,12 +1895,12 @@ static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es,
	ext4_commit_super(sb, 1);
	ext4_commit_super(sb, 1);
	if (test_opt(sb, DEBUG))
	if (test_opt(sb, DEBUG))
		printk(KERN_INFO "[EXT4 FS bs=%lu, gc=%u, "
		printk(KERN_INFO "[EXT4 FS bs=%lu, gc=%u, "
				"bpg=%lu, ipg=%lu, mo=%04x]\n",
				"bpg=%lu, ipg=%lu, mo=%04x, mo2=%04x]\n",
			sb->s_blocksize,
			sb->s_blocksize,
			sbi->s_groups_count,
			sbi->s_groups_count,
			EXT4_BLOCKS_PER_GROUP(sb),
			EXT4_BLOCKS_PER_GROUP(sb),
			EXT4_INODES_PER_GROUP(sb),
			EXT4_INODES_PER_GROUP(sb),
			sbi->s_mount_opt);
			sbi->s_mount_opt, sbi->s_mount_opt2);


	return res;
	return res;
}
}
@@ -4171,6 +4171,7 @@ static int ext4_unfreeze(struct super_block *sb)
 */
 */
struct ext4_mount_options {
struct ext4_mount_options {
	unsigned long s_mount_opt;
	unsigned long s_mount_opt;
	unsigned long s_mount_opt2;
	uid_t s_resuid;
	uid_t s_resuid;
	gid_t s_resgid;
	gid_t s_resgid;
	unsigned long s_commit_interval;
	unsigned long s_commit_interval;
@@ -4201,6 +4202,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
	lock_super(sb);
	lock_super(sb);
	old_sb_flags = sb->s_flags;
	old_sb_flags = sb->s_flags;
	old_opts.s_mount_opt = sbi->s_mount_opt;
	old_opts.s_mount_opt = sbi->s_mount_opt;
	old_opts.s_mount_opt2 = sbi->s_mount_opt2;
	old_opts.s_resuid = sbi->s_resuid;
	old_opts.s_resuid = sbi->s_resuid;
	old_opts.s_resgid = sbi->s_resgid;
	old_opts.s_resgid = sbi->s_resgid;
	old_opts.s_commit_interval = sbi->s_commit_interval;
	old_opts.s_commit_interval = sbi->s_commit_interval;
@@ -4354,6 +4356,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
restore_opts:
restore_opts:
	sb->s_flags = old_sb_flags;
	sb->s_flags = old_sb_flags;
	sbi->s_mount_opt = old_opts.s_mount_opt;
	sbi->s_mount_opt = old_opts.s_mount_opt;
	sbi->s_mount_opt2 = old_opts.s_mount_opt2;
	sbi->s_resuid = old_opts.s_resuid;
	sbi->s_resuid = old_opts.s_resuid;
	sbi->s_resgid = old_opts.s_resgid;
	sbi->s_resgid = old_opts.s_resgid;
	sbi->s_commit_interval = old_opts.s_commit_interval;
	sbi->s_commit_interval = old_opts.s_commit_interval;