All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] f2fs: set_code_data in move_data_block
@ 2018-02-08 12:33 ` Yunlong Song
  0 siblings, 0 replies; 10+ messages in thread
From: Yunlong Song @ 2018-02-08 12:33 UTC (permalink / raw)
  To: jaegeuk, chao, yuchao0, yunlong.song, yunlong.song
  Cc: miaoxie, bintian.wang, shengyong1, heyunlei, linux-f2fs-devel,
	linux-kernel

Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
---
 fs/f2fs/gc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index b9d93fd..2095630 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -692,6 +692,7 @@ static void move_data_block(struct inode *inode, block_t bidx,
 	fio.op = REQ_OP_WRITE;
 	fio.op_flags = REQ_SYNC;
 	fio.new_blkaddr = newaddr;
+	set_cold_data(fio.page);
 	err = f2fs_submit_page_write(&fio);
 	if (err) {
 		if (PageWriteback(fio.encrypted_page))
-- 
1.8.5.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] f2fs: set_code_data in move_data_block
@ 2018-02-08 12:33 ` Yunlong Song
  0 siblings, 0 replies; 10+ messages in thread
From: Yunlong Song @ 2018-02-08 12:33 UTC (permalink / raw)
  To: jaegeuk, chao, yuchao0, yunlong.song, yunlong.song
  Cc: miaoxie, bintian.wang, shengyong1, heyunlei, linux-f2fs-devel,
	linux-kernel

Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
---
 fs/f2fs/gc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index b9d93fd..2095630 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -692,6 +692,7 @@ static void move_data_block(struct inode *inode, block_t bidx,
 	fio.op = REQ_OP_WRITE;
 	fio.op_flags = REQ_SYNC;
 	fio.new_blkaddr = newaddr;
+	set_cold_data(fio.page);
 	err = f2fs_submit_page_write(&fio);
 	if (err) {
 		if (PageWriteback(fio.encrypted_page))
-- 
1.8.5.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] f2fs: set_code_data in move_data_block
  2018-02-08 12:33 ` Yunlong Song
@ 2018-02-11  3:34   ` Yunlong Song
  -1 siblings, 0 replies; 10+ messages in thread
From: Yunlong Song @ 2018-02-11  3:34 UTC (permalink / raw)
  To: jaegeuk, chao, yuchao0, yunlong.song
  Cc: miaoxie, bintian.wang, shengyong1, heyunlei, linux-f2fs-devel,
	linux-kernel

Ping...

move_data_block misses set_cold_data, then the F2FS_WB_CP_DATA will
lack these data pages in move_data_block, and write_checkpoint can
not make sure this pages committed to the flash.

On 2018/2/8 20:33, Yunlong Song wrote:
> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
> ---
>   fs/f2fs/gc.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> index b9d93fd..2095630 100644
> --- a/fs/f2fs/gc.c
> +++ b/fs/f2fs/gc.c
> @@ -692,6 +692,7 @@ static void move_data_block(struct inode *inode, block_t bidx,
>   	fio.op = REQ_OP_WRITE;
>   	fio.op_flags = REQ_SYNC;
>   	fio.new_blkaddr = newaddr;
> +	set_cold_data(fio.page);
>   	err = f2fs_submit_page_write(&fio);
>   	if (err) {
>   		if (PageWriteback(fio.encrypted_page))
> 

-- 
Thanks,
Yunlong Song

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] f2fs: set_code_data in move_data_block
@ 2018-02-11  3:34   ` Yunlong Song
  0 siblings, 0 replies; 10+ messages in thread
From: Yunlong Song @ 2018-02-11  3:34 UTC (permalink / raw)
  To: jaegeuk, chao, yuchao0, yunlong.song
  Cc: linux-kernel, linux-f2fs-devel, heyunlei, miaoxie

Ping...

move_data_block misses set_cold_data, then the F2FS_WB_CP_DATA will
lack these data pages in move_data_block, and write_checkpoint can
not make sure this pages committed to the flash.

On 2018/2/8 20:33, Yunlong Song wrote:
> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
> ---
>   fs/f2fs/gc.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> index b9d93fd..2095630 100644
> --- a/fs/f2fs/gc.c
> +++ b/fs/f2fs/gc.c
> @@ -692,6 +692,7 @@ static void move_data_block(struct inode *inode, block_t bidx,
>   	fio.op = REQ_OP_WRITE;
>   	fio.op_flags = REQ_SYNC;
>   	fio.new_blkaddr = newaddr;
> +	set_cold_data(fio.page);
>   	err = f2fs_submit_page_write(&fio);
>   	if (err) {
>   		if (PageWriteback(fio.encrypted_page))
> 

-- 
Thanks,
Yunlong Song


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] f2fs: set_code_data in move_data_block
  2018-02-11  3:34   ` Yunlong Song
@ 2018-02-11  3:50     ` Chao Yu
  -1 siblings, 0 replies; 10+ messages in thread
From: Chao Yu @ 2018-02-11  3:50 UTC (permalink / raw)
  To: Yunlong Song, jaegeuk, chao, yunlong.song
  Cc: miaoxie, bintian.wang, shengyong1, heyunlei, linux-f2fs-devel,
	linux-kernel

On 2018/2/11 11:34, Yunlong Song wrote:
> Ping...
> 
> move_data_block misses set_cold_data, then the F2FS_WB_CP_DATA will
> lack these data pages in move_data_block, and write_checkpoint can
> not make sure this pages committed to the flash.

Hmm.. data block migration is running based on meta inode, so it will
be safe since checkpoint will flush all meta pages including encrypted
pages cached in meta inode?

Thanks,

> 
> On 2018/2/8 20:33, Yunlong Song wrote:
>> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
>> ---
>>   fs/f2fs/gc.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
>> index b9d93fd..2095630 100644
>> --- a/fs/f2fs/gc.c
>> +++ b/fs/f2fs/gc.c
>> @@ -692,6 +692,7 @@ static void move_data_block(struct inode *inode, block_t bidx,
>>   	fio.op = REQ_OP_WRITE;
>>   	fio.op_flags = REQ_SYNC;
>>   	fio.new_blkaddr = newaddr;
>> +	set_cold_data(fio.page);
>>   	err = f2fs_submit_page_write(&fio);
>>   	if (err) {
>>   		if (PageWriteback(fio.encrypted_page))
>>
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] f2fs: set_code_data in move_data_block
@ 2018-02-11  3:50     ` Chao Yu
  0 siblings, 0 replies; 10+ messages in thread
From: Chao Yu @ 2018-02-11  3:50 UTC (permalink / raw)
  To: Yunlong Song, jaegeuk, chao, yunlong.song
  Cc: linux-kernel, linux-f2fs-devel, heyunlei, miaoxie

On 2018/2/11 11:34, Yunlong Song wrote:
> Ping...
> 
> move_data_block misses set_cold_data, then the F2FS_WB_CP_DATA will
> lack these data pages in move_data_block, and write_checkpoint can
> not make sure this pages committed to the flash.

Hmm.. data block migration is running based on meta inode, so it will
be safe since checkpoint will flush all meta pages including encrypted
pages cached in meta inode?

Thanks,

> 
> On 2018/2/8 20:33, Yunlong Song wrote:
>> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
>> ---
>>   fs/f2fs/gc.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
>> index b9d93fd..2095630 100644
>> --- a/fs/f2fs/gc.c
>> +++ b/fs/f2fs/gc.c
>> @@ -692,6 +692,7 @@ static void move_data_block(struct inode *inode, block_t bidx,
>>   	fio.op = REQ_OP_WRITE;
>>   	fio.op_flags = REQ_SYNC;
>>   	fio.new_blkaddr = newaddr;
>> +	set_cold_data(fio.page);
>>   	err = f2fs_submit_page_write(&fio);
>>   	if (err) {
>>   		if (PageWriteback(fio.encrypted_page))
>>
> 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH] f2fs: set_code_data in move_data_block
  2018-02-11  3:34   ` Yunlong Song
@ 2018-02-11  3:51     ` heyunlei
  -1 siblings, 0 replies; 10+ messages in thread
From: heyunlei @ 2018-02-11  3:51 UTC (permalink / raw)
  To: Songyunlong (Euler), jaegeuk, chao, Yuchao (T), yunlong.song
  Cc: miaoxie (A), Wangbintian, shengyong (A), linux-f2fs-devel, linux-kernel



>-----Original Message-----
>From: Songyunlong (Euler)
>Sent: Sunday, February 11, 2018 11:35 AM
>To: jaegeuk@kernel.org; chao@kernel.org; Yuchao (T); yunlong.song@icloud.com
>Cc: miaoxie (A); Wangbintian; shengyong (A); heyunlei; linux-f2fs-devel@lists.sourceforge.net; linux-kernel@vger.kernel.org
>Subject: Re: [PATCH] f2fs: set_code_data in move_data_block
>
>Ping...
>
>move_data_block misses set_cold_data, then the F2FS_WB_CP_DATA will
>lack these data pages in move_data_block, and write_checkpoint can
>not make sure this pages committed to the flash.
>

Here, we write encrypted_page back, which belong to meta mapping.

Thanks.


>On 2018/2/8 20:33, Yunlong Song wrote:
>> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
>> ---
>>   fs/f2fs/gc.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
>> index b9d93fd..2095630 100644
>> --- a/fs/f2fs/gc.c
>> +++ b/fs/f2fs/gc.c
>> @@ -692,6 +692,7 @@ static void move_data_block(struct inode *inode, block_t bidx,
>>   	fio.op = REQ_OP_WRITE;
>>   	fio.op_flags = REQ_SYNC;
>>   	fio.new_blkaddr = newaddr;
>> +	set_cold_data(fio.page);
>>   	err = f2fs_submit_page_write(&fio);
>>   	if (err) {
>>   		if (PageWriteback(fio.encrypted_page))
>>
>
>--
>Thanks,
>Yunlong Song

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] f2fs: set_code_data in move_data_block
@ 2018-02-11  3:51     ` heyunlei
  0 siblings, 0 replies; 10+ messages in thread
From: heyunlei @ 2018-02-11  3:51 UTC (permalink / raw)
  To: Songyunlong (Euler), jaegeuk, chao, Yuchao (T), yunlong.song
  Cc: miaoxie (A), linux-kernel, linux-f2fs-devel



>-----Original Message-----
>From: Songyunlong (Euler)
>Sent: Sunday, February 11, 2018 11:35 AM
>To: jaegeuk@kernel.org; chao@kernel.org; Yuchao (T); yunlong.song@icloud.com
>Cc: miaoxie (A); Wangbintian; shengyong (A); heyunlei; linux-f2fs-devel@lists.sourceforge.net; linux-kernel@vger.kernel.org
>Subject: Re: [PATCH] f2fs: set_code_data in move_data_block
>
>Ping...
>
>move_data_block misses set_cold_data, then the F2FS_WB_CP_DATA will
>lack these data pages in move_data_block, and write_checkpoint can
>not make sure this pages committed to the flash.
>

Here, we write encrypted_page back, which belong to meta mapping.

Thanks.


>On 2018/2/8 20:33, Yunlong Song wrote:
>> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
>> ---
>>   fs/f2fs/gc.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
>> index b9d93fd..2095630 100644
>> --- a/fs/f2fs/gc.c
>> +++ b/fs/f2fs/gc.c
>> @@ -692,6 +692,7 @@ static void move_data_block(struct inode *inode, block_t bidx,
>>   	fio.op = REQ_OP_WRITE;
>>   	fio.op_flags = REQ_SYNC;
>>   	fio.new_blkaddr = newaddr;
>> +	set_cold_data(fio.page);
>>   	err = f2fs_submit_page_write(&fio);
>>   	if (err) {
>>   		if (PageWriteback(fio.encrypted_page))
>>
>
>--
>Thanks,
>Yunlong Song

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] f2fs: set_code_data in move_data_block
  2018-02-11  3:50     ` Chao Yu
@ 2018-02-11  6:15       ` Yunlong Song
  -1 siblings, 0 replies; 10+ messages in thread
From: Yunlong Song @ 2018-02-11  6:15 UTC (permalink / raw)
  To: Chao Yu, jaegeuk, chao, yunlong.song
  Cc: miaoxie, bintian.wang, shengyong1, heyunlei, linux-f2fs-devel,
	linux-kernel

OK, Got it.

On 2018/2/11 11:50, Chao Yu wrote:
> On 2018/2/11 11:34, Yunlong Song wrote:
>> Ping...
>>
>> move_data_block misses set_cold_data, then the F2FS_WB_CP_DATA will
>> lack these data pages in move_data_block, and write_checkpoint can
>> not make sure this pages committed to the flash.
> 
> Hmm.. data block migration is running based on meta inode, so it will
> be safe since checkpoint will flush all meta pages including encrypted
> pages cached in meta inode?
> 
> Thanks,
> 
>>
>> On 2018/2/8 20:33, Yunlong Song wrote:
>>> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
>>> ---
>>>    fs/f2fs/gc.c | 1 +
>>>    1 file changed, 1 insertion(+)
>>>
>>> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
>>> index b9d93fd..2095630 100644
>>> --- a/fs/f2fs/gc.c
>>> +++ b/fs/f2fs/gc.c
>>> @@ -692,6 +692,7 @@ static void move_data_block(struct inode *inode, block_t bidx,
>>>    	fio.op = REQ_OP_WRITE;
>>>    	fio.op_flags = REQ_SYNC;
>>>    	fio.new_blkaddr = newaddr;
>>> +	set_cold_data(fio.page);
>>>    	err = f2fs_submit_page_write(&fio);
>>>    	if (err) {
>>>    		if (PageWriteback(fio.encrypted_page))
>>>
>>
> 
> 
> .
> 

-- 
Thanks,
Yunlong Song

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] f2fs: set_code_data in move_data_block
@ 2018-02-11  6:15       ` Yunlong Song
  0 siblings, 0 replies; 10+ messages in thread
From: Yunlong Song @ 2018-02-11  6:15 UTC (permalink / raw)
  To: Chao Yu, jaegeuk, chao, yunlong.song
  Cc: miaoxie, bintian.wang, shengyong1, heyunlei, linux-f2fs-devel,
	linux-kernel

OK, Got it.

On 2018/2/11 11:50, Chao Yu wrote:
> On 2018/2/11 11:34, Yunlong Song wrote:
>> Ping...
>>
>> move_data_block misses set_cold_data, then the F2FS_WB_CP_DATA will
>> lack these data pages in move_data_block, and write_checkpoint can
>> not make sure this pages committed to the flash.
> 
> Hmm.. data block migration is running based on meta inode, so it will
> be safe since checkpoint will flush all meta pages including encrypted
> pages cached in meta inode?
> 
> Thanks,
> 
>>
>> On 2018/2/8 20:33, Yunlong Song wrote:
>>> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
>>> ---
>>>    fs/f2fs/gc.c | 1 +
>>>    1 file changed, 1 insertion(+)
>>>
>>> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
>>> index b9d93fd..2095630 100644
>>> --- a/fs/f2fs/gc.c
>>> +++ b/fs/f2fs/gc.c
>>> @@ -692,6 +692,7 @@ static void move_data_block(struct inode *inode, block_t bidx,
>>>    	fio.op = REQ_OP_WRITE;
>>>    	fio.op_flags = REQ_SYNC;
>>>    	fio.new_blkaddr = newaddr;
>>> +	set_cold_data(fio.page);
>>>    	err = f2fs_submit_page_write(&fio);
>>>    	if (err) {
>>>    		if (PageWriteback(fio.encrypted_page))
>>>
>>
> 
> 
> .
> 

-- 
Thanks,
Yunlong Song

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-02-11  6:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-08 12:33 [PATCH] f2fs: set_code_data in move_data_block Yunlong Song
2018-02-08 12:33 ` Yunlong Song
2018-02-11  3:34 ` Yunlong Song
2018-02-11  3:34   ` Yunlong Song
2018-02-11  3:50   ` Chao Yu
2018-02-11  3:50     ` Chao Yu
2018-02-11  6:15     ` Yunlong Song
2018-02-11  6:15       ` Yunlong Song
2018-02-11  3:51   ` heyunlei
2018-02-11  3:51     ` heyunlei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.