+ filesystem-freeze-allow-sysrq-emergency-thaw-to-thaw-frozen-filesystems-99.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Allow SysRq emergency thaw to thaw frozen filesystems (v99)
has been added to the -mm tree.  Its filename is
     filesystem-freeze-allow-sysrq-emergency-thaw-to-thaw-frozen-filesystems-99.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: Allow SysRq emergency thaw to thaw frozen filesystems (v99)
From: Eric Sandeen <sandeen@xxxxxxxxxx>

(this version fixes a couple small issues raised by Randy Dunlap)
(and adds sb_lock locking I forgot, as akpm pointed out)
(and includes Randy's CONFIG_BLOCK fix)
(and does proper locking, finally)

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
Cc: Takashi Sato <t-sato@xxxxxxxxxxxxx>
Cc: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 Documentation/sysrq.txt |    2 +-
 fs/buffer.c             |   10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff -puN Documentation/sysrq.txt~filesystem-freeze-allow-sysrq-emergency-thaw-to-thaw-frozen-filesystems-99 Documentation/sysrq.txt
--- a/Documentation/sysrq.txt~filesystem-freeze-allow-sysrq-emergency-thaw-to-thaw-frozen-filesystems-99
+++ a/Documentation/sysrq.txt
@@ -81,7 +81,7 @@ On all -  write a character to /proc/sys
 
 'i'     - Send a SIGKILL to all processes, except for init.
 
-'j'	- Forcibly "Just thaw it" - filesystems frozen by the FIFREEZE ioctl.
+'j'     - Forcibly "Just thaw it" - filesystems frozen by the FIFREEZE ioctl.
 
 'k'     - Secure Access Key (SAK) Kills all programs on the current virtual
           console. NOTE: See important comments below in SAK section.
diff -puN fs/buffer.c~filesystem-freeze-allow-sysrq-emergency-thaw-to-thaw-frozen-filesystems-99 fs/buffer.c
--- a/fs/buffer.c~filesystem-freeze-allow-sysrq-emergency-thaw-to-thaw-frozen-filesystems-99
+++ a/fs/buffer.c
@@ -263,11 +263,21 @@ void do_thaw_all(unsigned long unused)
 	struct super_block *sb;
 	char b[BDEVNAME_SIZE];
 
+	spin_lock(&sb_lock);
+restart:
 	list_for_each_entry(sb, &super_blocks, s_list) {
+		sb->s_count++;
+		spin_unlock(&sb_lock);
+		down_read(&sb->s_umount);
 		while (sb->s_bdev && !thaw_bdev(sb->s_bdev, sb))
 			printk(KERN_WARNING "Emergency Thaw on %s\n",
 			       bdevname(sb->s_bdev, b));
+		up_read(&sb->s_umount);
+		spin_lock(&sb_lock);
+		if (__put_super_and_need_restart(sb))
+			goto restart;
 	}
+	spin_unlock(&sb_lock);
 	printk(KERN_WARNING "Emergency Thaw complete\n");
 }
 
_

Patches currently in -mm which might be from sandeen@xxxxxxxxxx are

origin.patch
linux-next.patch
filesystem-freeze-allow-sysrq-emergency-thaw-to-thaw-frozen-filesystems.patch
filesystem-freeze-allow-sysrq-emergency-thaw-to-thaw-frozen-filesystems-99.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux