Received: with ECARTIS (v1.0.0; list linux-xfs); Tue, 29 Jul 2003 08:47:59 -0700 (PDT) Received: from Cantor.suse.de (ns.suse.de [213.95.15.193]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h6TFlkFl018835 for ; Tue, 29 Jul 2003 08:47:48 -0700 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 745C414620; Tue, 29 Jul 2003 17:47:41 +0200 (MEST) Date: Tue, 29 Jul 2003 17:47:40 +0200 From: Andi Kleen To: linux-xfs@oss.sgi.com Cc: erbenson@alaska.net Subject: Re: [PATCH] Implement immutable/append-only flags in XFS #3 Message-ID: <20030729154740.GD7435@wotan.suse.de> References: <20030722003443.GA13188@plato.local.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030722003443.GA13188@plato.local.lan> X-archive-position: 4776 X-ecartis-version: Ecartis v1.0.0 Sender: linux-xfs-bounce@oss.sgi.com Errors-to: linux-xfs-bounce@oss.sgi.com X-original-sender: ak@suse.de Precedence: bulk X-list: linux-xfs Content-Length: 1787 Lines: 38 On Mon, Jul 21, 2003 at 04:34:43PM -0800, Ethan Benson wrote: > My question on #3 is whether we want this behavior in XFS? my current > patch does NOT implement it. My opinion is that the only flag this > really makes sense for is sync, since setting the sync flag on a inherited sync is very useful. iirc it was introduced because some mail servers assume everything is a BSD with UFS and rename is always synchronous, otherwise they have potential crash recovery issues. You just set sync on the spool and everything ends up safely synchronous. AFAIK the XFS transaction manager does not guarantee the the transaction is committed before the rename returns, so it would be needed even on XFS. However XFS seems to be default to osyncisdsync, and for the mail server use case you need O_SYNC, not O_DSYNC. Maybe it would be useful to define a new bit for both cases? > of this. I am definitely not convinced its a sensible idea for > append-only since it ends up allowing non-privileged users to create > append-only files, which is not normally permitted. Also > automatically setting the append-only flag on a newly created file Agreed. I assume ext2/reiser do also not inherit it, right? > I have a (somewhat hideous) test program to check as many things as i > could think of to ensure immutable/append-only are properly enforced, > the only thing lacking in it is tests of all the XFS ioctls, perhaps > someone familiar with xfs ioctls could add these, currently the > libhandle open/write tests are done. You can find this test program > at http://penguinppc.org/~eb/t_immutable.c I would suggest to submit that program to LTP. I'm sure they would appreciate more test cases and it would help making all the linux file systems behave similar in this area. -Andi