mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org
Subject: [PATCH] Change ll_rw_block() calls in JBD
Date: Mon, 11 Jul 2005 17:52:43 +0200	[thread overview]
Message-ID: <20050711155243.GS12428@atrey.karlin.mff.cuni.cz> (raw)

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

  Hi,

  attached patch changes calls of ll_rw_block() in JBD to make sure the
data really reach the disk.

								Honza

-- 
Jan Kara <jack@suse.cz>
SuSE CR Labs

[-- Attachment #2: jbd-2.6.12-2-ll_rw_block-fix.diff --]
[-- Type: text/plain, Size: 2651 bytes --]

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>

diff -rupX /home/jack/.kerndiffexclude linux-2.6.12-1-forgetfix/fs/jbd/checkpoint.c linux-2.6.12-2-ll_rw_block-fix/fs/jbd/checkpoint.c
--- linux-2.6.12-1-forgetfix/fs/jbd/checkpoint.c	2005-06-28 13:26:18.000000000 +0200
+++ linux-2.6.12-2-ll_rw_block-fix/fs/jbd/checkpoint.c	2005-07-07 07:18:47.000000000 +0200
@@ -204,7 +204,7 @@ __flush_batch(journal_t *journal, struct
 	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];
diff -rupX /home/jack/.kerndiffexclude linux-2.6.12-1-forgetfix/fs/jbd/commit.c linux-2.6.12-2-ll_rw_block-fix/fs/jbd/commit.c
--- linux-2.6.12-1-forgetfix/fs/jbd/commit.c	2005-07-06 01:22:13.000000000 +0200
+++ linux-2.6.12-2-ll_rw_block-fix/fs/jbd/commit.c	2005-07-07 07:18:20.000000000 +0200
@@ -358,7 +358,7 @@ write_out_data:
 					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;
@@ -381,7 +381,7 @@ write_out_data:
 
 	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);
 	}
diff -rupX /home/jack/.kerndiffexclude linux-2.6.12-1-forgetfix/fs/jbd/journal.c linux-2.6.12-2-ll_rw_block-fix/fs/jbd/journal.c
--- linux-2.6.12-1-forgetfix/fs/jbd/journal.c	2005-06-28 13:26:18.000000000 +0200
+++ linux-2.6.12-2-ll_rw_block-fix/fs/jbd/journal.c	2005-07-07 07:17:11.000000000 +0200
@@ -969,7 +969,7 @@ void journal_update_superblock(journal_t
 	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
diff -rupX /home/jack/.kerndiffexclude linux-2.6.12-1-forgetfix/fs/jbd/revoke.c linux-2.6.12-2-ll_rw_block-fix/fs/jbd/revoke.c
--- linux-2.6.12-1-forgetfix/fs/jbd/revoke.c	2005-03-03 18:58:29.000000000 +0100
+++ linux-2.6.12-2-ll_rw_block-fix/fs/jbd/revoke.c	2005-07-07 07:12:34.000000000 +0200
@@ -613,7 +613,7 @@ static void flush_descriptor(journal_t *
 	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
 

             reply	other threads:[~2005-07-11 15:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-11 15:52 Jan Kara [this message]
2006-05-18  8:25 Zoltan Menyhart
2006-05-18 13:45 ` Jan Kara
2006-05-18 15:11   ` Zoltan Menyhart
2006-05-18 22:25     ` Stephen C. Tweedie
2006-05-19 10:01       ` Zoltan Menyhart
2006-05-19 12:26         ` Stephen C. Tweedie
2006-05-19  1:30     ` Jan Kara
2006-05-19 12:33       ` Zoltan Menyhart
2006-05-19 15:05         ` Stephen C. Tweedie
2006-05-19 15:06   ` Stephen C. Tweedie
2006-05-24 17:33     ` Jan Kara
2006-05-30 15:36       ` Zoltan Menyhart
2006-05-30 16:40         ` Jan Kara
2006-05-23 16:01   ` Zoltan Menyhart
2006-05-24  9:14   ` Zoltan Menyhart
2006-05-24 17:18     ` Jan Kara
     [not found]   ` <447F13B3.6050505@bull.net>
     [not found]     ` <20060601162751.GH26933@atrey.karlin.mff.cuni.cz>
     [not found]       ` <44801E16.3040300@bull.net>
     [not found]         ` <20060602134923.GA1644@atrey.karlin.mff.cuni.cz>
2006-06-20 16:33           ` Zoltan Menyhart
2006-06-21  0:09             ` Jan Kara

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=20050711155243.GS12428@atrey.karlin.mff.cuni.cz \
    --to=jack@suse.cz \
    --cc=akpm@osdl.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

all inboxes | Powered by JetHome®