* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
[not found] ` <bUZ7p-448-9@gated-at.bofh.it>
@ 2009-01-17 14:03 ` Bodo Eggert
2009-01-17 15:44 ` Eric Sandeen
0 siblings, 1 reply; 17+ messages in thread
From: Bodo Eggert @ 2009-01-17 14:03 UTC (permalink / raw)
To: Eric Sandeen, Valdis.Kletnieks, Eric Sandeen, Andrew Morton,
linux-fsdevel, linux-kernel, t-sato
Eric Sandeen <sandeen@sandeen.net> wrote:
> Valdis.Kletnieks@vt.edu wrote:
>> On Thu, 15 Jan 2009 21:59:10 CST, Eric Sandeen said:
>>> Oh, actually, I'd think not. If the freeze was done properly by the
>>> filesystem, all data was flushed, the fs was quiesced, and new IO was
>>> blocked. pdflush should never be visiting these...
>>
>> Yes, but a lot of 'if's - and usually you're reaching for sysrq-S precisely
>> *because* you suspect that stuff wasn't happening properly on its own...
>
> Actually, only one if - if the fs implemented freeze properly.
>
> Well, the use case I envision here is something like:
>
> # freeze /my/mount/point/to/fs/to/snapshot
>
> except oops, that wasn't mounted, and you just froze your root fs.
Maybe freeze should protect against that by requiring to specify the exact
mountpount, unless you say freeze --subdir?
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-17 14:03 ` [PATCH] Allow SysRq emergency sync to thaw frozen filesystems Bodo Eggert
@ 2009-01-17 15:44 ` Eric Sandeen
0 siblings, 0 replies; 17+ messages in thread
From: Eric Sandeen @ 2009-01-17 15:44 UTC (permalink / raw)
To: 7eggert
Cc: Eric Sandeen, Valdis.Kletnieks, Andrew Morton, linux-fsdevel,
linux-kernel, t-sato
Bodo Eggert wrote:
> Eric Sandeen <sandeen@sandeen.net> wrote:
>> Valdis.Kletnieks@vt.edu wrote:
>>> On Thu, 15 Jan 2009 21:59:10 CST, Eric Sandeen said:
>
>>>> Oh, actually, I'd think not. If the freeze was done properly by the
>>>> filesystem, all data was flushed, the fs was quiesced, and new IO was
>>>> blocked. pdflush should never be visiting these...
>>> Yes, but a lot of 'if's - and usually you're reaching for sysrq-S precisely
>>> *because* you suspect that stuff wasn't happening properly on its own...
>> Actually, only one if - if the fs implemented freeze properly.
>>
>> Well, the use case I envision here is something like:
>>
>> # freeze /my/mount/point/to/fs/to/snapshot
>>
>> except oops, that wasn't mounted, and you just froze your root fs.
>
> Maybe freeze should protect against that by requiring to specify the exact
> mountpount, unless you say freeze --subdir?
That's a good idea. My "freeze" above was a hypothetical tool which
doesn't really exist yet, but should get that enhancement. :)
(xfs_freeze does not do this checking today, it probably should)
-Eric
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
@ 2009-01-15 4:06 Eric Sandeen
2009-01-16 0:20 ` Andrew Morton
2009-01-16 8:48 ` Pavel Machek
0 siblings, 2 replies; 17+ messages in thread
From: Eric Sandeen @ 2009-01-15 4:06 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel Mailing List; +Cc: Andrew Morton, Takashi Sato
Now that the filesystem freeze operation has been elevated
to the VFS, and is just an ioctl away, some sort of safety net
for unintentionally frozen root filesystems may be in order.
The timeout thaw originally proposed did not get merged, but
perhaps something like this would be useful in emergencies.
This doesn't have to piggyback on the existing emergency sync
sysrq, but it seems like a reasonable, simple addition to me.
I've tested this on a non-root fs with multiple (nested) freezers,
as well as on a system rendered unresponsive due to a frozen
root fs.
Thanks,
-Eric
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
Index: linux-2.6/drivers/char/sysrq.c
===================================================================
--- linux-2.6.orig/drivers/char/sysrq.c
+++ linux-2.6/drivers/char/sysrq.c
@@ -151,6 +151,7 @@ static struct sysrq_key_op sysrq_reboot_
static void sysrq_handle_sync(int key, struct tty_struct *tty)
{
+ emergency_thaw();
emergency_sync();
}
static struct sysrq_key_op sysrq_sync_op = {
Index: linux-2.6/fs/buffer.c
===================================================================
--- linux-2.6.orig/fs/buffer.c
+++ linux-2.6/fs/buffer.c
@@ -258,6 +258,29 @@ struct super_block *freeze_bdev(struct b
}
EXPORT_SYMBOL(freeze_bdev);
+void do_thaw(unsigned long unused)
+{
+ struct super_block *sb;
+ char b[BDEVNAME_SIZE];
+
+ list_for_each_entry(sb, &super_blocks, s_list) {
+ while (sb->s_bdev && !thaw_bdev(sb->s_bdev, sb))
+ printk(KERN_WARNING "Emergency Thaw on %s\n",
+ bdevname(sb->s_bdev, b));
+ }
+ printk(KERN_WARNING "Emergency Thaw complete\n");
+}
+
+/**
+ * emergency_thaw -- force thaw every filesystem
+ *
+ * Used for emergency unfreeze of all filesystems via SysRq
+ */
+void emergency_thaw(void)
+{
+ pdflush_operation(do_thaw, 0);
+}
+
/**
* thaw_bdev -- unlock filesystem
* @bdev: blockdevice to unlock
Index: linux-2.6/include/linux/buffer_head.h
===================================================================
--- linux-2.6.orig/include/linux/buffer_head.h
+++ linux-2.6/include/linux/buffer_head.h
@@ -171,6 +171,7 @@ void __wait_on_buffer(struct buffer_head
wait_queue_head_t *bh_waitq_head(struct buffer_head *bh);
int fsync_bdev(struct block_device *);
struct super_block *freeze_bdev(struct block_device *);
+void emergency_thaw(void);
int thaw_bdev(struct block_device *, struct super_block *);
int fsync_super(struct super_block *);
int fsync_no_super(struct block_device *);
Index: linux-2.6/Documentation/sysrq.txt
===================================================================
--- linux-2.6.orig/Documentation/sysrq.txt
+++ linux-2.6/Documentation/sysrq.txt
@@ -101,7 +101,8 @@ On all - write a character to /proc/sys
'r' - Turns off keyboard raw mode and sets it to XLATE.
-'s' - Will attempt to sync all mounted filesystems.
+'s' - Will attempt to sync all mounted filesystems, and unfreeze
+ any frozen fileystems.
't' - Will dump a list of current tasks and their information to your
console.
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-15 4:06 Eric Sandeen
@ 2009-01-16 0:20 ` Andrew Morton
2009-01-16 3:49 ` Eric Sandeen
2009-01-16 8:48 ` Pavel Machek
1 sibling, 1 reply; 17+ messages in thread
From: Andrew Morton @ 2009-01-16 0:20 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-fsdevel, linux-kernel, t-sato
On Wed, 14 Jan 2009 22:06:17 -0600
Eric Sandeen <sandeen@redhat.com> wrote:
> Now that the filesystem freeze operation has been elevated
> to the VFS, and is just an ioctl away, some sort of safety net
> for unintentionally frozen root filesystems may be in order.
>
> The timeout thaw originally proposed did not get merged, but
> perhaps something like this would be useful in emergencies.
>
> This doesn't have to piggyback on the existing emergency sync
> sysrq, but it seems like a reasonable, simple addition to me.
>
> I've tested this on a non-root fs with multiple (nested) freezers,
> as well as on a system rendered unresponsive due to a frozen
> root fs.
Worried.
Under what operational scenarios is ths feature actually needed/used?
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> Index: linux-2.6/drivers/char/sysrq.c
> ===================================================================
> --- linux-2.6.orig/drivers/char/sysrq.c
> +++ linux-2.6/drivers/char/sysrq.c
> @@ -151,6 +151,7 @@ static struct sysrq_key_op sysrq_reboot_
>
> static void sysrq_handle_sync(int key, struct tty_struct *tty)
> {
> + emergency_thaw();
> emergency_sync();
> }
Kind of weird. The thaw will happen after/during the sync().
I guess that if the sync is blocked on a frozen fs then things will
sort themselves out.
otoh, if all the pdflush threads are blocked on frozen filesystems
(possible?) then the emergency_thaw() simply won't do anything.
> ===================================================================
> --- linux-2.6.orig/fs/buffer.c
> +++ linux-2.6/fs/buffer.c
> @@ -258,6 +258,29 @@ struct super_block *freeze_bdev(struct b
> }
> EXPORT_SYMBOL(freeze_bdev);
>
> +void do_thaw(unsigned long unused)
> +{
> + struct super_block *sb;
> + char b[BDEVNAME_SIZE];
> +
> + list_for_each_entry(sb, &super_blocks, s_list) {
> + while (sb->s_bdev && !thaw_bdev(sb->s_bdev, sb))
> + printk(KERN_WARNING "Emergency Thaw on %s\n",
> + bdevname(sb->s_bdev, b));
hm, I made the args to bdevname() backwards. Bad me.
> + }
> + printk(KERN_WARNING "Emergency Thaw complete\n");
> +}
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-16 0:20 ` Andrew Morton
@ 2009-01-16 3:49 ` Eric Sandeen
2009-01-16 3:59 ` Eric Sandeen
2009-01-16 16:21 ` Dave Kleikamp
0 siblings, 2 replies; 17+ messages in thread
From: Eric Sandeen @ 2009-01-16 3:49 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-fsdevel, linux-kernel, t-sato
Andrew Morton wrote:
> On Wed, 14 Jan 2009 22:06:17 -0600
> Eric Sandeen <sandeen@redhat.com> wrote:
>
>> Now that the filesystem freeze operation has been elevated
>> to the VFS, and is just an ioctl away, some sort of safety net
>> for unintentionally frozen root filesystems may be in order.
>>
>> The timeout thaw originally proposed did not get merged, but
>> perhaps something like this would be useful in emergencies.
>>
>> This doesn't have to piggyback on the existing emergency sync
>> sysrq, but it seems like a reasonable, simple addition to me.
>>
>> I've tested this on a non-root fs with multiple (nested) freezers,
>> as well as on a system rendered unresponsive due to a frozen
>> root fs.
>
> Worried.
>
> Under what operational scenarios is ths feature actually needed/used?
Well, if you freeze root and do some things that require IO there, you
can get stuck pretty easily
(hacked xfs_io to call the ioctl here)
[root@inode io]# ./xfs_io -r -x -F -c "freeze" /
[root@inode io]# ls
^Z
^C
<tap tap.. uhoh>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> ---
>>
>> Index: linux-2.6/drivers/char/sysrq.c
>> ===================================================================
>> --- linux-2.6.orig/drivers/char/sysrq.c
>> +++ linux-2.6/drivers/char/sysrq.c
>> @@ -151,6 +151,7 @@ static struct sysrq_key_op sysrq_reboot_
>>
>> static void sysrq_handle_sync(int key, struct tty_struct *tty)
>> {
>> + emergency_thaw();
>> emergency_sync();
>> }
>
> Kind of weird. The thaw will happen after/during the sync().
oh, hrm. Maybe I didn't think enough about how it's handed off to
pdflush; I could rearrange if that makes sense? Or maybe handing to
pdflush is wrong, it was just so convenient....
> I guess that if the sync is blocked on a frozen fs then things will
> sort themselves out.
>
> otoh, if all the pdflush threads are blocked on frozen filesystems
> (possible?) then the emergency_thaw() simply won't do anything.
Hm, maybe possible... I'll have to think about that.
Thanks,
-Eric
>> ===================================================================
>> --- linux-2.6.orig/fs/buffer.c
>> +++ linux-2.6/fs/buffer.c
>> @@ -258,6 +258,29 @@ struct super_block *freeze_bdev(struct b
>> }
>> EXPORT_SYMBOL(freeze_bdev);
>>
>> +void do_thaw(unsigned long unused)
>> +{
>> + struct super_block *sb;
>> + char b[BDEVNAME_SIZE];
>> +
>> + list_for_each_entry(sb, &super_blocks, s_list) {
>> + while (sb->s_bdev && !thaw_bdev(sb->s_bdev, sb))
>> + printk(KERN_WARNING "Emergency Thaw on %s\n",
>> + bdevname(sb->s_bdev, b));
>
> hm, I made the args to bdevname() backwards. Bad me.
>
>> + }
>> + printk(KERN_WARNING "Emergency Thaw complete\n");
>> +}
>
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-16 3:49 ` Eric Sandeen
@ 2009-01-16 3:59 ` Eric Sandeen
2009-01-16 15:33 ` Valdis.Kletnieks
2009-01-16 16:21 ` Dave Kleikamp
1 sibling, 1 reply; 17+ messages in thread
From: Eric Sandeen @ 2009-01-16 3:59 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Andrew Morton, linux-fsdevel, linux-kernel, t-sato
Eric Sandeen wrote:
> Andrew Morton wrote:
>> On Wed, 14 Jan 2009 22:06:17 -0600
>> Eric Sandeen <sandeen@redhat.com> wrote:
...
>>> Index: linux-2.6/drivers/char/sysrq.c
>>> ===================================================================
>>> --- linux-2.6.orig/drivers/char/sysrq.c
>>> +++ linux-2.6/drivers/char/sysrq.c
>>> @@ -151,6 +151,7 @@ static struct sysrq_key_op sysrq_reboot_
>>>
>>> static void sysrq_handle_sync(int key, struct tty_struct *tty)
>>> {
>>> + emergency_thaw();
>>> emergency_sync();
>>> }
>> Kind of weird. The thaw will happen after/during the sync().
>
> oh, hrm. Maybe I didn't think enough about how it's handed off to
> pdflush; I could rearrange if that makes sense? Or maybe handing to
> pdflush is wrong, it was just so convenient....
>
>> I guess that if the sync is blocked on a frozen fs then things will
>> sort themselves out.
>>
>> otoh, if all the pdflush threads are blocked on frozen filesystems
>> (possible?) then the emergency_thaw() simply won't do anything.
>
> Hm, maybe possible... I'll have to think about that.
Oh, actually, I'd think not. If the freeze was done properly by the
filesystem, all data was flushed, the fs was quiesced, and new IO was
blocked. pdflush should never be visiting these...
In fact emergency sync is kind of orthogonal to emergency thaw, anything
which needs a thaw should never actually need a sync.
-Eric
> Thanks,
> -Eric
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-16 3:59 ` Eric Sandeen
@ 2009-01-16 15:33 ` Valdis.Kletnieks
2009-01-16 15:40 ` Eric Sandeen
0 siblings, 1 reply; 17+ messages in thread
From: Valdis.Kletnieks @ 2009-01-16 15:33 UTC (permalink / raw)
To: Eric Sandeen
Cc: Eric Sandeen, Andrew Morton, linux-fsdevel, linux-kernel, t-sato
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
On Thu, 15 Jan 2009 21:59:10 CST, Eric Sandeen said:
> Oh, actually, I'd think not. If the freeze was done properly by the
> filesystem, all data was flushed, the fs was quiesced, and new IO was
> blocked. pdflush should never be visiting these...
Yes, but a lot of 'if's - and usually you're reaching for sysrq-S precisely
*because* you suspect that stuff wasn't happening properly on its own...
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-16 15:33 ` Valdis.Kletnieks
@ 2009-01-16 15:40 ` Eric Sandeen
0 siblings, 0 replies; 17+ messages in thread
From: Eric Sandeen @ 2009-01-16 15:40 UTC (permalink / raw)
To: Valdis.Kletnieks
Cc: Eric Sandeen, Andrew Morton, linux-fsdevel, linux-kernel, t-sato
Valdis.Kletnieks@vt.edu wrote:
> On Thu, 15 Jan 2009 21:59:10 CST, Eric Sandeen said:
>
>> Oh, actually, I'd think not. If the freeze was done properly by the
>> filesystem, all data was flushed, the fs was quiesced, and new IO was
>> blocked. pdflush should never be visiting these...
>
> Yes, but a lot of 'if's - and usually you're reaching for sysrq-S precisely
> *because* you suspect that stuff wasn't happening properly on its own...
Actually, only one if - if the fs implemented freeze properly.
Well, the use case I envision here is something like:
# freeze /my/mount/point/to/fs/to/snapshot
except oops, that wasn't mounted, and you just froze your root fs.
I was thinking more recovery from admin error, not programming error...
If we're using sysrq to work around any possible programming error, then
we have a pretty tough job to make sure that it always works, no?
-Eric
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-16 3:49 ` Eric Sandeen
2009-01-16 3:59 ` Eric Sandeen
@ 2009-01-16 16:21 ` Dave Kleikamp
2009-01-16 16:42 ` Dave Kleikamp
1 sibling, 1 reply; 17+ messages in thread
From: Dave Kleikamp @ 2009-01-16 16:21 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Andrew Morton, linux-fsdevel, linux-kernel, t-sato
On Thu, 2009-01-15 at 21:49 -0600, Eric Sandeen wrote:
> Andrew Morton wrote:
> > On Wed, 14 Jan 2009 22:06:17 -0600
> > Eric Sandeen <sandeen@redhat.com> wrote:
> >> Index: linux-2.6/drivers/char/sysrq.c
> >> ===================================================================
> >> --- linux-2.6.orig/drivers/char/sysrq.c
> >> +++ linux-2.6/drivers/char/sysrq.c
> >> @@ -151,6 +151,7 @@ static struct sysrq_key_op sysrq_reboot_
> >>
> >> static void sysrq_handle_sync(int key, struct tty_struct *tty)
> >> {
> >> + emergency_thaw();
> >> emergency_sync();
> >> }
> >
> > Kind of weird. The thaw will happen after/during the sync().
>
> oh, hrm. Maybe I didn't think enough about how it's handed off to
> pdflush; I could rearrange if that makes sense? Or maybe handing to
> pdflush is wrong, it was just so convenient....
I don't understand the reason for handing it to pdflush. I would expect
thaw to be very fast. Do we expect it to block anywhere, and if so, for
very long? Not that I see any problem with it.
Shaggy
--
David Kleikamp
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-16 16:21 ` Dave Kleikamp
@ 2009-01-16 16:42 ` Dave Kleikamp
0 siblings, 0 replies; 17+ messages in thread
From: Dave Kleikamp @ 2009-01-16 16:42 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Andrew Morton, linux-fsdevel, linux-kernel, t-sato
On Fri, 2009-01-16 at 10:21 -0600, Dave Kleikamp wrote:
> On Thu, 2009-01-15 at 21:49 -0600, Eric Sandeen wrote:
> > oh, hrm. Maybe I didn't think enough about how it's handed off to
> > pdflush; I could rearrange if that makes sense? Or maybe handing to
> > pdflush is wrong, it was just so convenient....
>
> I don't understand the reason for handing it to pdflush. I would expect
> thaw to be very fast. Do we expect it to block anywhere, and if so, for
> very long? Not that I see any problem with it.
Eric pointed out on irc that this is in interrupt context, so even
taking a mutex is not allowed. I now agree that handing it to pdflush
is reasonable.
Shaggy
--
David Kleikamp
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-15 4:06 Eric Sandeen
2009-01-16 0:20 ` Andrew Morton
@ 2009-01-16 8:48 ` Pavel Machek
2009-01-16 15:17 ` Valdis.Kletnieks
1 sibling, 1 reply; 17+ messages in thread
From: Pavel Machek @ 2009-01-16 8:48 UTC (permalink / raw)
To: Eric Sandeen
Cc: linux-fsdevel, linux-kernel Mailing List, Andrew Morton,
Takashi Sato
> Now that the filesystem freeze operation has been elevated
> to the VFS, and is just an ioctl away, some sort of safety net
> for unintentionally frozen root filesystems may be in order.
>
> The timeout thaw originally proposed did not get merged, but
> perhaps something like this would be useful in emergencies.
>
> This doesn't have to piggyback on the existing emergency sync
> sysrq, but it seems like a reasonable, simple addition to me.
>
> I've tested this on a non-root fs with multiple (nested) freezers,
> as well as on a system rendered unresponsive due to a frozen
> root fs.
Emergency Sync should not do this. Invent another key.
...because otherwise, if you hit emergency sync but the system is
still alive and relies on filesystem freezing, bad stuff will happen.
Pavel
> ---
>
> Index: linux-2.6/drivers/char/sysrq.c
> ===================================================================
> --- linux-2.6.orig/drivers/char/sysrq.c
> +++ linux-2.6/drivers/char/sysrq.c
> @@ -151,6 +151,7 @@ static struct sysrq_key_op sysrq_reboot_
>
> static void sysrq_handle_sync(int key, struct tty_struct *tty)
> {
> + emergency_thaw();
> emergency_sync();
> }
> static struct sysrq_key_op sysrq_sync_op = {
> Index: linux-2.6/fs/buffer.c
> ===================================================================
> --- linux-2.6.orig/fs/buffer.c
> +++ linux-2.6/fs/buffer.c
> @@ -258,6 +258,29 @@ struct super_block *freeze_bdev(struct b
> }
> EXPORT_SYMBOL(freeze_bdev);
>
> +void do_thaw(unsigned long unused)
> +{
> + struct super_block *sb;
> + char b[BDEVNAME_SIZE];
> +
> + list_for_each_entry(sb, &super_blocks, s_list) {
> + while (sb->s_bdev && !thaw_bdev(sb->s_bdev, sb))
> + printk(KERN_WARNING "Emergency Thaw on %s\n",
> + bdevname(sb->s_bdev, b));
> + }
> + printk(KERN_WARNING "Emergency Thaw complete\n");
> +}
> +
> +/**
> + * emergency_thaw -- force thaw every filesystem
> + *
> + * Used for emergency unfreeze of all filesystems via SysRq
> + */
> +void emergency_thaw(void)
> +{
> + pdflush_operation(do_thaw, 0);
> +}
> +
> /**
> * thaw_bdev -- unlock filesystem
> * @bdev: blockdevice to unlock
> Index: linux-2.6/include/linux/buffer_head.h
> ===================================================================
> --- linux-2.6.orig/include/linux/buffer_head.h
> +++ linux-2.6/include/linux/buffer_head.h
> @@ -171,6 +171,7 @@ void __wait_on_buffer(struct buffer_head
> wait_queue_head_t *bh_waitq_head(struct buffer_head *bh);
> int fsync_bdev(struct block_device *);
> struct super_block *freeze_bdev(struct block_device *);
> +void emergency_thaw(void);
> int thaw_bdev(struct block_device *, struct super_block *);
> int fsync_super(struct super_block *);
> int fsync_no_super(struct block_device *);
> Index: linux-2.6/Documentation/sysrq.txt
> ===================================================================
> --- linux-2.6.orig/Documentation/sysrq.txt
> +++ linux-2.6/Documentation/sysrq.txt
> @@ -101,7 +101,8 @@ On all - write a character to /proc/sys
>
> 'r' - Turns off keyboard raw mode and sets it to XLATE.
>
> -'s' - Will attempt to sync all mounted filesystems.
> +'s' - Will attempt to sync all mounted filesystems, and unfreeze
> + any frozen fileystems.
>
> 't' - Will dump a list of current tasks and their information to your
> console.
>
>
> --
> 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/
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-16 8:48 ` Pavel Machek
@ 2009-01-16 15:17 ` Valdis.Kletnieks
2009-01-16 15:28 ` Eric Sandeen
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Valdis.Kletnieks @ 2009-01-16 15:17 UTC (permalink / raw)
To: Pavel Machek
Cc: Eric Sandeen, linux-fsdevel, linux-kernel Mailing List,
Andrew Morton, Takashi Sato
[-- Attachment #1: Type: text/plain, Size: 629 bytes --]
On Fri, 16 Jan 2009 09:48:28 +0100, Pavel Machek said:
> Emergency Sync should not do this. Invent another key.
>
> ...because otherwise, if you hit emergency sync but the system is
> still alive and relies on filesystem freezing, bad stuff will happen.
Under what conditions would a system be alive and relying on freezing,
*and* an emergency thaw would be worse than whatever reason you're doing
an emergency sync?
Hmm.. guess you *could* get into trouble if you tried to do a Sysrq-[not-s]
and hit the wrong key - but you have the same danger if you have *any*
sysrq- invoking an emergency_thaw and hit it by accident...
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-16 15:17 ` Valdis.Kletnieks
@ 2009-01-16 15:28 ` Eric Sandeen
2009-01-16 15:33 ` Pavel Machek
2009-01-16 15:40 ` Theodore Tso
2 siblings, 0 replies; 17+ messages in thread
From: Eric Sandeen @ 2009-01-16 15:28 UTC (permalink / raw)
To: Valdis.Kletnieks
Cc: Pavel Machek, linux-fsdevel, linux-kernel Mailing List,
Andrew Morton, Takashi Sato
Valdis.Kletnieks@vt.edu wrote:
> On Fri, 16 Jan 2009 09:48:28 +0100, Pavel Machek said:
>
>> Emergency Sync should not do this. Invent another key.
>>
>> ...because otherwise, if you hit emergency sync but the system is
>> still alive and relies on filesystem freezing, bad stuff will happen.
>
> Under what conditions would a system be alive and relying on freezing,
> *and* an emergency thaw would be worse than whatever reason you're doing
> an emergency sync?
>
> Hmm.. guess you *could* get into trouble if you tried to do a Sysrq-[not-s]
> and hit the wrong key - but you have the same danger if you have *any*
> sysrq- invoking an emergency_thaw and hit it by accident...
I could certainly use up another key ('z' is available for unfreeZe) but
I have the same question; under what conditions do you expect to need an
emergency sync and also need to maintain frozen filesystems as frozen?
>From a maximum flexibility and control perspective, it'd be better to
have them separated I suppose. Is it worth using up another available key?
-Eric
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-16 15:17 ` Valdis.Kletnieks
2009-01-16 15:28 ` Eric Sandeen
@ 2009-01-16 15:33 ` Pavel Machek
2009-01-16 15:40 ` Theodore Tso
2 siblings, 0 replies; 17+ messages in thread
From: Pavel Machek @ 2009-01-16 15:33 UTC (permalink / raw)
To: Valdis.Kletnieks
Cc: Eric Sandeen, linux-fsdevel, linux-kernel Mailing List,
Andrew Morton, Takashi Sato
On Fri 2009-01-16 10:17:09, Valdis.Kletnieks@vt.edu wrote:
> On Fri, 16 Jan 2009 09:48:28 +0100, Pavel Machek said:
>
> > Emergency Sync should not do this. Invent another key.
> >
> > ...because otherwise, if you hit emergency sync but the system is
> > still alive and relies on filesystem freezing, bad stuff will happen.
>
> Under what conditions would a system be alive and relying on freezing,
> *and* an emergency thaw would be worse than whatever reason you're doing
> an emergency sync?
I sometimes hit emergency sync on perfectly healthy system... like
before "insmod shiny-new-guaranteed-to-work-module"... I believe
sysrq-s should not have sideffects.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-16 15:17 ` Valdis.Kletnieks
2009-01-16 15:28 ` Eric Sandeen
2009-01-16 15:33 ` Pavel Machek
@ 2009-01-16 15:40 ` Theodore Tso
2009-01-16 15:52 ` Valdis.Kletnieks
2009-01-16 16:08 ` Eric Sandeen
2 siblings, 2 replies; 17+ messages in thread
From: Theodore Tso @ 2009-01-16 15:40 UTC (permalink / raw)
To: Valdis.Kletnieks
Cc: Pavel Machek, Eric Sandeen, linux-fsdevel,
linux-kernel Mailing List, Andrew Morton, Takashi Sato
On Fri, Jan 16, 2009 at 10:17:09AM -0500, Valdis.Kletnieks@vt.edu wrote:
> On Fri, 16 Jan 2009 09:48:28 +0100, Pavel Machek said:
>
> > Emergency Sync should not do this. Invent another key.
> >
> > ...because otherwise, if you hit emergency sync but the system is
> > still alive and relies on filesystem freezing, bad stuff will happen.
>
> Under what conditions would a system be alive and relying on freezing,
> *and* an emergency thaw would be worse than whatever reason you're doing
> an emergency sync?
>
> Hmm.. guess you *could* get into trouble if you tried to do a Sysrq-[not-s]
> and hit the wrong key - but you have the same danger if you have *any*
> sysrq- invoking an emergency_thaw and hit it by accident...
My biggest complaint is that the two operations are largely
orthogonal. Emergency sync and unfreeze are two very different
operations, and while emergency sync is largely harmless, it just
seems really unclean to combine the two. For one thing, it'll be
extremely non-obvious that emergency sync implies unfreeze, and
changing the sysrq help to say emergency-Sync-and-unfreeze just
screams "kludge"....
- Ted
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-16 15:40 ` Theodore Tso
@ 2009-01-16 15:52 ` Valdis.Kletnieks
2009-01-16 16:08 ` Eric Sandeen
1 sibling, 0 replies; 17+ messages in thread
From: Valdis.Kletnieks @ 2009-01-16 15:52 UTC (permalink / raw)
To: Theodore Tso
Cc: Pavel Machek, Eric Sandeen, linux-fsdevel,
linux-kernel Mailing List, Andrew Morton, Takashi Sato
[-- Attachment #1: Type: text/plain, Size: 745 bytes --]
On Fri, 16 Jan 2009 10:40:26 EST, Theodore Tso said:
> My biggest complaint is that the two operations are largely
> orthogonal. Emergency sync and unfreeze are two very different
> operations, and while emergency sync is largely harmless, it just
> seems really unclean to combine the two. For one thing, it'll be
> extremely non-obvious that emergency sync implies unfreeze, and
> changing the sysrq help to say emergency-Sync-and-unfreeze just
> screams "kludge"....
Fair enough - as it is, I usually end up doing sysrq-s, -s, -u, -s, -b
anyhow because each sysrq- does one little thing, adding another little
thing on some other control-meta-alt-cokebottle key *is* probably the
right choice, we still have a few keyscan codes left.. ;)
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] Allow SysRq emergency sync to thaw frozen filesystems
2009-01-16 15:40 ` Theodore Tso
2009-01-16 15:52 ` Valdis.Kletnieks
@ 2009-01-16 16:08 ` Eric Sandeen
1 sibling, 0 replies; 17+ messages in thread
From: Eric Sandeen @ 2009-01-16 16:08 UTC (permalink / raw)
To: Theodore Tso, Valdis.Kletnieks, Pavel Machek, Eric Sandeen,
linux-fsdevel, linux-kernel Mailing List, Andrew Morton,
Takashi Sato
Theodore Tso wrote:
> On Fri, Jan 16, 2009 at 10:17:09AM -0500, Valdis.Kletnieks@vt.edu wrote:
>> On Fri, 16 Jan 2009 09:48:28 +0100, Pavel Machek said:
>>
>>> Emergency Sync should not do this. Invent another key.
>>>
>>> ...because otherwise, if you hit emergency sync but the system is
>>> still alive and relies on filesystem freezing, bad stuff will happen.
>> Under what conditions would a system be alive and relying on freezing,
>> *and* an emergency thaw would be worse than whatever reason you're doing
>> an emergency sync?
>>
>> Hmm.. guess you *could* get into trouble if you tried to do a Sysrq-[not-s]
>> and hit the wrong key - but you have the same danger if you have *any*
>> sysrq- invoking an emergency_thaw and hit it by accident...
>
> My biggest complaint is that the two operations are largely
> orthogonal. Emergency sync and unfreeze are two very different
> operations, and while emergency sync is largely harmless, it just
> seems really unclean to combine the two. For one thing, it'll be
> extremely non-obvious that emergency sync implies unfreeze, and
> changing the sysrq help to say emergency-Sync-and-unfreeze just
> screams "kludge"....
>
> - Ted
Yeah, they really are orthogonal, it's true. Ok, if people are willing
to give up 'z' I'll move it there.
-Eric
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2009-01-17 15:44 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <bUrIs-Za-3@gated-at.bofh.it>
[not found] ` <bUKL7-6vo-3@gated-at.bofh.it>
[not found] ` <bUNSJ-2Vn-13@gated-at.bofh.it>
[not found] ` <bUO2t-376-5@gated-at.bofh.it>
[not found] ` <bUYXL-3Qb-25@gated-at.bofh.it>
[not found] ` <bUZ7p-448-9@gated-at.bofh.it>
2009-01-17 14:03 ` [PATCH] Allow SysRq emergency sync to thaw frozen filesystems Bodo Eggert
2009-01-17 15:44 ` Eric Sandeen
2009-01-15 4:06 Eric Sandeen
2009-01-16 0:20 ` Andrew Morton
2009-01-16 3:49 ` Eric Sandeen
2009-01-16 3:59 ` Eric Sandeen
2009-01-16 15:33 ` Valdis.Kletnieks
2009-01-16 15:40 ` Eric Sandeen
2009-01-16 16:21 ` Dave Kleikamp
2009-01-16 16:42 ` Dave Kleikamp
2009-01-16 8:48 ` Pavel Machek
2009-01-16 15:17 ` Valdis.Kletnieks
2009-01-16 15:28 ` Eric Sandeen
2009-01-16 15:33 ` Pavel Machek
2009-01-16 15:40 ` Theodore Tso
2009-01-16 15:52 ` Valdis.Kletnieks
2009-01-16 16:08 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox