public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-man@vger.kernel.org
Subject: [Bug 214873] man 2 fsync implies possibility to return early
Date: Fri, 12 Nov 2021 23:38:11 +0000	[thread overview]
Message-ID: <bug-214873-11311-spabRAKl3f@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-214873-11311@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=214873

--- Comment #8 from sworddragon2@gmail.com ---
(In reply to Jens Axboe from comment #7)
> The kernel will ensure that _all_ dirty cache is flushed out to the device,
> and then it will issue a flush command. That's all the kernel can do, and it
> will not leave dirty data unwritten for that mapping when fsync(2) is
> invoked.

That is pretty clear and now I would say the mentioned sentence should be
indeed being updated but...


(In reply to Jens Axboe from comment #7)
> The man page clearly states that the
> call blocks until the device has told you that the data is stable.

This would probably go better with an example: Userspace requests 600 MiB to be
written to an external storage device. fsync(2) has been called, 500 MiB have
been sent to the storage device and 100 MiB are still in the dirty kernel
cached data. At this point due to a slight firmware-bug the device falsely
signals the transfer has been completed (but might not reject further received
data). The referenced sentence in the manpage strictly claims fsync(2) returns
here despite the kernel still having 100 MiB dirty kernel cached data while the
part before claims the 100 MiB would also have been flushed - that is the
conflict I'm claiming about here.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

      parent reply	other threads:[~2021-11-12 23:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 21:25 [Bug 214873] New: man 2 fsync implies possibility to return early bugzilla-daemon
2021-10-30 12:05 ` [Bug 214873] " bugzilla-daemon
2021-10-30 15:17 ` bugzilla-daemon
2021-10-30 19:03 ` bugzilla-daemon
2021-10-31 12:33 ` bugzilla-daemon
2021-11-07 23:24 ` bugzilla-daemon
2021-11-12 20:22 ` bugzilla-daemon
2021-11-12 21:22 ` bugzilla-daemon
2021-11-12 23:38 ` bugzilla-daemon [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=bug-214873-11311-spabRAKl3f@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-man@vger.kernel.org \
    /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