From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] block new writers on frozen filesystems Date: Thu, 10 Feb 2005 15:14:27 -0800 Message-ID: <20050210151427.3fc65d56.akpm@osdl.org> References: <20050210161331.GA9001@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Received: from fw.osdl.org ([65.172.181.6]:13763 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S261612AbVBJXJW (ORCPT ); Thu, 10 Feb 2005 18:09:22 -0500 To: Christoph Hellwig In-Reply-To: <20050210161331.GA9001@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Christoph Hellwig wrote: > > When the lockfs patches went in an important bit got lost, the call in > generic_file_write to put newly incoming writers to sleep when a > filesystem is frozen. Nathan added back the call in the now separate > XFS write patch, and the patch for the generic code is below: > > > Index: mm/filemap.c > =================================================================== > RCS file: /cvs/linux-2.6-xfs/mm/filemap.c,v > retrieving revision 1.14 > diff -u -p -r1.14 filemap.c > --- mm/filemap.c 5 Jan 2005 14:17:31 -0000 1.14 > +++ mm/filemap.c 4 Feb 2005 21:35:53 -0000 > @@ -2046,6 +2046,8 @@ __generic_file_aio_write_nolock(struct k > count = ocount; > pos = *ppos; > > + vfs_check_frozen(inode->i_sb, SB_FREEZE_WRITE); hm, I didn't pay much attention to this stuff. Shouldn't the direct-io code be waiting as well? Are all paths which can write to the bdev supposed to be blocked? kjournald?