From mboxrd@z Thu Jan 1 00:00:00 1970 From: Valerie Aurora Subject: Re: [RFC PATCH] Show data flow for file copyup in unions Date: Thu, 18 Mar 2010 13:55:43 -0400 Message-ID: <20100318175543.GA30924@shell> References: <20100316181711.GB24819@shell> <20335.1268779891@jrobl> <20100318005358.GA24348@shell> <2640.1268899857@jrobl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Viro , Miklos Szeredi , Dmitry Monakhov , Jeff Layton , Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: "J. R. Okajima" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:40457 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753663Ab0CRR4L (ORCPT ); Thu, 18 Mar 2010 13:56:11 -0400 Content-Disposition: inline In-Reply-To: <2640.1268899857@jrobl> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Mar 18, 2010 at 05:10:57PM +0900, J. R. Okajima wrote: > > Valerie Aurora: > > I think what people will expect is that we copy up in that case. I > > can think of ways this can go wrong, but perhaps that should be an > > explicit requirement on the top-layer file system, that it can handle > > create/unlink() in a directory without write permission. > > I am not sure such requirement is the right way. > How about delegating open() to keventd or some other workqueue which > will succeed to create files under a directory without write permission? > Of course, we should handle some error cases after creating a file. Hm, I don't understand how handing it off to another thread would help. The thing I am worried about is some internal assumption in the file system that a directory without write permission can't be changed. Totally manufactured example: somefs_create() { BUG_ON(IS_RDONLY(dir->d_inode); [...] } -VAL