From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Lokier Subject: Re: [RFC PATCH] fpathconf() for fsync() behavior Date: Thu, 23 Apr 2009 12:21:05 +0100 Message-ID: <20090423112105.GA1589@shareable.org> References: <20090423001257.GA16540@shell> <20090422221748.8c9022d1.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Valerie Aurora Henson , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Mason , Theodore Tso , Eric Sandeen , Ric Wheeler To: Andrew Morton Return-path: Received: from mail2.shareable.org ([80.68.89.115]:39186 "EHLO mail2.shareable.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754866AbZDWLVK (ORCPT ); Thu, 23 Apr 2009 07:21:10 -0400 Content-Disposition: inline In-Reply-To: <20090422221748.8c9022d1.akpm@linux-foundation.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Andrew Morton wrote: > Would it be better to implement new syscall(s) with finer-grained control > and better semantics? Then userspace would just need to to: > > fsync_on_steroids(fd, FSYNC_BEFORE_RENAME); > > and that all gets down into the filesystem which can then work out what > it needs to do to implement the command. +1 from me. Several flags come to mind for discussion. FSYNC_HARDWARE. FSYNC_ORDER_ONLY, FSYNC_FLUSH. FSYNC_DATA_BEFORE_SIZE. FSYNC_BEFORE_NEW_FILE. Nick Piggin was working on fsync_range(). Maybe it's time to do fsync properly? -- Jamie