linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] FAT: use blkdev_issue_flush() instead of congestion_wait()
@ 2021-11-17  4:31 NeilBrown
  2021-11-17 10:52 ` Christoph Hellwig
  2021-11-21  9:17 ` OGAWA Hirofumi
  0 siblings, 2 replies; 13+ messages in thread
From: NeilBrown @ 2021-11-17  4:31 UTC (permalink / raw)
  To: OGAWA Hirofumi; +Cc: linux-kernel, linux-block


congestion_wait() in this context is just a sleep - block devices do not
in general support congestion signalling any more.

The goal here is to wait for any recently written data to get to
storage.  This can be achieved using blkdev_issue_flush().

Signed-off-by: NeilBrown <neilb@suse.de>
---
 fs/fat/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/fat/file.c b/fs/fat/file.c
index 13855ba49cd9..c50a52f40e37 100644
--- a/fs/fat/file.c
+++ b/fs/fat/file.c
@@ -175,9 +175,9 @@ long fat_generic_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 static int fat_file_release(struct inode *inode, struct file *filp)
 {
 	if ((filp->f_mode & FMODE_WRITE) &&
-	     MSDOS_SB(inode->i_sb)->options.flush) {
+	    MSDOS_SB(inode->i_sb)->options.flush) {
 		fat_flush_inodes(inode->i_sb, inode, NULL);
-		congestion_wait(BLK_RW_ASYNC, HZ/10);
+		blkdev_issue_flush(inode->i_sb->s_bdev);
 	}
 	return 0;
 }
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-12-13  3:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17  4:31 [PATCH] FAT: use blkdev_issue_flush() instead of congestion_wait() NeilBrown
2021-11-17 10:52 ` Christoph Hellwig
2021-11-21  9:17 ` OGAWA Hirofumi
2021-11-22  0:51   ` NeilBrown
2021-11-22  5:29     ` OGAWA Hirofumi
2021-12-10  4:21       ` NeilBrown
2021-12-10  4:22         ` [PATCH v2] FAT: use schedule_timeout_uninterruptible() " NeilBrown
2021-12-11  8:27           ` OGAWA Hirofumi
2021-12-13  2:28             ` NeilBrown
2021-12-13  2:45               ` OGAWA Hirofumi
2021-12-13  2:49                 ` NeilBrown
2021-12-13  3:17                 ` [PATCH v3] FAT: use io_schedule_timeout() " NeilBrown
2021-12-11  8:16         ` [PATCH] FAT: use blkdev_issue_flush() " OGAWA Hirofumi

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).