Re: [xfs-masters] Re: freeze vs freezer

From: Elias Oltmanns
Date: Tue Jul 01 2008 - 11:07:33 EST


"Rafael J. Wysocki" <rjw@xxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/