* [f2fs-dev] [PATCH] f2fs: remove unused parameter in f2fs_get_read_data_page()
@ 2020-06-30 4:45 Jia Yang
2020-06-30 7:47 ` Chao Yu
0 siblings, 1 reply; 3+ messages in thread
From: Jia Yang @ 2020-06-30 4:45 UTC (permalink / raw)
To: chao, jaegeuk; +Cc: linux-f2fs-devel
The parameter "op_flags" is not used in f2fs_get_read_data_page(),
so it can be removed.
Signed-off-by: Jia Yang <jiayang5@huawei.com>
---
fs/f2fs/data.c | 6 +++---
fs/f2fs/f2fs.h | 2 +-
fs/f2fs/gc.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 326c63879ddc..f1b85185e9df 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1157,7 +1157,7 @@ int f2fs_get_block(struct dnode_of_data *dn, pgoff_t index)
}
struct page *f2fs_get_read_data_page(struct inode *inode, pgoff_t index,
- int op_flags, bool for_write)
+ bool for_write)
{
struct address_space *mapping = inode->i_mapping;
struct dnode_of_data dn;
@@ -1237,7 +1237,7 @@ struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index)
return page;
f2fs_put_page(page, 0);
- page = f2fs_get_read_data_page(inode, index, 0, false);
+ page = f2fs_get_read_data_page(inode, index, false);
if (IS_ERR(page))
return page;
@@ -1263,7 +1263,7 @@ struct page *f2fs_get_lock_data_page(struct inode *inode, pgoff_t index,
struct address_space *mapping = inode->i_mapping;
struct page *page;
repeat:
- page = f2fs_get_read_data_page(inode, index, 0, for_write);
+ page = f2fs_get_read_data_page(inode, index, for_write);
if (IS_ERR(page))
return page;
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index b35a50f4953c..41ef50714a39 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3441,7 +3441,7 @@ int f2fs_get_block(struct dnode_of_data *dn, pgoff_t index);
int f2fs_preallocate_blocks(struct kiocb *iocb, struct iov_iter *from);
int f2fs_reserve_block(struct dnode_of_data *dn, pgoff_t index);
struct page *f2fs_get_read_data_page(struct inode *inode, pgoff_t index,
- int op_flags, bool for_write);
+ bool for_write);
struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index);
struct page *f2fs_get_lock_data_page(struct inode *inode, pgoff_t index,
bool for_write);
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 5b95d5a146eb..487f75d9136c 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1094,7 +1094,7 @@ static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
}
data_page = f2fs_get_read_data_page(inode,
- start_bidx, REQ_RAHEAD, true);
+ start_bidx, true);
up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
if (IS_ERR(data_page)) {
iput(inode);
--
2.26.0.106.g9fadedd
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: remove unused parameter in f2fs_get_read_data_page()
2020-06-30 4:45 [f2fs-dev] [PATCH] f2fs: remove unused parameter in f2fs_get_read_data_page() Jia Yang
@ 2020-06-30 7:47 ` Chao Yu
2020-06-30 11:07 ` Jia Yang
0 siblings, 1 reply; 3+ messages in thread
From: Chao Yu @ 2020-06-30 7:47 UTC (permalink / raw)
To: Jia Yang, chao, jaegeuk; +Cc: linux-f2fs-devel
On 2020/6/30 12:45, Jia Yang wrote:
> The parameter "op_flags" is not used in f2fs_get_read_data_page(),
> so it can be removed.
I don't think so, there is one missing case as below, in where op_flag
was set incorrectly in f2fs_grab_read_bio(), we need to add one more
parameter to pass op_flag value.
- gc_data_segment
- f2fs_get_read_data_page(.., op_flag = REQ_RAHEAD,..)
- f2fs_submit_page_read
- f2fs_grab_read_bio(.., op_flag = 0, ..)
>
> Signed-off-by: Jia Yang <jiayang5@huawei.com>
> ---
> fs/f2fs/data.c | 6 +++---
> fs/f2fs/f2fs.h | 2 +-
> fs/f2fs/gc.c | 2 +-
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index 326c63879ddc..f1b85185e9df 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -1157,7 +1157,7 @@ int f2fs_get_block(struct dnode_of_data *dn, pgoff_t index)
> }
>
> struct page *f2fs_get_read_data_page(struct inode *inode, pgoff_t index,
> - int op_flags, bool for_write)
> + bool for_write)
> {
> struct address_space *mapping = inode->i_mapping;
> struct dnode_of_data dn;
> @@ -1237,7 +1237,7 @@ struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index)
> return page;
> f2fs_put_page(page, 0);
>
> - page = f2fs_get_read_data_page(inode, index, 0, false);
> + page = f2fs_get_read_data_page(inode, index, false);
> if (IS_ERR(page))
> return page;
>
> @@ -1263,7 +1263,7 @@ struct page *f2fs_get_lock_data_page(struct inode *inode, pgoff_t index,
> struct address_space *mapping = inode->i_mapping;
> struct page *page;
> repeat:
> - page = f2fs_get_read_data_page(inode, index, 0, for_write);
> + page = f2fs_get_read_data_page(inode, index, for_write);
> if (IS_ERR(page))
> return page;
>
> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> index b35a50f4953c..41ef50714a39 100644
> --- a/fs/f2fs/f2fs.h
> +++ b/fs/f2fs/f2fs.h
> @@ -3441,7 +3441,7 @@ int f2fs_get_block(struct dnode_of_data *dn, pgoff_t index);
> int f2fs_preallocate_blocks(struct kiocb *iocb, struct iov_iter *from);
> int f2fs_reserve_block(struct dnode_of_data *dn, pgoff_t index);
> struct page *f2fs_get_read_data_page(struct inode *inode, pgoff_t index,
> - int op_flags, bool for_write);
> + bool for_write);
> struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index);
> struct page *f2fs_get_lock_data_page(struct inode *inode, pgoff_t index,
> bool for_write);
> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> index 5b95d5a146eb..487f75d9136c 100644
> --- a/fs/f2fs/gc.c
> +++ b/fs/f2fs/gc.c
> @@ -1094,7 +1094,7 @@ static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
> }
>
> data_page = f2fs_get_read_data_page(inode,
> - start_bidx, REQ_RAHEAD, true);
> + start_bidx, true);
> up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
> if (IS_ERR(data_page)) {
> iput(inode);
>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: remove unused parameter in f2fs_get_read_data_page()
2020-06-30 7:47 ` Chao Yu
@ 2020-06-30 11:07 ` Jia Yang
0 siblings, 0 replies; 3+ messages in thread
From: Jia Yang @ 2020-06-30 11:07 UTC (permalink / raw)
To: Chao Yu, chao, jaegeuk; +Cc: linux-f2fs-devel
> On 2020/6/30 12:45, Jia Yang wrote:
>> The parameter "op_flags" is not used in f2fs_get_read_data_page(),
>> so it can be removed.
>
> I don't think so, there is one missing case as below, in where op_flag
> was set incorrectly in f2fs_grab_read_bio(), we need to add one more
> parameter to pass op_flag value.
>
> - gc_data_segment
> - f2fs_get_read_data_page(.., op_flag = REQ_RAHEAD,..)
> - f2fs_submit_page_read
> - f2fs_grab_read_bio(.., op_flag = 0, ..)
>
Thanks for your suggestion, I will submit a new patch later
as you suggested.
>>
>> Signed-off-by: Jia Yang <jiayang5@huawei.com>
>> ---
>> fs/f2fs/data.c | 6 +++---
>> fs/f2fs/f2fs.h | 2 +-
>> fs/f2fs/gc.c | 2 +-
>> 3 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
>> index 326c63879ddc..f1b85185e9df 100644
>> --- a/fs/f2fs/data.c
>> +++ b/fs/f2fs/data.c
>> @@ -1157,7 +1157,7 @@ int f2fs_get_block(struct dnode_of_data *dn, pgoff_t index)
>> }
>>
>> struct page *f2fs_get_read_data_page(struct inode *inode, pgoff_t index,
>> - int op_flags, bool for_write)
>> + bool for_write)
>> {
>> struct address_space *mapping = inode->i_mapping;
>> struct dnode_of_data dn;
>> @@ -1237,7 +1237,7 @@ struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index)
>> return page;
>> f2fs_put_page(page, 0);
>>
>> - page = f2fs_get_read_data_page(inode, index, 0, false);
>> + page = f2fs_get_read_data_page(inode, index, false);
>> if (IS_ERR(page))
>> return page;
>>
>> @@ -1263,7 +1263,7 @@ struct page *f2fs_get_lock_data_page(struct inode *inode, pgoff_t index,
>> struct address_space *mapping = inode->i_mapping;
>> struct page *page;
>> repeat:
>> - page = f2fs_get_read_data_page(inode, index, 0, for_write);
>> + page = f2fs_get_read_data_page(inode, index, for_write);
>> if (IS_ERR(page))
>> return page;
>>
>> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
>> index b35a50f4953c..41ef50714a39 100644
>> --- a/fs/f2fs/f2fs.h
>> +++ b/fs/f2fs/f2fs.h
>> @@ -3441,7 +3441,7 @@ int f2fs_get_block(struct dnode_of_data *dn, pgoff_t index);
>> int f2fs_preallocate_blocks(struct kiocb *iocb, struct iov_iter *from);
>> int f2fs_reserve_block(struct dnode_of_data *dn, pgoff_t index);
>> struct page *f2fs_get_read_data_page(struct inode *inode, pgoff_t index,
>> - int op_flags, bool for_write);
>> + bool for_write);
>> struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index);
>> struct page *f2fs_get_lock_data_page(struct inode *inode, pgoff_t index,
>> bool for_write);
>> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
>> index 5b95d5a146eb..487f75d9136c 100644
>> --- a/fs/f2fs/gc.c
>> +++ b/fs/f2fs/gc.c
>> @@ -1094,7 +1094,7 @@ static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
>> }
>>
>> data_page = f2fs_get_read_data_page(inode,
>> - start_bidx, REQ_RAHEAD, true);
>> + start_bidx, true);
>> up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
>> if (IS_ERR(data_page)) {
>> iput(inode);
>>
> .
>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-30 11:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30 4:45 [f2fs-dev] [PATCH] f2fs: remove unused parameter in f2fs_get_read_data_page() Jia Yang
2020-06-30 7:47 ` Chao Yu
2020-06-30 11:07 ` Jia Yang
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).