Patchwork [2/2,v2] ext4: Do not convert to indirect with bigalloc enabled

login
register
mail settings
Submitter Lukas Czerner
Date April 9, 2013, 11:24 a.m.
Message ID <1365506687-9216-2-git-send-email-lczerner@redhat.com>
Download mbox | patch
Permalink /patch/235049/
State Accepted
Headers show

Comments

Lukas Czerner - April 9, 2013, 11:24 a.m.
With bigalloc feature enabled we do not support indirect addressing at all
so we have to prevent extent addressing to indirect addressing
conversion in this case. The problem has been introduced with the commit
"ext4: support simple conversion of extent-mapped inodes to use i_blocks"

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
v2: added to the series

 fs/ext4/migrate.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Zheng Liu - April 9, 2013, 12:48 p.m.
On Tue, Apr 09, 2013 at 01:24:47PM +0200, Lukas Czerner wrote:
> With bigalloc feature enabled we do not support indirect addressing at all
> so we have to prevent extent addressing to indirect addressing
> conversion in this case. The problem has been introduced with the commit
> "ext4: support simple conversion of extent-mapped inodes to use i_blocks"
> 
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>

Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>

Regards,
                                                - Zheng

> ---
> v2: added to the series
> 
>  fs/ext4/migrate.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c
> index 3464604..f13a289 100644
> --- a/fs/ext4/migrate.c
> +++ b/fs/ext4/migrate.c
> @@ -625,6 +625,10 @@ int ext4_ind_migrate(struct inode *inode)
>  	    (!ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)))
>  		return -EINVAL;
>  
> +	if (EXT4_HAS_RO_COMPAT_FEATURE(inode->i_sb,
> +				       EXT4_FEATURE_RO_COMPAT_BIGALLOC))
> +		return -EOPNOTSUPP;
> +
>  	down_write(&EXT4_I(inode)->i_data_sem);
>  	ret = ext4_ext_check_inode(inode);
>  	if (ret)
> -- 
> 1.7.7.6
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o - April 11, 2013, 3:58 a.m.
On Tue, Apr 09, 2013 at 01:24:47PM +0200, Lukas Czerner wrote:
> With bigalloc feature enabled we do not support indirect addressing at all
> so we have to prevent extent addressing to indirect addressing
> conversion in this case. The problem has been introduced with the commit
> "ext4: support simple conversion of extent-mapped inodes to use i_blocks"
> 
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>

Thanks, this version is now in the ext4 patch queue.

	     	     	       	   - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c
index 3464604..f13a289 100644
--- a/fs/ext4/migrate.c
+++ b/fs/ext4/migrate.c
@@ -625,6 +625,10 @@  int ext4_ind_migrate(struct inode *inode)
 	    (!ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)))
 		return -EINVAL;
 
+	if (EXT4_HAS_RO_COMPAT_FEATURE(inode->i_sb,
+				       EXT4_FEATURE_RO_COMPAT_BIGALLOC))
+		return -EOPNOTSUPP;
+
 	down_write(&EXT4_I(inode)->i_data_sem);
 	ret = ext4_ext_check_inode(inode);
 	if (ret)