[lkml]   [2011]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [rfc] Ignore Fsync Calls in Laptop_Mode
Am Sonntag, 22. Mai 2011, 02:48:33 schrieb Dave Chinner:
> On Fri, May 20, 2011 at 08:01:17AM +0200, D. Jansen wrote:
> > On Fri, May 20, 2011 at 5:39 AM, Dave Chinner <> wrote:

> > 1. I thought I (may) make that decision by using laptop mode.
> Laptop mode does not change fsync guarantees, so no, you ar enot
> making a decision to throw data away when you select laptop mode.

You do however decide to sync less often, resulting in a potentially
larger loss of data.

> > 3. A lib doesn't fix the ordering guarantee problem.
> A properly implemented filesystem will not have ordering problems
> just because fsyncs are not issued.

But user space will have this problem. A single task's sequence of
write(); fsync(); write(); does give an implicit guarantee of ordering
to user space. To keep that guarantee, you need kernel support,
because only the kernel can issue the necessary barrier/flush commands.
A filesystem is not required to make sure your writes hit the disk
in the order you issued them, unless you use fsync, which gives
an even larger guarantee, but also implies ordering.

Now you may say that you want full fsync or nothing, but this is a personal


 \ /
  Last update: 2011-05-23 10:13    [W:0.099 / U:24.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site