From: Sebastian Brand <sebastian.brand@axis.com>
To: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: File synchronization on ubifs/xfs
Date: Mon, 15 Apr 2019 12:31:31 +0000 [thread overview]
Message-ID: <1555331491145.40864@axis.com> (raw)
Hi all,
I stumbled into an file synchronization problem, and I am curious if there are more people using Yocto and ubifs/xfs/similar that have an interest of "fsync before rename"?
When trying to atomically update a file a common flow is "create copy, edit copy, rename copy->original", but this does for some file systems not guarantee that the file is not empty after a power fail. A more correct flow is "create copy, edit copy, fsync copy, rename copy->original", at least according to file system developers. This has been discussed a lot and the general status seems to be that many file system developers think that applications that does not fsync before rename are broken, and many application developers think that fsync is implied at rename and this needs to be fixed in the file systems. (I am (trying to) not picking a side, and just trying to solve my problems :) )
Since some file systems common in embedded systems (UBIFS, XFS) does not implement automatic fsync before rename, this becomes a bit of a problem if applications in Yocto does not sync "correctly". One of these applications is sed (in-place edit), and I am currently working on a patch to add fsync before rename (as a feature). Busybox are not interested in the feature (as they are of the opinion that this should be solved in the file system), but I am curious if there is any interest in these kind of features in Yocto?
Regards,
Sebastian
next reply other threads:[~2019-04-15 12:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 12:31 Sebastian Brand [this message]
[not found] ` <58aae8f8-9061-c28f-702d-36981abff1f2@topic.nl>
2019-05-13 13:07 ` File synchronization on ubifs/xfs Sebastian Brand
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=1555331491145.40864@axis.com \
--to=sebastian.brand@axis.com \
--cc=yocto@yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.