On 27Apr2020 14:42, Jon LaBadie <jonfu(a)jgcomp.com> wrote:
On Sun, Apr 26, 2020 at 04:50:57PM -0700, ToddAndMargo via users
wrote:
> I am writing several GB of data to a flash drive.
> It won't dismount as it is stikll flushing.
>
> # sync /dev/sdc1
>
> comes back instantly.
>
> Is there a better command to see if the flush
> is finished?
>
Don't know the answer, but it is not sync.
Sync queues the flushes then returns. Does
not wait until they have been done.
Sync does wait, that's what its name means.
The OS will be queuing things anyway because it is in its interest to
minimise the dirty pages in memory (more free pages means more ability
to accomodate needs, and fewer dirty pages means less fs damage in case
of a crash).
Cheers,
Cameron Simpson <cs(a)cskk.id.au>