From: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: bugzilla-daemon@bugzilla.kernel.org,
Christoph Hellwig <hch@lst.de>, Al Viro <viro@zeniv.linux.org.uk>,
David Howells <dhowells@redhat.com>, Jens Axboe <axboe@kernel.dk>
Subject: Re: [Bug 214873] New: man 2 fsync implies possibility to return early
Date: Sat, 30 Oct 2021 14:05:26 +0200 [thread overview]
Message-ID: <480456b0-5e10-9179-73c0-0a92649f8874@gmail.com> (raw)
In-Reply-To: <bug-214873-216477@https.bugzilla.kernel.org/>
[CC += LKML and a few kernel programmers]
Hi,
On 10/29/21 23:25, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=214873
>
> Bug ID: 214873
> Summary: man 2 fsync implies possibility to return early
> Product: Documentation
> Version: unspecified
> Hardware: All
> OS: Linux
> Status: NEW
> Severity: low
> Priority: P1
> Component: man-pages
> Assignee: documentation_man-pages@kernel-bugs.osdl.org
> Reporter: sworddragon2@gmail.com
> Regression: No
>
> The manpage for the fsync system call (
> https://man7.org/linux/man-pages/man2/fsync.2.html ) describes as flushing the
> related caches to a storage device so that the information can even be
> retrieved after a crash/reboot. But then it does make the statement "The call
> blocks until the device reports that the transfer has completed." which causes
> now some interpretation: What happens if the device reports early completion
> (e.g. via a bugged firmware) of the transfer while the kernel still sees unsent
> caches in its context? Does fsync() indeed return then as the last referenced
> sentence implies or does it continue to send the caches the kernel sees to
> guarantee data integrity as good as possible as the previous documented part
> might imply?
>
> I noticed this discrepancy when reporting a bug against dd (
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51345 ) that causes dd to return
> early when it is used with its fsync capability while the kernel still sees
> caches and consulting the fsync() manpage made it not clear if such a
> theoretical possibility from the fsync() system call would be intended or not
> so eventually this part could be slighty enhanced.
>
I don't know how fsync(2) works. Could some kernel fs programmer please
check if the text matches the implementation, and if that issue reported
should be reworded in the manual page?
Thanks,
Alex
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
next parent reply other threads:[~2021-10-30 12:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-214873-216477@https.bugzilla.kernel.org/>
2021-10-30 12:05 ` Alejandro Colomar (man-pages) [this message]
2021-10-30 15:17 ` Jens Axboe
[not found] ` <bug-214873-216477-ofhoomEwvw@https.bugzilla.kernel.org/>
2021-11-12 20:22 ` [Bug 214873] " Alejandro Colomar (man-pages)
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=480456b0-5e10-9179-73c0-0a92649f8874@gmail.com \
--to=alx.manpages@gmail.com \
--cc=axboe@kernel.dk \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=dhowells@redhat.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®