2008-07-01 15:07:30

by Elias Oltmanns

[permalink] [raw]
Subject: Re: [xfs-masters] Re: freeze vs freezer

"Rafael J. Wysocki" <[email protected]> wrote:
> On Tuesday, 1 of July 2008, Dave Chinner wrote:
>> On Tue, Jul 01, 2008 at 12:38:41AM +0200, Rafael J. Wysocki wrote:
>
>> > On Tuesday, 1 of July 2008, Dave Chinner wrote:
>> > > On Mon, Jun 30, 2008 at 11:00:43PM +0200, Rafael J. Wysocki wrote:
>> > > > On Monday, 30 of June 2008, Dave Chinner wrote:
[...]
>> > > > > What do you do with a sync I/O (read or write)? The
>> > > > > process is going to have to go to sleep somewhere in D state waiting
>> > > > > for that I/O to complete. If you're going to intercept such
>> > > > > processes somewhere else to do something magic, then why not put
>> > > > > that magic in vfs_check_frozen()?
>> > > >
>> > > > This might work too, but it would be nice to do something independent of the
>> > > > freezer, so that we can drop the freezer when we want and not when we are
>> > > > forced to.
>> > >
>> > > vfs_check_frozen() is completely independent of the process freezer.
>> >
>> > Well, can you please tell me how exactly that works, then?
>>
>> Try looking at the code. When we freeze a filesystem sb->s_frozen
>> changes state depending on the level of freeze currently obtained
>> by the filesystem. And:
>>
>> #define vfs_check_frozen(sb, level) \
>> wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level)))
>>
>> Pretty bloody simple, really.
>
> OK
>
> Do all of the filesystems implement the freezing?

There is some work in progress [1]. If you think this will help you to
address this issue on the fs level, where I think it should be done, you
may even be able to request some changes to fit your needs before it
gets merged into mainline.

Regards,

Elias

[1] http://permalink.gmane.org/gmane.linux.file-systems/24716


2008-07-01 15:18:38

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [xfs-masters] Re: freeze vs freezer

On Tue, Jul 01, 2008 at 05:05:29PM +0200, Elias Oltmanns wrote:
> There is some work in progress [1]. If you think this will help you to
> address this issue on the fs level, where I think it should be done, you
> may even be able to request some changes to fit your needs before it
> gets merged into mainline.

That is just a direct user interface to this functionality. The
functionality has been around for a long time.

2008-07-01 21:16:02

by Dave Chinner

[permalink] [raw]
Subject: Re: [xfs-masters] Re: freeze vs freezer

On Tue, Jul 01, 2008 at 05:05:29PM +0200, Elias Oltmanns wrote:
> "Rafael J. Wysocki" <[email protected]> wrote:
> > Do all of the filesystems implement the freezing?
>
> There is some work in progress [1].
[....]
> [1] http://permalink.gmane.org/gmane.linux.file-systems/24716

No, that's the userspace ioctl interface to enable freezing from
something other than dm-snapshot. The filesystems that is aimed at
already support freezing via freeze_bdev().

Cheers,

Dave.
--
Dave Chinner
[email protected]