Re: wip/fsync branch for review
- From: Colin Walters <walters verbum org>
- To: Mrunal Patel <mpatel redhat com>
- Cc: ostree-list gnome org
- Subject: Re: wip/fsync branch for review
- Date: Fri, 11 Apr 2014 22:37:47 +0000
On Fri, Apr 11, 2014 at 6:29 PM, Mrunal Patel <mpatel redhat com> wrote:
https://git.gnome.org/browse/ostree/log/?h=wip/fsync
Review appreciated!
The changes make sense to me. syncfs could be considered as an
alternative in the future as discussed in IRC.
Yeah, it's a good point, we should look at syncfs. Unlike sync() it
actually has an error return code. In the normal case though we're not
writing a *lot* of data - we're just making a hardlink farm.
On the other hand, the downside of syncfs() is it forces a flush of
everything - say you have a database that's running while you're trying
to stream an update, forcing a filesystem sync is a bit painful.
On the *other* other hand, one should really reboot soon after upgrade,
so you'll be taking the database down anyways.
Maybe the right thing is to go belt, suspenders, and superglue; do
fsync/fdatasync while we write, call syncfs() on the root partition and
/boot, and finally a global sync() just for good measure.
Thanks for looking at the patches!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]