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: Mon, 22 Nov 2021 14:29:53 +0900 [thread overview]
Message-ID: <874k84hi5q.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <163754226639.13692.10449616189734943162@noble.neil.brown.name> (NeilBrown's message of "Mon, 22 Nov 2021 11:51:06 +1100")
"NeilBrown" <neilb@suse.de> writes:
> On Sun, 21 Nov 2021, OGAWA Hirofumi wrote:
>> "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)
>
> I don't think that is true. I believe the purpose of the flush option
> is to write out data as soon as a file is closed, so that if the media
> is removed without first unmounting, the data is more likely to be safe.
> That is why the commit which introduce it:
> Commit ae78bf9c4f5f ("[PATCH] add -o flush for fat")
> particularly mentions "removable media".
Right. This was to make the removable device usage better (but sync
option is too slow).
e.g.
# cp -a /foo/source /mnt/fatfs
# umount <don't too slow>
or
<do other thing, and forget umount>
>> 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().
>
> We already call blkdev_issue_flush() on fsync. With my patch, a simple
> close() effective becomes an fsync() and a close(). I think that is
> completely consistent with the purpose of "-o flush".
It makes much slower above "cp -a" part. So I think it is overkill.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2021-11-22 5:29 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
2021-11-22 0:51 ` NeilBrown
2021-11-22 5:29 ` OGAWA Hirofumi [this message]
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=874k84hi5q.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox