* [f2fs-dev] [PATCH v0] f2fs: allow direct read for zoned device [not found] <CGME20220729002517epcms2p35eed262c3349287436c1848ab350c2d4@epcms2p3> @ 2022-07-29 0:25 ` Eunhee Rho 2022-07-29 13:26 ` Christoph Hellwig ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: Eunhee Rho @ 2022-07-29 0:25 UTC (permalink / raw) To: jaegeuk@kernel.org, chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Eunhee Rho 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; 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 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [f2fs-dev] [PATCH v0] f2fs: allow direct read for zoned device 2022-07-29 0:25 ` [f2fs-dev] [PATCH v0] f2fs: allow direct read for zoned device Eunhee Rho @ 2022-07-29 13:26 ` Christoph Hellwig 2022-07-31 1:22 ` Jaegeuk Kim ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: Christoph Hellwig @ 2022-07-29 13:26 UTC (permalink / raw) To: Eunhee Rho Cc: jaegeuk@kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net On Fri, Jul 29, 2022 at 09:25:17AM +0900, 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. Asymetric capabilitis will cause a whole lot of problems for us. Can we figure out why direct writes to zoned devices are not supported and just fix that instead? _______________________________________________ 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] 5+ messages in thread
* Re: [f2fs-dev] [PATCH v0] f2fs: allow direct read for zoned device 2022-07-29 0:25 ` [f2fs-dev] [PATCH v0] f2fs: allow direct read for zoned device Eunhee Rho 2022-07-29 13:26 ` Christoph Hellwig @ 2022-07-31 1:22 ` Jaegeuk Kim [not found] ` <CGME20220729002517epcms2p35eed262c3349287436c1848ab350c2d4@epcms2p8> [not found] ` <CGME20220729002517epcms2p35eed262c3349287436c1848ab350c2d4@epcms2p5> 3 siblings, 0 replies; 5+ messages in thread From: Jaegeuk Kim @ 2022-07-31 1:22 UTC (permalink / raw) To: Eunhee Rho Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CGME20220729002517epcms2p35eed262c3349287436c1848ab350c2d4@epcms2p8>]
* Re: [f2fs-dev] [PATCH v0] f2fs: allow direct read for zoned device [not found] ` <CGME20220729002517epcms2p35eed262c3349287436c1848ab350c2d4@epcms2p8> @ 2022-08-01 4:06 ` Eunhee Rho 0 siblings, 0 replies; 5+ messages in thread From: Eunhee Rho @ 2022-08-01 4:06 UTC (permalink / raw) To: Jaegeuk Kim Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net >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 > Yes, I will reflect on the next patch. Thanks. _______________________________________________ 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] 5+ messages in thread
[parent not found: <CGME20220729002517epcms2p35eed262c3349287436c1848ab350c2d4@epcms2p5>]
* [f2fs-dev] [PATCH v1] f2fs: remove device type check for direct IO [not found] ` <CGME20220729002517epcms2p35eed262c3349287436c1848ab350c2d4@epcms2p5> @ 2022-08-01 4:40 ` Eunhee Rho 0 siblings, 0 replies; 5+ messages in thread From: Eunhee Rho @ 2022-08-01 4:40 UTC (permalink / raw) To: Jaegeuk Kim, chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org To ensure serialized IOs, f2fs allows only LFS mode for zoned device. Remove redundant check for direct IO. Signed-off-by: Eunhee Rho <eunhee83.rho@samsung.com> --- fs/f2fs/f2fs.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index ecd870e5d6da..ca9354746eec 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -4496,12 +4496,7 @@ static inline bool f2fs_force_buffered_io(struct inode *inode, /* disallow direct IO if any of devices has unaligned blksize */ if (f2fs_is_multi_device(sbi) && !sbi->aligned_blksize) return true; - /* - * 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)) - return true; + if (f2fs_lfs_mode(sbi) && (rw == WRITE)) { if (block_unaligned_IO(inode, iocb, iter)) return true; -- 2.25.1 _______________________________________________ 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] 5+ messages in thread
end of thread, other threads:[~2022-08-01 4:40 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [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 13:26 ` Christoph Hellwig 2022-07-31 1:22 ` Jaegeuk Kim [not found] ` <CGME20220729002517epcms2p35eed262c3349287436c1848ab350c2d4@epcms2p8> 2022-08-01 4:06 ` Eunhee Rho [not found] ` <CGME20220729002517epcms2p35eed262c3349287436c1848ab350c2d4@epcms2p5> 2022-08-01 4:40 ` [f2fs-dev] [PATCH v1] f2fs: remove device type check for direct IO Eunhee Rho
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).