LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: remount-ro & umount & quota interaction
Date: Thu, 7 Feb 2008 15:04:41 +0100	[thread overview]
Message-ID: <20080207140441.GF6140@duck.suse.cz> (raw)
In-Reply-To: <47AAE250.8040702@msgid.tls.msk.ru>

On Thu 07-02-08 13:49:52, Michael Tokarev wrote:
> Jan Kara wrote:
> [deadlock after remount-ro followed with umount when
>  quota is enabled]
> 
> >   Of course, thanks for report :). The problem is we allow remounting
> > read only which we should refuse when quota is enabled. I'll fix that in
> > a minute.
> 
> Hmm.  While that will prevent the lockup, maybe it's better to
> perform an equivalent of quotaoff on mount-ro instead?  Or even
> do something more useful, like flush the quota stuff like the
> rest of the filesystem is flushed to disk, so that on umount,
> quota will not stay on the way...
  We couldn't leave quota on when filesystem is remounted ro because we
need to modify quotafile when quota is being turned off. We could turn off
quotas when remounting read-only. As we turn them off during umount, it
probably makes sence to turn them off on remount-ro as well.
 
> I mean, why it locks in the first place?  Quota subsystem trying
> to write something into an read-only filesystem?  If so, WHY it
> is trying to do that on umount instead on a remount-ro?
  Actually, I couldn't reproduce the hang on my testing machine so I don't
know exactly why it hangs. But my guess is that it's because we try to
write to the filesystem...

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

  reply	other threads:[~2008-02-07 14:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-06 17:55 Michael Tokarev
2008-02-07 10:28 ` Jan Kara
2008-02-07 10:49   ` Michael Tokarev
2008-02-07 14:04     ` Jan Kara [this message]
2008-02-07 14:10       ` Jan Engelhardt
2008-02-07 14:32         ` Jan Kara
2008-02-08  0:32         ` David Chinner
2008-02-07 15:36       ` Michael Tokarev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080207140441.GF6140@duck.suse.cz \
    --to=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjt@tls.msk.ru \
    --subject='Re: remount-ro & umount & quota interaction' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).