From: Chao Yu <yuchao0@huawei.com>
To: Jia Yang <jiayang5@huawei.com>, <chao@kernel.org>, <jaegeuk@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: remove unused parameter in f2fs_get_read_data_page()
Date: Tue, 30 Jun 2020 15:47:48 +0800 [thread overview]
Message-ID: <53ec5160-3d0f-970c-f146-d36a957f599e@huawei.com> (raw)
In-Reply-To: <20200630044504.24148-1-jiayang5@huawei.com>
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
next prev parent reply other threads:[~2020-06-30 7:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2020-06-30 11:07 ` Jia Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53ec5160-3d0f-970c-f146-d36a957f599e@huawei.com \
--to=yuchao0@huawei.com \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=jiayang5@huawei.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).