mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@osdl.org>
To: Chris Mason <mason@suse.com>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH] reiserfs v3 fixes and features
Date: Tue, 6 Apr 2004 19:00:34 -0700	[thread overview]
Message-ID: <20040406190034.E22989@build.pdx.osdl.net> (raw)
In-Reply-To: <1081274618.30828.30.camel@watt.suse.com>; from mason@suse.com on Tue, Apr 06, 2004 at 02:03:39PM -0400

Hi Chris,

* Chris Mason (mason@suse.com) wrote:
> Most of these are from Jeff Mahoney and I, they include:
> 
> bug fixes
> logging optimizations
> data=ordered support
> xattrs
> acls
> quotas
> error messages with device names (based on Oleg's 2.4 patch)
> block allocator improvements

Would you consider adding the bd_claim on external journal bdev I posted
a while back?  Hans didn't seem to flat out reject, and you agreed one
journal per bdev was sufficient.

Patch below, updated to 2.6.5-linus, and applies with fuzz atop your
series.linus.  I also have the reiserfsprogs update if you're interested.

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net


===== fs/reiserfs/journal.c 1.78 vs edited =====
--- 1.78/fs/reiserfs/journal.c	Wed Feb 18 19:42:22 2004
+++ edited/fs/reiserfs/journal.c	Tue Apr  6 16:57:04 2004
@@ -1891,10 +1891,13 @@
     result = 0;
 
     if( journal -> j_dev_file != NULL ) {
+	if (journal -> j_dev_bd && (super -> s_bdev != journal -> j_dev_bd))
+		bd_release( journal -> j_dev_bd );
 	result = filp_close( journal -> j_dev_file, NULL );
 	journal -> j_dev_file = NULL;
 	journal -> j_dev_bd = NULL;
     } else if( journal -> j_dev_bd != NULL ) {
+	bd_release( journal -> j_dev_bd );
 	result = blkdev_put( journal -> j_dev_bd );
 	journal -> j_dev_bd = NULL;
     }
@@ -1933,8 +1936,17 @@
 			printk( "sh-458: journal_init_dev: cannot init journal device\n '%s': %i", 
 				__bdevname(jdev, b), result );
 			return result;
-		} else if (jdev != super->s_dev)
+		} else if (jdev != super->s_dev) {
+			result = bd_claim(journal->j_dev_bd, journal);
+			if (result) {
+				printk("%s: unable to claim %s\n", __func__,
+					bdevname(journal->j_dev_bd, b));
+				blkdev_put(journal->j_dev_bd);
+				journal->j_dev_bd = NULL;
+				return result;
+			}
 			set_blocksize(journal->j_dev_bd, super->s_blocksize);
+		}
 		return 0;
 	}
 
@@ -1947,6 +1959,17 @@
 		} else  {
 			/* ok */
 			journal->j_dev_bd = I_BDEV(jdev_inode);
+			if (super->s_bdev != journal->j_dev_bd) {
+				result = bd_claim(journal->j_dev_bd, journal);
+				if (result) {
+					printk("%s: unable to claim %s\n", __func__,
+						bdevname(journal->j_dev_bd, b));
+					filp_close(journal->j_dev_file, NULL);
+					journal->j_dev_file = NULL;
+					journal->j_dev_bd = NULL;
+					return result;
+				}
+			}
 			set_blocksize(journal->j_dev_bd, super->s_blocksize);
 		}
 	} else {

  parent reply	other threads:[~2004-04-07  2:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-06 18:03 Chris Mason
2004-04-06 20:14 ` Marc-Christian Petersen
2004-04-06 21:06   ` Chris Mason
2004-04-07  2:00 ` Chris Wright [this message]
2004-04-07 13:19   ` Chris Mason
2004-04-07 14:37     ` Hans Reiser
2004-04-07 13:06 ` Yury Umanets
2004-04-07 13:25   ` Chris Mason
2004-04-08  7:22     ` Yury Umanets
2004-04-09 22:02       ` Oleg Drokin
2004-04-15  0:30 ` Chris Mason
2004-04-15  2:53   ` Hubert Chan
2004-04-15 11:37     ` Chris Mason
2004-04-15 12:12     ` Nikita Danilov
2004-04-16 18:54   ` Chris Mason
2004-04-16 19:47     ` Marc-Christian Petersen
2004-04-16 19:59       ` Chris Mason
2004-04-16 20:06       ` Marc-Christian Petersen
2004-04-16 20:26         ` Chris Mason
2004-04-16 20:39           ` Chris Mason
2004-04-16 20:44             ` Marc-Christian Petersen
2004-04-16 20:41           ` Marc-Christian Petersen

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=20040406190034.E22989@build.pdx.osdl.net \
    --to=chrisw@osdl.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mason@suse.com \
    /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®