reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/1] reiser4: implement ->remount_fs() super operation
@ 2014-08-24 12:04 Edward Shishkin
  0 siblings, 0 replies; only message in thread
From: Edward Shishkin @ 2014-08-24 12:04 UTC (permalink / raw)
  To: ReiserFS development mailing list

[-- 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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-24 12:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-24 12:04 [patch 1/1] reiser4: implement ->remount_fs() super operation Edward Shishkin

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).