From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Chinner Subject: Re: [PATCH] fs: Fix hang with BSD accounting on frozen filesystem Date: Thu, 8 Nov 2012 16:22:56 +1100 Message-ID: <20121108052256.GM6434@dastard> References: <1352327499-17151-1-git-send-email-jack@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Al Viro , linux-fsdevel@vger.kernel.org, Nikola Ciprich To: Jan Kara Return-path: Received: from ipmail06.adl2.internode.on.net ([150.101.137.129]:34336 "EHLO ipmail06.adl2.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750881Ab2KHFXA (ORCPT ); Thu, 8 Nov 2012 00:23:00 -0500 Content-Disposition: inline In-Reply-To: <1352327499-17151-1-git-send-email-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Nov 07, 2012 at 11:31:39PM +0100, Jan Kara wrote: > When BSD process accounting is enabled and logs information to a filesystem > which gets frozen, system easily becomes unusable because each attempt to > account process information blocks. Thus e.g. every task gets blocked in exit. > > It seems better to drop accounting information (which can already happen when > filesystem is running out of space) instead of locking system up. This is > implemented using a special flag FMODE_NO_FREEZE_WAIT in file->f_mode of a > file to which accounting information is written. I have no problems with making freeze waiting non-blocking, by why invent a new flag for what is essentially an O_NONBLOCK operation? Indeed, if someone opens a file O_NONBLOCK, shouldn't if behave exactly the same on a frozen filesystem as this special FMODE_NO_FREEZE_WAIT flag? FWIW, nfsd could use this as well so that it doesn't block all the nfsd threads trying to write to a frozen filesystem but instead returns EJUKEBOX to the client to tell it ot wait for a while before trying the operation again... Cheers, Dave. -- Dave Chinner david@fromorbit.com