* [PATCH] ext4: Do not convert to indirect with bigalloc enabled
@ 2013-04-04 10:18 Lukas Czerner
2013-04-08 5:59 ` Zheng Liu
2013-04-08 6:10 ` Zheng Liu
0 siblings, 2 replies; 6+ messages in thread
From: Lukas Czerner @ 2013-04-04 10:18 UTC (permalink / raw)
To: linux-ext4; +Cc: tytso, Lukas Czerner
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>
---
fs/ext4/extents.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 6c5a70a..ddb6628 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4735,6 +4735,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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ext4: Do not convert to indirect with bigalloc enabled
2013-04-04 10:18 [PATCH] ext4: Do not convert to indirect with bigalloc enabled Lukas Czerner
@ 2013-04-08 5:59 ` Zheng Liu
2013-04-08 6:10 ` Zheng Liu
1 sibling, 0 replies; 6+ messages in thread
From: Zheng Liu @ 2013-04-08 5:59 UTC (permalink / raw)
To: Lukas Czerner; +Cc: linux-ext4, tytso
On Thu, Apr 04, 2013 at 12:18:05PM +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>
Looks good to me.
Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Regards,
- Zheng
> ---
> fs/ext4/extents.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 6c5a70a..ddb6628 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -4735,6 +4735,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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ext4: Do not convert to indirect with bigalloc enabled
2013-04-04 10:18 [PATCH] ext4: Do not convert to indirect with bigalloc enabled Lukas Czerner
2013-04-08 5:59 ` Zheng Liu
@ 2013-04-08 6:10 ` Zheng Liu
2013-04-09 10:07 ` Lukáš Czerner
2013-04-09 13:23 ` Theodore Ts'o
1 sibling, 2 replies; 6+ messages in thread
From: Zheng Liu @ 2013-04-08 6:10 UTC (permalink / raw)
To: Lukas Czerner; +Cc: linux-ext4, tytso
On Thu, Apr 04, 2013 at 12:18:05PM +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>
> ---
> fs/ext4/extents.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 6c5a70a..ddb6628 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -4735,6 +4735,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)
I am wandering whether ext4_ind_migrate needs to be moved into
fs/ext4/migrate.c file. Maybe it is better.
Regards,
- Zheng
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ext4: Do not convert to indirect with bigalloc enabled
2013-04-08 6:10 ` Zheng Liu
@ 2013-04-09 10:07 ` Lukáš Czerner
2013-04-09 13:23 ` Theodore Ts'o
1 sibling, 0 replies; 6+ messages in thread
From: Lukáš Czerner @ 2013-04-09 10:07 UTC (permalink / raw)
To: Zheng Liu; +Cc: Lukas Czerner, linux-ext4, tytso
On Mon, 8 Apr 2013, Zheng Liu wrote:
> Date: Mon, 8 Apr 2013 14:10:11 +0800
> From: Zheng Liu <gnehzuil.liu@gmail.com>
> To: Lukas Czerner <lczerner@redhat.com>
> Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
> Subject: Re: [PATCH] ext4: Do not convert to indirect with bigalloc enabled
>
> On Thu, Apr 04, 2013 at 12:18:05PM +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>
> > ---
> > fs/ext4/extents.c | 4 ++++
> > 1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> > index 6c5a70a..ddb6628 100644
> > --- a/fs/ext4/extents.c
> > +++ b/fs/ext4/extents.c
> > @@ -4735,6 +4735,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)
>
> I am wandering whether ext4_ind_migrate needs to be moved into
> fs/ext4/migrate.c file. Maybe it is better.
You're right, it make much more sense. I'll prepare a patch.
Thanks!
-Lukas
>
> Regards,
> - Zheng
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ext4: Do not convert to indirect with bigalloc enabled
2013-04-08 6:10 ` Zheng Liu
2013-04-09 10:07 ` Lukáš Czerner
@ 2013-04-09 13:23 ` Theodore Ts'o
2013-04-09 13:28 ` Lukáš Czerner
1 sibling, 1 reply; 6+ messages in thread
From: Theodore Ts'o @ 2013-04-09 13:23 UTC (permalink / raw)
To: Lukas Czerner, linux-ext4
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ext4: Do not convert to indirect with bigalloc enabled
2013-04-09 13:23 ` Theodore Ts'o
@ 2013-04-09 13:28 ` Lukáš Czerner
0 siblings, 0 replies; 6+ messages in thread
From: Lukáš Czerner @ 2013-04-09 13:28 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: Lukas Czerner, linux-ext4
On Tue, 9 Apr 2013, Theodore Ts'o wrote:
> Date: Tue, 9 Apr 2013 09:23:13 -0400
> From: Theodore Ts'o <tytso@mit.edu>
> To: Lukas Czerner <lczerner@redhat.com>, linux-ext4@vger.kernel.org
> Subject: Re: [PATCH] ext4: Do not convert to indirect with bigalloc enabled
>
> Thanks, applied.
Ted you probably want to apply the series I sent earlier today
containing this patches.
[PATCH 1/2 v2] ext4: move ext4_ind_migrate() into migrate.c
[PATCH 2/2 v2] ext4: Do not convert to indirect with bigalloc enabled
Thanks!
-Lukas
>
> - Ted
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-09 13:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-04 10:18 [PATCH] ext4: Do not convert to indirect with bigalloc enabled Lukas Czerner
2013-04-08 5:59 ` Zheng Liu
2013-04-08 6:10 ` Zheng Liu
2013-04-09 10:07 ` Lukáš Czerner
2013-04-09 13:23 ` Theodore Ts'o
2013-04-09 13:28 ` Lukáš Czerner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).