From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753321AbaEOKCD (ORCPT ); Thu, 15 May 2014 06:02:03 -0400 Received: from cantor2.suse.de ([195.135.220.15]:43857 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751287AbaEOKCA (ORCPT ); Thu, 15 May 2014 06:02:00 -0400 Date: Thu, 15 May 2014 12:01:57 +0200 From: Jan Kara To: Mateusz Guzik Cc: Dave Chinner , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Josef Bacik , Jan Kara , Al Viro , Eric Sandeen Subject: Re: [PATCH 2/2] fs: print a message when freezing/unfreezing filesystems Message-ID: <20140515100157.GB27289@quack.suse.cz> References: <1400005862-3751-1-git-send-email-mguzik@redhat.com> <1400005862-3751-2-git-send-email-mguzik@redhat.com> <20140514215457.GC5421@dastard> <20140515094236.GE10637@mguzik.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140515094236.GE10637@mguzik.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 15-05-14 11:42:37, Mateusz Guzik wrote: > On Thu, May 15, 2014 at 07:54:57AM +1000, Dave Chinner wrote: > > On Tue, May 13, 2014 at 08:31:02PM +0200, Mateusz Guzik wrote: > > > This helps hang troubleshooting efforts when only dmesg is available. > > > > I really don't think that spamming dmesg every time a filesystem is > > frozen or thawed is a good idea. This happens a *lot* when systems > > are using snapshots, and for the most part nobody cares about > > freeze/thaw cycles because they almost always work just fine. > > > > I agree it may get noisy. > > > I'd think that /proc/self/mounts would be a much better place to > > indicate that the fs is frozen. After all, that's where we tell > > people whether the filesystem is ro or rw, and frozen is just > > a temporary, non-invasive ro state... > > > > Except you can't inspect /proc/self/mounts when the only thing you got > is dmesg, so this does not really help my case. > > That said, I'll try to come up with a different solution. > > Poorly reported side-effects of frozen I/O are only a part of the real > problem which is hung task detector being able to typically report > backtraces of "victims" only. I came up with printks becuase these are > a cheap way and would help us out in a lot of cases. I was tracking down a couple of times what the hell is freezing the filesystem (and not unfreezing it) and I agree with Mateusz it would be nice if we could tell after the fact who froze the fs. Maybe we could store that information in superblock and dump it during emergency thaw? Honza -- Jan Kara SUSE Labs, CR