Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755988AbZCZMuI (ORCPT ); Thu, 26 Mar 2009 08:50:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754530AbZCZMtz (ORCPT ); Thu, 26 Mar 2009 08:49:55 -0400 Received: from yx-out-2324.google.com ([74.125.44.29]:17998 "EHLO yx-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752669AbZCZMty (ORCPT ); Thu, 26 Mar 2009 08:49:54 -0400 MIME-Version: 1.0 In-Reply-To: <49CB1F90.3090501@garzik.org> References: <20090324093245.GA22483@elte.hu> <20090325215016.GP32307@mit.edu> <20090326021034.GA26559@srcf.ucam.org> <49CAEDA7.1080902@garzik.org> <49CB1F90.3090501@garzik.org> Date: Thu, 26 Mar 2009 08:49:52 -0400 Message-ID: Subject: Re: Linux 2.6.29 From: Kyle Moffett To: Jeff Garzik Cc: Linus Torvalds , Matthew Garrett , Theodore Tso , Christoph Hellwig , Jan Kara , Andrew Morton , Ingo Molnar , Alan Cox , Arjan van de Ven , Peter Zijlstra , Nick Piggin , Jens Axboe , David Rees , Jesper Krogh , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1249 Lines: 26 On Thu, Mar 26, 2009 at 2:24 AM, Jeff Garzik wrote: > Kyle Moffett wrote: >> Really, I think virtually all of the database programs would be >> perfectly happy with an "fsbarrier(fd, flags)" syscall, where if "fd" >> points to a regular file or directory then it instructs the underlying >> filesystem to do whatever internal barrier it supports, and if not >> just fail with -ENOTSUPP (so you can fall back to fdatasync(), etc). >> Perhaps "flags" would allow a "data" or "metadata" barrier, but if not >> it's not a big issue. > > If you want a per-fd barrier call, there is always sync_file_range(2) The issue is that sync_file_range doesn't seem to be documented to have any inter-file barrier semantics. Even then, from the manpage it doesn't look like write(fd)+sync_file_range(fd,SYNC_FILE_RANGE_WRITE)+write(fd) would actually prevent the second write from occurring before the first has actually hit disk (assuming both are within the specified range). Cheers, Kyle Moffett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/