[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140513185312.GB2738@mguzik.redhat.com>
Date: Tue, 13 May 2014 20:53:13 +0200
From: Mateusz Guzik <mguzik@...hat.com>
To: Joe Perches <joe@...ches.com>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Josef Bacik <jbacik@...com>, Jan Kara <jack@...e.cz>,
Al Viro <viro@...IV.linux.org.uk>,
Eric Sandeen <esandeen@...hat.com>
Subject: Re: [PATCH 2/2] fs: print a message when freezing/unfreezing
filesystems
On Tue, May 13, 2014 at 11:39:31AM -0700, Joe Perches wrote:
> On Tue, 2014-05-13 at 20:31 +0200, Mateusz Guzik wrote:
> > This helps hang troubleshooting efforts when only dmesg is available.
> []
> > diff --git a/fs/super.c b/fs/super.c
> []
> > @@ -1289,12 +1289,9 @@ int freeze_super(struct super_block *sb)
> > return 0; /* sic - it's "nothing to do" */
> > }
> >
> > - if (sb->s_flags & MS_RDONLY) {
> > + if (sb->s_flags & MS_RDONLY)
> > /* Nothing to do really... */
> > - sb->s_writers.frozen = SB_FREEZE_COMPLETE;
> > - up_write(&sb->s_umount);
> > - return 0;
> > - }
> > + goto out;
>
> Should this block really be part of this patch?
> If so, please add a small note to the commit log.
>
This is the same code which you can find at the end of the function.
I added the label so that I can write freeze printk only once.
> I'm not sure making the reader goto out for this
> bit of the code needs doing as there are multiple
> blocks with return above here.
>
There are 2. One just returns an error and second one does not change
s_writers.frozen, so unreezing of something like this would fail.
However, the case which got modified results in unfreezable fs, so not
printing the message for this case would result in unmatched entries in
the log.
> Trivially, when there is a comment in a single line
> like this, then braces are often used too.
>
Thanks, I'll send a modified patch later. Waiting for some other comments.
--
Mateusz Guzik
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists