From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: "NeilBrown" <neilb@suse.de>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH] FAT: use blkdev_issue_flush() instead of congestion_wait()
Date: Sun, 21 Nov 2021 18:17:55 +0900 [thread overview]
Message-ID: <87ee79yiik.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <163712349419.13692.2859038330142282757@noble.neil.brown.name> (NeilBrown's message of "Wed, 17 Nov 2021 15:31:34 +1100")
"NeilBrown" <neilb@suse.de> writes:
> 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().
Purpose of flush option should be for making umount faster, not data
integrity. (but current flush implement is strange at several places, IMO)
So, I don't think the issue_flush is not proper for it (flush is very
slow on some usb thumb), and rather I think it is better off to just
remove the congestion_wait().
Thanks.
> 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;
> }
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2021-11-21 9:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=87ee79yiik.fsf@mail.parknet.co.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
/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.