LWN.net Logo

Re: [PATCH 3/3] Add timeout feature

From:  Theodore Tso <tytso-AT-mit.edu>
To:  Pavel Machek <pavel-AT-suse.cz>, Christoph Hellwig <hch-AT-infradead.org>, Takashi Sato <t-sato-AT-yk.jp.nec.com>, akpm-AT-linux-foundation.org, viro-AT-ZenIV.linux.org.uk, "linux-ext4-AT-vger.kernel.org" <linux-ext4-AT-vger.kernel.org>, "xfs-AT-oss.sgi.com" <xfs-AT-oss.sgi.com>, "dm-devel-AT-redhat.com" <dm-devel-AT-redhat.com>, "linux-fsdevel-AT-vger.kernel.org" <linux-fsdevel-AT-vger.kernel.org>, "linux-kernel-AT-vger.kernel.org" <linux-kernel-AT-vger.kernel.org>, axboe-AT-kernel.dk, mtk.manpages-AT-googlemail.com
Subject:  Re: [PATCH 3/3] Add timeout feature
Date:  Tue, 8 Jul 2008 21:09:22 -0400
Message-ID:  <20080709010922.GE9957@mit.edu>

On Wed, Jul 09, 2008 at 10:52:54AM +1000, Dave Chinner wrote:
> If you walk enough inodes while the filesystem is frozen, it
> theoretically could happen.  Typically a filesystem is only for a
> few seconds at a time so in the real world this has never, ever been
> a problem.

I had argued for the timeout (and so it's mostly my fault that
Takashi-San included it as a feature) mainly because I was (and still
amm) deeply paranoid about the competence of the application
programers who might use this feature.  I could see them screwing up
leaving it locked forever --- perhaps when their program core dumps or
when the user types ^C and they forgot to install a signal handler,
leaving the filesystem frozen forever.

In the meantime, user applications that try to create files on that
filesystem, or write to files already opened when the filesystem are
frozen will accumulate dirty pages in the page cache, until the system
finally falls over.

Think about some of the evil perpetrated by hal and the userspace
suspend-resume scripts (and how much complexity with random XML
fragments getting parsed by various dbus plugins), and tell me with a
straight face that you would trust these modern-day desktop
application writers with this interface.  Because they *will* find
some interesting way to (ab)use it.....

Also, I didn't think the extra code complexity to implements timeouts
was *that* bad --- it seemed fairly small for the functionality.

Best regards,

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


(Log in to post comments)

Re: [PATCH 3/3] Add timeout feature

Posted Jul 10, 2008 2:18 UTC (Thu) by lordsutch (subscriber, #53) [Link]

Having been bit by an xfs_freeze system hang in Debian (caused by GRUB, I think update-grub),
I tend to agree with Ted here that a timeout for filesystem freezes is a Good Thing.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds