All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Eunhee Rho <eunhee83.rho@samsung.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-f2fs-devel@lists.sourceforge.net"
	<linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH v0] f2fs: allow direct read for zoned device
Date: Sat, 30 Jul 2022 18:22:17 -0700	[thread overview]
Message-ID: <YuXZSTw4reBDtLgk@google.com> (raw)
In-Reply-To: <20220729002517epcms2p35eed262c3349287436c1848ab350c2d4@epcms2p3>

On 07/29, Eunhee Rho wrote:
> For zoned devices, f2fs forbids direct IO and forces buffered IO
> to serialize write IOs. However, the constraint does not apply to
> read IOs.
> 
> Signed-off-by: Eunhee Rho <eunhee83.rho@samsung.com>
> ---
>  fs/f2fs/f2fs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> index d0f428aef34b..f69731f17402 100644
> --- a/fs/f2fs/f2fs.h
> +++ b/fs/f2fs/f2fs.h
> @@ -4471,7 +4471,7 @@ static inline bool f2fs_force_buffered_io(struct inode *inode,
>  	 * for blkzoned device, fallback direct IO to buffered IO, so
>  	 * all IOs can be serialized by log-structured write.
>  	 */
> -	if (f2fs_sb_has_blkzoned(sbi))
> +	if (f2fs_sb_has_blkzoned(sbi) && (rw == WRITE))
>  		return true;

Actually we don't need to check the device type, but rely on the
filesystem allocation policy like the below lfs mode. Can we remove this
line simply?

>  	if (f2fs_lfs_mode(sbi) && (rw == WRITE)) {
>  		if (block_unaligned_IO(inode, iocb, iter))
> -- 
> 2.25.1


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

WARNING: multiple messages have this Message-ID (diff)
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Eunhee Rho <eunhee83.rho@samsung.com>
Cc: "chao@kernel.org" <chao@kernel.org>,
	"linux-f2fs-devel@lists.sourceforge.net" 
	<linux-f2fs-devel@lists.sourceforge.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v0] f2fs: allow direct read for zoned device
Date: Sat, 30 Jul 2022 18:22:17 -0700	[thread overview]
Message-ID: <YuXZSTw4reBDtLgk@google.com> (raw)
In-Reply-To: <20220729002517epcms2p35eed262c3349287436c1848ab350c2d4@epcms2p3>

On 07/29, Eunhee Rho wrote:
> For zoned devices, f2fs forbids direct IO and forces buffered IO
> to serialize write IOs. However, the constraint does not apply to
> read IOs.
> 
> Signed-off-by: Eunhee Rho <eunhee83.rho@samsung.com>
> ---
>  fs/f2fs/f2fs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> index d0f428aef34b..f69731f17402 100644
> --- a/fs/f2fs/f2fs.h
> +++ b/fs/f2fs/f2fs.h
> @@ -4471,7 +4471,7 @@ static inline bool f2fs_force_buffered_io(struct inode *inode,
>  	 * for blkzoned device, fallback direct IO to buffered IO, so
>  	 * all IOs can be serialized by log-structured write.
>  	 */
> -	if (f2fs_sb_has_blkzoned(sbi))
> +	if (f2fs_sb_has_blkzoned(sbi) && (rw == WRITE))
>  		return true;

Actually we don't need to check the device type, but rely on the
filesystem allocation policy like the below lfs mode. Can we remove this
line simply?

>  	if (f2fs_lfs_mode(sbi) && (rw == WRITE)) {
>  		if (block_unaligned_IO(inode, iocb, iter))
> -- 
> 2.25.1

  parent reply	other threads:[~2022-07-31  1:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220729002517epcms2p35eed262c3349287436c1848ab350c2d4@epcms2p3>
2022-07-29  0:25 ` [f2fs-dev] [PATCH v0] f2fs: allow direct read for zoned device Eunhee Rho
2022-07-29  0:25   ` Eunhee Rho
2022-07-29 13:26   ` [f2fs-dev] " Christoph Hellwig
2022-07-29 13:26     ` Christoph Hellwig
2022-07-31  1:22   ` Jaegeuk Kim [this message]
2022-07-31  1:22     ` Jaegeuk Kim
2022-08-01  4:06     ` [f2fs-dev] " Eunhee Rho
2022-08-01  4:06       ` Eunhee Rho
2022-08-01  4:40       ` [f2fs-dev] [PATCH v1] f2fs: remove device type check for direct IO Eunhee Rho
2022-08-01  4:40         ` Eunhee Rho

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=YuXZSTw4reBDtLgk@google.com \
    --to=jaegeuk@kernel.org \
    --cc=eunhee83.rho@samsung.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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 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.