reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: ReiserFS development mailing list <reiserfs-devel@vger.kernel.org>
Subject: [patch 1/1] reiser4: implement ->remount_fs() super operation
Date: Sun, 24 Aug 2014 14:04:13 +0200	[thread overview]
Message-ID: <53F9D4BD.9000600@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 114 bytes --]

Hello everyone,

This patch prevents panic during reboot/shutdown caused by VFS changes 
in 3.15

Thanks,
Edward.

[-- Attachment #2: reiser4-add-remount_fs-super_op.patch --]
[-- Type: text/x-patch, Size: 1416 bytes --]

Add ->remount_fs() super option, which performs sync_filesystem()
needed when when transitioning from read-write to read-only, see
http://marc.info/?l=samba-technical&m=139550798721412&w=2 for details.

Panic when flushing read-only file system.

Signed-off-by: Edward Shishkin <edward.shishkin@gmail.com>
---
 fs/reiser4/flush.c     |    2 ++
 fs/reiser4/super_ops.c |    7 +++++++
 2 files changed, 9 insertions(+)

--- a/fs/reiser4/super_ops.c
+++ b/fs/reiser4/super_ops.c
@@ -445,6 +445,12 @@ static int reiser4_sync_fs(struct super_
 	return 0;
 }
 
+static int reiser4_remount(struct super_block *s, int *mount_flags, char *arg)
+{
+	sync_filesystem(s);
+	return 0;
+}
+
 /**
  * reiser4_show_options - show_options of super operations
  * @m: file where to write information
@@ -479,6 +485,7 @@ struct super_operations reiser4_super_op
 	.put_super = reiser4_put_super,
 	.sync_fs = reiser4_sync_fs,
 	.statfs = reiser4_statfs,
+	.remount_fs = reiser4_remount,
 	.writeback_inodes = reiser4_writeback_inodes,
 	.show_options = reiser4_show_options
 };
--- a/fs/reiser4/flush.c
+++ b/fs/reiser4/flush.c
@@ -1037,6 +1037,8 @@ flush_current_atom(int flags, long nr_to
 	assert_spin_locked(&((*atom)->alock));
 	assert("zam-892", get_current_context()->trans->atom == *atom);
 
+	BUG_ON(rofs_super(get_current_context()->super));
+
 	nr_to_write = LONG_MAX;
 	while (1) {
 		ret = reiser4_fq_by_atom(*atom, &fq);

                 reply	other threads:[~2014-08-24 12:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=53F9D4BD.9000600@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=reiserfs-devel@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).