xfs
[Top] [All Lists]

Re: [dm-devel] Re: [PATCH 3/3] Add timeout feature

To: Takashi Sato <t-sato@xxxxxxxxxxxxx>
Subject: Re: [dm-devel] Re: [PATCH 3/3] Add timeout feature
From: Alasdair G Kergon <agk@xxxxxxxxxx>
Date: Thu, 3 Jul 2008 13:47:10 +0100
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, linux-ext4@xxxxxxxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, viro@xxxxxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, xfs@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, mtk.manpages@xxxxxxxxxxxxxx, axboe@xxxxxxxxx
In-reply-to: <9942A69CB65D4A41B39F36AF8EEF6F22@xxxxxxxxxxxxxxxx>
Mail-followup-to: Takashi Sato <t-sato@xxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, linux-ext4@xxxxxxxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, viro@xxxxxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, xfs@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, mtk.manpages@xxxxxxxxxxxxxx, axboe@xxxxxxxxx
Organization: Red Hat UK Ltd. Registered in England and Wales, number 03798903. Registered Office: Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE.
References: <20080630212450t-sato@xxxxxxxxxxxxxxx> <20080701081026.GB16691@xxxxxxxxxxxxx> <20080701105251.GC22522@xxxxxxxxxxxxxxxxxx> <9942A69CB65D4A41B39F36AF8EEF6F22@xxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.1i
On Thu, Jul 03, 2008 at 09:11:05PM +0900, Takashi Sato wrote:
> If the freezer accesses the frozen filesystem and causes a deadlock,
> the above ideas can't solve it

But you could also say that if the 'freezer' process accesses the frozen
filesystem and deadlocks then that's just a bug and that userspace code
should be fixed and there's no need to introduce the complexity of a
timeout parameter.

> >Similarly if a device-mapper device is involved, how should the following
> >sequence behave - A, B or C?
> >
> >1. dmsetup suspend (freezes)
> >2. FIFREEZE
> >3. FITHAW
> >4. dmsetup resume (thaws)
> [...]
> >C:
> > 1 succeeds, freezes
> > 2 fails, remains frozen
> > 3 fails (because device-mapper owns the freeze/thaw), remains frozen
> > 4 succeeds, thaws
> 
> I think C is appropriate and the following change makes it possible.
> How do you think?
 
The point I'm trying to make here is:
  Under what real-world circumstances might multiple concurrent freezing
  attempts occur, and which of A, B or C (or other variations) would be
  the most appropriate way of handling such situations?

A common example is people running xfs_freeze followed by an lvm command
which also attempts to freeze the filesystem.

I can see a case for B or C, but personally I prefer A:

> > 1 succeeds, freezes
> > 2 succeeds, remains frozen
> > 3 succeeds, remains frozen
> > 4 succeeds, thaws

Alasdair
-- 
agk@xxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>