patch-2.4.17 linux/fs/jbd/recovery.c

Next file: linux/fs/jbd/revoke.c
Previous file: linux/fs/jbd/journal.c
Back to the patch index
Back to the overall index

diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.16/fs/jbd/recovery.c linux/fs/jbd/recovery.c
@@ -70,7 +70,8 @@
 static int do_readahead(journal_t *journal, unsigned int start)
 {
 	int err;
-	unsigned int max, nbufs, next, blocknr;
+	unsigned int max, nbufs, next;
+	unsigned long blocknr;
 	struct buffer_head *bh;
 	
 	struct buffer_head * bufs[MAXBUF];
@@ -86,12 +87,11 @@
 	nbufs = 0;
 	
 	for (next = start; next < max; next++) {
-		blocknr = journal_bmap(journal, next);
+		err = journal_bmap(journal, next, &blocknr);
 
-		if (!blocknr) {
+		if (err) {
 			printk (KERN_ERR "JBD: bad block at offset %u\n",
 				next);
-			err = -EIO;
 			goto failed;
 		}
 
@@ -132,19 +132,20 @@
 static int jread(struct buffer_head **bhp, journal_t *journal, 
 		 unsigned int offset)
 {
-	unsigned int blocknr;
+	int err;
+	unsigned long blocknr;
 	struct buffer_head *bh;
 
 	*bhp = NULL;
 
 	J_ASSERT (offset < journal->j_maxlen);
 	
-	blocknr = journal_bmap(journal, offset);
+	err = journal_bmap(journal, offset, &blocknr);
 
-	if (!blocknr) {
+	if (err) {
 		printk (KERN_ERR "JBD: bad block at offset %u\n",
 			offset);
-		return -EIO;
+		return err;
 	}
 
 	bh = getblk(journal->j_dev, blocknr, journal->j_blocksize);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)