Re: [rfc] Ignore Fsync Calls in Laptop_Mode

From: Oliver Neukum
Date: Mon May 30 2011 - 03:11:25 EST


Am Montag, 30. Mai 2011, 03:53:18 schrieb david@xxxxxxx:
> > So what if we would queue the fsyncs along with the writes - we would
> > just fsync later instead of immediately, in between the writes as they
> > came in. Then by design previous data could not be corrupted, right?
> > We would do exactly the same thing, just later.
> > It'd be kind of a disk write time distortion field.
>
> the problem is that the spec for fsync says that your program stops until
> fsync finishes. If you don't do that then you will corrupt and loose data.

It is important to be precise.
You will loose data, but you will not get corruption.

> so if you delay fsync you will have your application (or desktop manager)
> freeze until the fsync completes.
>
> if what you are wanting is the ability to say 'these things must be
> written before these other things to keep them from being corrupted, but I
> don't care when they get written (or if they get lost in a crash)' then
> what you want isn't fsync, it's a barrier.

Yes, but where is the problem?

Regards
Oliver
--
- - -
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5
90409 Nürnberg
Germany
- - -
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/