Skip to content

Commit

Permalink
f2fs: remove device type check for direct IO
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
eunheerho authored and Jaegeuk Kim committed Aug 5, 2022
1 parent 4a2c5b7 commit dbf8e63
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fs/f2fs/f2fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -4502,12 +4502,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;
Expand Down

0 comments on commit dbf8e63

Please sign in to comment.