* Re: [PATCH v2] f2fs: fix to update new block address correctly for OPU
2018-11-26 18:32 [PATCH v2] f2fs: fix to update new block address correctly for OPU Jia Zhu
@ 2018-11-26 10:35 ` Greg KH
2018-11-27 0:43 ` Jaegeuk Kim
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2018-11-26 10:35 UTC (permalink / raw)
To: Jia Zhu
Cc: jaegeuk, chao, yuchao0, jaizhu.zj, shengyong1, yunlong.song,
heyunlei, linux-f2fs-devel, stable
On Tue, Nov 27, 2018 at 02:32:32AM +0800, Jia Zhu wrote:
> Previously, we allocated a new block address for OPU mode in direct_IO.
>
> But the new address couldn't be assigned to @map->m_pblk correctly.
>
> This patch fix it.
>
> Fixes: 511f52d02f05 ('f2fs: allow out-place-update for direct IO in LFS mode')
>
> Signed-off-by: Jia Zhu <zhujia13@huawei.com>
> ---
> v2:
> - update commit message.
>
> fs/f2fs/data.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] f2fs: fix to update new block address correctly for OPU
@ 2018-11-26 18:32 Jia Zhu
2018-11-26 10:35 ` Greg KH
2018-11-27 0:43 ` Jaegeuk Kim
0 siblings, 2 replies; 3+ messages in thread
From: Jia Zhu @ 2018-11-26 18:32 UTC (permalink / raw)
To: jaegeuk, chao, yuchao0
Cc: jaizhu.zj, shengyong1, yunlong.song, heyunlei, linux-f2fs-devel,
stable, Jia Zhu
Previously, we allocated a new block address for OPU mode in direct_IO.
But the new address couldn't be assigned to @map->m_pblk correctly.
This patch fix it.
Fixes: 511f52d02f05 ('f2fs: allow out-place-update for direct IO in LFS mode')
Signed-off-by: Jia Zhu <zhujia13@huawei.com>
---
v2:
- update commit message.
fs/f2fs/data.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 7226300..a3a567a 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1110,8 +1110,10 @@ int f2fs_map_blocks(struct inode *inode, struct f2fs_map_blocks *map,
if (test_opt(sbi, LFS) && flag == F2FS_GET_BLOCK_DIO &&
map->m_may_create) {
err = __allocate_data_block(&dn, map->m_seg_type);
- if (!err)
+ if (!err) {
+ blkaddr = dn.data_blkaddr;
set_inode_flag(inode, FI_APPEND_WRITE);
+ }
}
} else {
if (create) {
--
2.10.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] f2fs: fix to update new block address correctly for OPU
2018-11-26 18:32 [PATCH v2] f2fs: fix to update new block address correctly for OPU Jia Zhu
2018-11-26 10:35 ` Greg KH
@ 2018-11-27 0:43 ` Jaegeuk Kim
1 sibling, 0 replies; 3+ messages in thread
From: Jaegeuk Kim @ 2018-11-27 0:43 UTC (permalink / raw)
To: Jia Zhu
Cc: chao, yuchao0, jaizhu.zj, shengyong1, yunlong.song, heyunlei,
linux-f2fs-devel, stable
Hi Jia,
On 11/27, Jia Zhu wrote:
> Previously, we allocated a new block address for OPU mode in direct_IO.
>
> But the new address couldn't be assigned to @map->m_pblk correctly.
>
> This patch fix it.
>
> Fixes: 511f52d02f05 ('f2fs: allow out-place-update for direct IO in LFS mode')
I've marked this patch for -stable merge.
Thanks,
>
> Signed-off-by: Jia Zhu <zhujia13@huawei.com>
> ---
> v2:
> - update commit message.
>
> fs/f2fs/data.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index 7226300..a3a567a 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -1110,8 +1110,10 @@ int f2fs_map_blocks(struct inode *inode, struct f2fs_map_blocks *map,
> if (test_opt(sbi, LFS) && flag == F2FS_GET_BLOCK_DIO &&
> map->m_may_create) {
> err = __allocate_data_block(&dn, map->m_seg_type);
> - if (!err)
> + if (!err) {
> + blkaddr = dn.data_blkaddr;
> set_inode_flag(inode, FI_APPEND_WRITE);
> + }
> }
> } else {
> if (create) {
> --
> 2.10.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-27 0:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-26 18:32 [PATCH v2] f2fs: fix to update new block address correctly for OPU Jia Zhu
2018-11-26 10:35 ` Greg KH
2018-11-27 0:43 ` Jaegeuk Kim
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).