From: Marco Stornelli <marco.stornelli@gmail.com>
To: Linux FS Devel <linux-fsdevel@vger.kernel.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>, Jan Kara <jack@suse.cz>
Subject: [RFC] fsfreeze: moving from uniterruptible to killable
Date: Sun, 24 Mar 2013 10:10:59 +0100 [thread overview]
Message-ID: <514EC323.7050002@gmail.com> (raw)
When a fs is frozen, a process can hang because we wait in
uniterruptible state. We give the user the possibility to kill the process.
Not-signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
---
--- fs/super.c.orig 2013-03-24 09:56:33.000000000 +0100
+++ fs/super.c 2013-03-24 09:58:41.000000000 +0100
@@ -1198,7 +1198,7 @@ retry:
if (unlikely(sb->s_writers.frozen >= level)) {
if (!wait)
return 0;
- wait_event(sb->s_writers.wait_unfrozen,
+ wait_event_killable(sb->s_writers.wait_unfrozen,
sb->s_writers.frozen < level);
}
@@ -1248,7 +1248,7 @@ static void sb_wait_write(struct super_b
* of frozen and checking of the counter
*/
prepare_to_wait(&sb->s_writers.wait, &wait,
- TASK_UNINTERRUPTIBLE);
+ TASK_KILLABLE);
writers = percpu_counter_sum(&sb->s_writers.counter[level-1]);
if (writers)
next reply other threads:[~2013-03-24 9:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-24 9:10 Marco Stornelli [this message]
2013-03-26 21:15 ` [RFC] fsfreeze: moving from uniterruptible to killable Jan Kara
2013-03-27 11:39 ` Marco Stornelli
2013-03-27 14:34 ` Jan Kara
2013-03-27 15:41 ` Marco Stornelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=514EC323.7050002@gmail.com \
--to=marco.stornelli@gmail.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).