* [patch 4/4] reiser4: capture superblock when syncing fs
@ 2012-10-21 17:59 Edward Shishkin
0 siblings, 0 replies; only message in thread
From: Edward Shishkin @ 2012-10-21 17:59 UTC (permalink / raw)
To: reiserfs-devel
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: reiser4-capture-superblock-when-syncing-fs.patch --]
[-- Type: text/x-patch, Size: 2394 bytes --]
. Capture super block when syncing fs to synchronize
the superblock with the other stuff;
. Make gcc happy.
Signed-off-by: Edward Shishkin <edward.shishkin@gmail.com>
---
fs/reiser4/carry_ops.c | 4 ++--
fs/reiser4/super_ops.c | 13 ++++++++++++-
fs/reiser4/tree.h | 2 +-
3 files changed, 15 insertions(+), 4 deletions(-)
--- linux-3.6.2_.orig/fs/reiser4/super_ops.c
+++ linux-3.6.2_/fs/reiser4/super_ops.c
@@ -397,6 +397,7 @@ static long reiser4_writeback_inodes(str
/* ->sync_fs() of super operations */
static int reiser4_sync_fs(struct super_block *super, int wait)
{
+ int ret;
reiser4_context *ctx;
struct bdi_writeback *wb;
struct wb_writeback_work work = {
@@ -417,13 +418,23 @@ static int reiser4_sync_fs(struct super_
warning("edward-1567", "failed to init context");
return PTR_ERR(ctx);
}
+ /*
+ * Capture znode associated with super block
+ */
+ ret = reiser4_capture_super_block(super);
+ if (ret != 0)
+ warning("vs-1701",
+ "reiser4_capture_super_block failed in write_super: %d",
+ ret);
+
wb = &reiser4_get_super_fake(super)->i_mapping->backing_dev_info->wb;
spin_lock(&wb->list_lock);
generic_writeback_sb_inodes(super, wb, &wbc, &work, true);
spin_unlock(&wb->list_lock);
wbc.nr_to_write = LONG_MAX;
/*
- * flush goes here
+ * (flush goes here)
+ * commit all transactions
*/
reiser4_writeout(super, &wbc);
--- linux-3.6.2_.orig/fs/reiser4/carry_ops.c
+++ linux-3.6.2_/fs/reiser4/carry_ops.c
@@ -1339,7 +1339,7 @@ static int carry_delete(carry_op * op /*
node_num_items(parent) == 1)
result = reiser4_kill_tree_root(coord.node);
- return result < 0 ? : 0;
+ return result < 0 ? result : 0;
}
/* implements COP_CUT opration
@@ -1369,7 +1369,7 @@ static int carry_cut(carry_op * op /* op
result = nplug->cut_and_kill(op->u.cut_or_kill.u.kill, &info);
doing->restartable = 0;
- return result < 0 ? : 0;
+ return result < 0 ? result : 0;
}
/* helper function for carry_paste(): returns true if @op can be continued as
--- linux-3.6.2_.orig/fs/reiser4/tree.h
+++ linux-3.6.2_/fs/reiser4/tree.h
@@ -405,7 +405,7 @@ typedef struct cbk_handle {
/* put here error message to be printed by caller */
const char *error;
/* result passed back to caller */
- lookup_result result;
+ int result;
/* lock handles for active and parent */
lock_handle *parent_lh;
lock_handle *active_lh;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-21 17:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-21 17:59 [patch 4/4] reiser4: capture superblock when syncing fs 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).