Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757320Ab1CNVVp (ORCPT ); Mon, 14 Mar 2011 17:21:45 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:44232 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757309Ab1CNVVl (ORCPT ); Mon, 14 Mar 2011 17:21:41 -0400 Date: Mon, 14 Mar 2011 14:20:32 -0700 From: Andrew Morton To: "Ted Ts'o" Cc: G@thunk.org, Indan Zupancic , Greg KH , Jonathan Nieder , Arnd Bergmann , Sage Weil , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, "Aneesh Kumar K. V" , linux-api@vger.kernel.org, mtk.manpages@gmail.com, viro@zeniv.linux.org.uk, hch@lst.de, l@jasper.es Subject: Re: [PATCH v3] introduce sys_syncfs to sync a single file system Message-Id: <20110314142032.b9523309.akpm@linux-foundation.org> In-Reply-To: <20110314211119.GC8120@thunk.org> References: <201103111255.44979.arnd@arndb.de> <20110311235607.GB15853@elie> <9446ab1a2315c0d2476c30f8315a0503.squirrel@webmail.greenhost.nl> <20110312021001.GA16833@elie> <20110312173217.GA24981@kroah.com> <1e597aedd3d7825dcc0630b1cf2399fa.squirrel@webmail.greenhost.nl> <20110314131042.5a7fb32f.akpm@linux-foundation.org> <20110314211119.GC8120@thunk.org> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2165 Lines: 48 On Mon, 14 Mar 2011 17:11:19 -0400 "Ted Ts'o" wrote: > On Mon, Mar 14, 2011 at 01:10:42PM -0700, Andrew Morton wrote: > > > > There might one day be a requirement to be able to initiate a > > resource-management-style writeback against a whole filesystem. When > > that happens, we'll regret not having added a "mode" argument to > > sys_syncfs(). > > I'm a bit nervous about exposing WB_SYNC_NONE to userspace, because > its semantics are *definitely* hard to describe. For example, at the > moment if you do a WB_SYNC_NONE writeback, the writeback code will > clamp the amount of data written back for each inode to > MAX_WRITEBACK_PAGES (1024) pages. Wha? It does? When did that get broken? > Do we want to document that? > Probably not! But if we don't document it, what can userspace expect? > > If you just issue a writeback_inodes_sb(), it's not the case that it > will start a process that will eventually write out everything (i.e., > it's not the equivalent of a non-blocking data integrity sync). It > just means, "write out some stuff". > > I could imagine userspace wanting to start a non-blocking writeout of > all data blocking pages, and which doesn't cause queue flush / barrier > requests. (i.e., a non-blocking-non-barrier-issuing-but-otherwise-a- > data-integrity writeback) But that's not something that the current > writeback machinery can do easily, at least not today. Well. Current implementation shortcomings don't carry a lot of weight when designing a permanent interface. > It wouldn't hurt to have a "flags" field which we could expand later > --- but that can lead to portability headaches for userspace programs > that don't know whether a particular kernel is going to support a > particular flag or not. So it's certainly not a panacea. I don't see a need to add an arg to syncfs() really. But we should demonstrate that we've thought about it ;) -- 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/