Patchwork [1/5] ext4: convert write_begin methods to stable_page_writes semantics

login
register
mail settings
Submitter Dmitri Monakho
Date April 14, 2013, 7:01 p.m.
Message ID <1365966097-8968-1-git-send-email-dmonakhov@openvz.org>
Download mbox | patch
Permalink /patch/236458/
State New
Headers show

Comments

Dmitri Monakho - April 14, 2013, 7:01 p.m.
use wait_for_stable_page() instead of wait_on_page_writeback()

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
 fs/ext4/inode.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
Jan Kara - April 15, 2013, 12:01 p.m.
On Sun 14-04-13 23:01:33, Dmitry Monakhov wrote:
> use wait_for_stable_page() instead of wait_on_page_writeback()
  Looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> 
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
> ---
>  fs/ext4/inode.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 62189c8..1be5827 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -1028,7 +1028,8 @@ retry_journal:
>  		ext4_journal_stop(handle);
>  		goto retry_grab;
>  	}
> -	wait_on_page_writeback(page);
> +	/* In case writeback began while the page was unlocked */
> +	wait_for_stable_page(page);
>  
>  	if (ext4_should_dioread_nolock(inode))
>  		ret = __block_write_begin(page, pos, len, ext4_get_block_write);
> @@ -2715,7 +2716,7 @@ retry_journal:
>  		goto retry_grab;
>  	}
>  	/* In case writeback began while the page was unlocked */
> -	wait_on_page_writeback(page);
> +	wait_for_stable_page(page);
>  
>  	ret = __block_write_begin(page, pos, len, ext4_da_get_block_prep);
>  	if (ret < 0) {
> -- 
> 1.7.1
>
Zheng Liu - April 22, 2013, 12:36 p.m.
On Sun, Apr 14, 2013 at 11:01:33PM +0400, Dmitry Monakhov wrote:
> use wait_for_stable_page() instead of wait_on_page_writeback()
> 
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Regards,
                                                - Zheng
> ---
>  fs/ext4/inode.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 62189c8..1be5827 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -1028,7 +1028,8 @@ retry_journal:
>  		ext4_journal_stop(handle);
>  		goto retry_grab;
>  	}
> -	wait_on_page_writeback(page);
> +	/* In case writeback began while the page was unlocked */
> +	wait_for_stable_page(page);
>  
>  	if (ext4_should_dioread_nolock(inode))
>  		ret = __block_write_begin(page, pos, len, ext4_get_block_write);
> @@ -2715,7 +2716,7 @@ retry_journal:
>  		goto retry_grab;
>  	}
>  	/* In case writeback began while the page was unlocked */
> -	wait_on_page_writeback(page);
> +	wait_for_stable_page(page);
>  
>  	ret = __block_write_begin(page, pos, len, ext4_da_get_block_prep);
>  	if (ret < 0) {
> -- 
> 1.7.1
> 
> --
> 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
--
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 - Aug. 28, 2013, 6:32 p.m.
On Sun, Apr 14, 2013 at 11:01:33PM +0400, Dmitry Monakhov wrote:
> use wait_for_stable_page() instead of wait_on_page_writeback()
> 
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>

Thanks, applied.

					- 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/inode.c b/fs/ext4/inode.c
index 62189c8..1be5827 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1028,7 +1028,8 @@  retry_journal:
 		ext4_journal_stop(handle);
 		goto retry_grab;
 	}
-	wait_on_page_writeback(page);
+	/* In case writeback began while the page was unlocked */
+	wait_for_stable_page(page);
 
 	if (ext4_should_dioread_nolock(inode))
 		ret = __block_write_begin(page, pos, len, ext4_get_block_write);
@@ -2715,7 +2716,7 @@  retry_journal:
 		goto retry_grab;
 	}
 	/* In case writeback began while the page was unlocked */
-	wait_on_page_writeback(page);
+	wait_for_stable_page(page);
 
 	ret = __block_write_begin(page, pos, len, ext4_da_get_block_prep);
 	if (ret < 0) {