Skip to content

Commit

Permalink
[PATCH] Change ll_rw_block() calls in JBD
Browse files Browse the repository at this point in the history
We must be sure that the current data in buffer are sent to disk.  Hence we
have to call ll_rw_block() with SWRITE.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Sep 7, 2005
1 parent a766223 commit 2670769
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fs/jbd/checkpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ __flush_batch(journal_t *journal, struct buffer_head **bhs, int *batch_count)
int i;

spin_unlock(&journal->j_list_lock);
ll_rw_block(WRITE, *batch_count, bhs);
ll_rw_block(SWRITE, *batch_count, bhs);
spin_lock(&journal->j_list_lock);
for (i = 0; i < *batch_count; i++) {
struct buffer_head *bh = bhs[i];
Expand Down
4 changes: 2 additions & 2 deletions fs/jbd/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ void journal_commit_transaction(journal_t *journal)
jbd_debug(2, "submit %d writes\n",
bufs);
spin_unlock(&journal->j_list_lock);
ll_rw_block(WRITE, bufs, wbuf);
ll_rw_block(SWRITE, bufs, wbuf);
journal_brelse_array(wbuf, bufs);
bufs = 0;
goto write_out_data;
Expand All @@ -381,7 +381,7 @@ void journal_commit_transaction(journal_t *journal)

if (bufs) {
spin_unlock(&journal->j_list_lock);
ll_rw_block(WRITE, bufs, wbuf);
ll_rw_block(SWRITE, bufs, wbuf);
journal_brelse_array(wbuf, bufs);
spin_lock(&journal->j_list_lock);
}
Expand Down
2 changes: 1 addition & 1 deletion fs/jbd/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ void journal_update_superblock(journal_t *journal, int wait)
if (wait)
sync_dirty_buffer(bh);
else
ll_rw_block(WRITE, 1, &bh);
ll_rw_block(SWRITE, 1, &bh);

out:
/* If we have just flushed the log (by marking s_start==0), then
Expand Down
2 changes: 1 addition & 1 deletion fs/jbd/revoke.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ static void flush_descriptor(journal_t *journal,
set_buffer_jwrite(bh);
BUFFER_TRACE(bh, "write");
set_buffer_dirty(bh);
ll_rw_block(WRITE, 1, &bh);
ll_rw_block(SWRITE, 1, &bh);
}
#endif

Expand Down

0 comments on commit 2670769

Please sign in to comment.