Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757277Ab1CNVLh (ORCPT ); Mon, 14 Mar 2011 17:11:37 -0400 Received: from li9-11.members.linode.com ([67.18.176.11]:53567 "EHLO test.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755825Ab1CNVLg (ORCPT ); Mon, 14 Mar 2011 17:11:36 -0400 Date: Mon, 14 Mar 2011 17:11:19 -0400 From: "Ted Ts'o" To: Andrew Morton , G@thunk.org Cc: 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: <20110314211119.GC8120@thunk.org> Mail-Followup-To: Ted Ts'o , Andrew Morton , G, 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 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110314131042.5a7fb32f.akpm@linux-foundation.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on test.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1800 Lines: 36 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. 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. 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. - Ted -- 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/