public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: "NeilBrown" <neilb@suse.de>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH] FAT: use blkdev_issue_flush() instead of congestion_wait()
Date: Sat, 11 Dec 2021 17:16:34 +0900	[thread overview]
Message-ID: <87lf0rmu8t.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <163911011670.9928.6438117555175130033@noble.neil.brown.name> (NeilBrown's message of "Fri, 10 Dec 2021 15:21:56 +1100")

"NeilBrown" <neilb@suse.de> writes:

> On Mon, 22 Nov 2021, OGAWA Hirofumi wrote:
>> "NeilBrown" <neilb@suse.de> writes:
>> 
>> 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>
>
> or use GUI to drag a file to the removable device, wait for the copy to
> appear to finish, then pull the device.
>
> sync is too slow as it flush each change to storage as it happens.  Each
> block, each FA-Table update etc.
>
> "-o flush" does the flush as file-close rather than on each write.
> But it still needs to provide the same safety.  i.e. write and flush and
> wait.

If you want to provide the data integrity, e.g., you have to check and
sync parent recursively. And more.

>> It makes much slower above "cp -a" part. So I think it is overkill.
>
> There doesn't seem to be any point to "-o flush" if it doesn't promise
> anything.  Without the blkdeV_issue_flush() we have no guarantee that
> the data is safe after the file is closed - do we?
> Certainly it will be slower than without "-o flush", but that is the
> price you pay for safety.

What I originally think to provide here (before this patch) is,
removable media capable flusher (early flush) + some sort of auto
unmount (syncfs when fs becomes idle.). IOW, nearly maximum throughput
and better safety than default fluser. But never guarantee anything the
data integrity, otherwise this option becomes too complex and heavyweight.

Thanks.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

      parent reply	other threads:[~2021-12-11  8:16 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
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         ` OGAWA Hirofumi [this message]

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=87lf0rmu8t.fsf@mail.parknet.co.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=hch@infradead.org \
    --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