Re: [RFC PATCH v2 2/2] ext4: Add 64-bit inode number support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 1, 2017, at 3:24 PM, Artem Blagodarenko <artem.blagodarenko@xxxxxxxxx> wrote:
> 
> Use dirdata to store high bits of 64bit inode
> number.
> 
> Signed-off-by: Artem Blagodarenko <artem.blagodarenko@xxxxxxxxxx>
> ---
> fs/ext2/super.c  |  6 ++---
> 
> diff --git a/fs/ext2/super.c b/fs/ext2/super.c
> index 1458706bd2ec..f6437f559d0a 100644
> --- a/fs/ext2/super.c
> +++ b/fs/ext2/super.c
> @@ -1232,7 +1232,7 @@ void ext2_sync_super(struct super_block *sb, struct ext2_super_block *es,
> 	ext2_clear_super_error(sb);
> 	spin_lock(&EXT2_SB(sb)->s_lock);
> 	es->s_free_blocks_count = cpu_to_le32(ext2_count_free_blocks(sb));
> -	es->s_free_inodes_count = cpu_to_le32(ext2_count_free_inodes(sb));
> +	ext4_set_free_inodes_count(es, ext4_get_free_inodes_count(sb));
> 	es->s_wtime = cpu_to_le32(get_seconds());
> 	/* unlock before we do IO */
> 	spin_unlock(&EXT2_SB(sb)->s_lock);
> @@ -1459,9 +1459,9 @@ static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf)
> 	buf->f_bavail = buf->f_bfree - le32_to_cpu(es->s_r_blocks_count);
> 	if (buf->f_bfree < le32_to_cpu(es->s_r_blocks_count))
> 		buf->f_bavail = 0;
> -	buf->f_files = le32_to_cpu(es->s_inodes_count);
> +	buf->f_files = ext4_get_inodes_count(sb);
> 	buf->f_ffree = ext2_count_free_inodes(sb);
> -	es->s_free_inodes_count = cpu_to_le32(buf->f_ffree);
> +	ext4_set_free_inodes_count(sb, buf->f_ffree);
> 	buf->f_namelen = EXT2_NAME_LEN;
> 	fsid = le64_to_cpup((void *)es->s_uuid) ^
> 	       le64_to_cpup((void *)es->s_uuid + sizeof(u64));

I just noticed here that this is changing ext2 instead of ext4.
This part of the patch should be dropped.

Cheers, Andreas




Attachment: signature.asc
Description: Message signed with OpenPGP


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux