linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] reiserfs: use open_bdev_excl
@ 2007-12-26 15:31 Christoph Hellwig
  2008-02-07  4:45 ` Christoph Hellwig
  2008-04-29 18:13 ` Christoph Hellwig
  0 siblings, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2007-12-26 15:31 UTC (permalink / raw)
  To: chris.mason, akpm; +Cc: linux-fsdevel, reiserfs-devel

Use the proper helper to open a blockdevice by name for filesystem
use, this makes sure it's properly claimed (also added for open-by-number)
and gets rid of the struct file abuse.

Tested by mounting a reiserfs filesystem with external journal.


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6-xfs/fs/reiserfs/journal.c
===================================================================
--- linux-2.6-xfs.orig/fs/reiserfs/journal.c	2007-12-13 18:55:40.000000000 +0100
+++ linux-2.6-xfs/fs/reiserfs/journal.c	2007-12-26 15:13:22.000000000 +0100
@@ -2574,11 +2574,9 @@ static int release_journal_dev(struct su
 
 	result = 0;
 
-	if (journal->j_dev_file != NULL) {
-		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) {
+	if (journal->j_dev_bd != NULL) {
+		if (journal->j_dev_bd->bd_dev != super->s_dev)
+			bd_release(journal->j_dev_bd);
 		result = blkdev_put(journal->j_dev_bd);
 		journal->j_dev_bd = NULL;
 	}
@@ -2603,7 +2601,6 @@ static int journal_init_dev(struct super
 	result = 0;
 
 	journal->j_dev_bd = NULL;
-	journal->j_dev_file = NULL;
 	jdev = SB_ONDISK_JOURNAL_DEVICE(super) ?
 	    new_decode_dev(SB_ONDISK_JOURNAL_DEVICE(super)) : super->s_dev;
 
@@ -2620,35 +2617,34 @@ static int journal_init_dev(struct super
 					 "cannot init journal device '%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) {
+				blkdev_put(journal->j_dev_bd);
+				return result;
+			}
+
 			set_blocksize(journal->j_dev_bd, super->s_blocksize);
+		}
+
 		return 0;
 	}
 
-	journal->j_dev_file = filp_open(jdev_name, 0, 0);
-	if (!IS_ERR(journal->j_dev_file)) {
-		struct inode *jdev_inode = journal->j_dev_file->f_mapping->host;
-		if (!S_ISBLK(jdev_inode->i_mode)) {
-			reiserfs_warning(super, "journal_init_dev: '%s' is "
-					 "not a block device", jdev_name);
-			result = -ENOTBLK;
-			release_journal_dev(super, journal);
-		} else {
-			/* ok */
-			journal->j_dev_bd = I_BDEV(jdev_inode);
-			set_blocksize(journal->j_dev_bd, super->s_blocksize);
-			reiserfs_info(super,
-				      "journal_init_dev: journal device: %s\n",
-				      bdevname(journal->j_dev_bd, b));
-		}
-	} else {
-		result = PTR_ERR(journal->j_dev_file);
-		journal->j_dev_file = NULL;
+	journal->j_dev_bd = open_bdev_excl(jdev_name, 0, journal);
+	if (IS_ERR(journal->j_dev_bd)) {
+		result = PTR_ERR(journal->j_dev_bd);
+		journal->j_dev_bd = NULL;
 		reiserfs_warning(super,
 				 "journal_init_dev: Cannot open '%s': %i",
 				 jdev_name, result);
+		return result;
 	}
-	return result;
+
+	set_blocksize(journal->j_dev_bd, super->s_blocksize);
+	reiserfs_info(super,
+		      "journal_init_dev: journal device: %s\n",
+		      bdevname(journal->j_dev_bd, b));
+	return 0;
 }
 
 /**
Index: linux-2.6-xfs/include/linux/reiserfs_fs_sb.h
===================================================================
--- linux-2.6-xfs.orig/include/linux/reiserfs_fs_sb.h	2007-12-13 19:06:58.000000000 +0100
+++ linux-2.6-xfs/include/linux/reiserfs_fs_sb.h	2007-12-26 15:13:22.000000000 +0100
@@ -177,7 +177,6 @@ struct reiserfs_journal {
 	struct reiserfs_journal_cnode *j_last;	/* newest journal block */
 	struct reiserfs_journal_cnode *j_first;	/*  oldest journal block.  start here for traverse */
 
-	struct file *j_dev_file;
 	struct block_device *j_dev_bd;
 	int j_1st_reserved_block;	/* first block on s_dev of reserved area journal */
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] reiserfs: use open_bdev_excl
  2007-12-26 15:31 [PATCH] reiserfs: use open_bdev_excl Christoph Hellwig
@ 2008-02-07  4:45 ` Christoph Hellwig
  2008-02-07  5:16   ` Andrew Morton
  2008-04-29 18:13 ` Christoph Hellwig
  1 sibling, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2008-02-07  4:45 UTC (permalink / raw)
  To: chris.mason, akpm; +Cc: linux-fsdevel, reiserfs-devel

On Wed, Dec 26, 2007 at 04:31:01PM +0100, Christoph Hellwig wrote:
> Use the proper helper to open a blockdevice by name for filesystem
> use, this makes sure it's properly claimed (also added for open-by-number)
> and gets rid of the struct file abuse.
> 
> Tested by mounting a reiserfs filesystem with external journal.

Folks, what do we do with this patch?  It's been out for more than a
month but didn't actually get picked up in any tree.  I'd really like
to see this going in soon.

> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> Index: linux-2.6-xfs/fs/reiserfs/journal.c
> ===================================================================
> --- linux-2.6-xfs.orig/fs/reiserfs/journal.c	2007-12-13 18:55:40.000000000 +0100
> +++ linux-2.6-xfs/fs/reiserfs/journal.c	2007-12-26 15:13:22.000000000 +0100
> @@ -2574,11 +2574,9 @@ static int release_journal_dev(struct su
>  
>  	result = 0;
>  
> -	if (journal->j_dev_file != NULL) {
> -		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) {
> +	if (journal->j_dev_bd != NULL) {
> +		if (journal->j_dev_bd->bd_dev != super->s_dev)
> +			bd_release(journal->j_dev_bd);
>  		result = blkdev_put(journal->j_dev_bd);
>  		journal->j_dev_bd = NULL;
>  	}
> @@ -2603,7 +2601,6 @@ static int journal_init_dev(struct super
>  	result = 0;
>  
>  	journal->j_dev_bd = NULL;
> -	journal->j_dev_file = NULL;
>  	jdev = SB_ONDISK_JOURNAL_DEVICE(super) ?
>  	    new_decode_dev(SB_ONDISK_JOURNAL_DEVICE(super)) : super->s_dev;
>  
> @@ -2620,35 +2617,34 @@ static int journal_init_dev(struct super
>  					 "cannot init journal device '%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) {
> +				blkdev_put(journal->j_dev_bd);
> +				return result;
> +			}
> +
>  			set_blocksize(journal->j_dev_bd, super->s_blocksize);
> +		}
> +
>  		return 0;
>  	}
>  
> -	journal->j_dev_file = filp_open(jdev_name, 0, 0);
> -	if (!IS_ERR(journal->j_dev_file)) {
> -		struct inode *jdev_inode = journal->j_dev_file->f_mapping->host;
> -		if (!S_ISBLK(jdev_inode->i_mode)) {
> -			reiserfs_warning(super, "journal_init_dev: '%s' is "
> -					 "not a block device", jdev_name);
> -			result = -ENOTBLK;
> -			release_journal_dev(super, journal);
> -		} else {
> -			/* ok */
> -			journal->j_dev_bd = I_BDEV(jdev_inode);
> -			set_blocksize(journal->j_dev_bd, super->s_blocksize);
> -			reiserfs_info(super,
> -				      "journal_init_dev: journal device: %s\n",
> -				      bdevname(journal->j_dev_bd, b));
> -		}
> -	} else {
> -		result = PTR_ERR(journal->j_dev_file);
> -		journal->j_dev_file = NULL;
> +	journal->j_dev_bd = open_bdev_excl(jdev_name, 0, journal);
> +	if (IS_ERR(journal->j_dev_bd)) {
> +		result = PTR_ERR(journal->j_dev_bd);
> +		journal->j_dev_bd = NULL;
>  		reiserfs_warning(super,
>  				 "journal_init_dev: Cannot open '%s': %i",
>  				 jdev_name, result);
> +		return result;
>  	}
> -	return result;
> +
> +	set_blocksize(journal->j_dev_bd, super->s_blocksize);
> +	reiserfs_info(super,
> +		      "journal_init_dev: journal device: %s\n",
> +		      bdevname(journal->j_dev_bd, b));
> +	return 0;
>  }
>  
>  /**
> Index: linux-2.6-xfs/include/linux/reiserfs_fs_sb.h
> ===================================================================
> --- linux-2.6-xfs.orig/include/linux/reiserfs_fs_sb.h	2007-12-13 19:06:58.000000000 +0100
> +++ linux-2.6-xfs/include/linux/reiserfs_fs_sb.h	2007-12-26 15:13:22.000000000 +0100
> @@ -177,7 +177,6 @@ struct reiserfs_journal {
>  	struct reiserfs_journal_cnode *j_last;	/* newest journal block */
>  	struct reiserfs_journal_cnode *j_first;	/*  oldest journal block.  start here for traverse */
>  
> -	struct file *j_dev_file;
>  	struct block_device *j_dev_bd;
>  	int j_1st_reserved_block;	/* first block on s_dev of reserved area journal */
>  
---end quoted text---

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] reiserfs: use open_bdev_excl
  2008-02-07  4:45 ` Christoph Hellwig
@ 2008-02-07  5:16   ` Andrew Morton
  2008-02-07  5:19     ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2008-02-07  5:16 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: chris.mason, linux-fsdevel, reiserfs-devel

On Thu, 7 Feb 2008 05:45:13 +0100 Christoph Hellwig <hch@lst.de> wrote:

> On Wed, Dec 26, 2007 at 04:31:01PM +0100, Christoph Hellwig wrote:
> > Use the proper helper to open a blockdevice by name for filesystem
> > use, this makes sure it's properly claimed (also added for open-by-number)
> > and gets rid of the struct file abuse.
> > 
> > Tested by mounting a reiserfs filesystem with external journal.
> 
> Folks, what do we do with this patch?  It's been out for more than a
> month but didn't actually get picked up in any tree.

It's still sitting in the great pile of things I got sent over Christmas
and haven't looked at yet.  It didn't look like a bugfix.

>  I'd really like
> to see this going in soon.

How come?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] reiserfs: use open_bdev_excl
  2008-02-07  5:16   ` Andrew Morton
@ 2008-02-07  5:19     ` Christoph Hellwig
  0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2008-02-07  5:19 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Christoph Hellwig, chris.mason, linux-fsdevel, reiserfs-devel

On Wed, Feb 06, 2008 at 09:16:27PM -0800, Andrew Morton wrote:
> On Thu, 7 Feb 2008 05:45:13 +0100 Christoph Hellwig <hch@lst.de> wrote:
> 
> > On Wed, Dec 26, 2007 at 04:31:01PM +0100, Christoph Hellwig wrote:
> > > Use the proper helper to open a blockdevice by name for filesystem
> > > use, this makes sure it's properly claimed (also added for open-by-number)
> > > and gets rid of the struct file abuse.
> > > 
> > > Tested by mounting a reiserfs filesystem with external journal.
> > 
> > Folks, what do we do with this patch?  It's been out for more than a
> > month but didn't actually get picked up in any tree.
> 
> It's still sitting in the great pile of things I got sent over Christmas
> and haven't looked at yet.  It didn't look like a bugfix.

Well, it's fixing that reiserds doesn't bd_claim it's journal device so
people can open the block device with O_EXCL against the documetned
semantics.  It's probably also fixing various corner cases that
open_bdev_excl deals with and a hand-crafted filp_open doesn't.

> >  I'd really like
> > to see this going in soon.
> 
> How come?

I just hate sitting on a stack of patches.  Even more so if I'd like to
see the public API removed in there eventually go away.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] reiserfs: use open_bdev_excl
  2007-12-26 15:31 [PATCH] reiserfs: use open_bdev_excl Christoph Hellwig
  2008-02-07  4:45 ` Christoph Hellwig
@ 2008-04-29 18:13 ` Christoph Hellwig
  2008-04-29 18:24   ` Andrew Morton
  2008-04-29 22:49   ` Edward Shishkin
  1 sibling, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2008-04-29 18:13 UTC (permalink / raw)
  To: chris.mason, akpm; +Cc: linux-fsdevel, reiserfs-devel

On Wed, Dec 26, 2007 at 04:31:01PM +0100, Christoph Hellwig wrote:
> Use the proper helper to open a blockdevice by name for filesystem
> use, this makes sure it's properly claimed (also added for open-by-number)
> and gets rid of the struct file abuse.
> 
> Tested by mounting a reiserfs filesystem with external journal.

Any reason this still didn't get sent to Linus?

> 
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> Index: linux-2.6-xfs/fs/reiserfs/journal.c
> ===================================================================
> --- linux-2.6-xfs.orig/fs/reiserfs/journal.c	2007-12-13 18:55:40.000000000 +0100
> +++ linux-2.6-xfs/fs/reiserfs/journal.c	2007-12-26 15:13:22.000000000 +0100
> @@ -2574,11 +2574,9 @@ static int release_journal_dev(struct su
>  
>  	result = 0;
>  
> -	if (journal->j_dev_file != NULL) {
> -		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) {
> +	if (journal->j_dev_bd != NULL) {
> +		if (journal->j_dev_bd->bd_dev != super->s_dev)
> +			bd_release(journal->j_dev_bd);
>  		result = blkdev_put(journal->j_dev_bd);
>  		journal->j_dev_bd = NULL;
>  	}
> @@ -2603,7 +2601,6 @@ static int journal_init_dev(struct super
>  	result = 0;
>  
>  	journal->j_dev_bd = NULL;
> -	journal->j_dev_file = NULL;
>  	jdev = SB_ONDISK_JOURNAL_DEVICE(super) ?
>  	    new_decode_dev(SB_ONDISK_JOURNAL_DEVICE(super)) : super->s_dev;
>  
> @@ -2620,35 +2617,34 @@ static int journal_init_dev(struct super
>  					 "cannot init journal device '%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) {
> +				blkdev_put(journal->j_dev_bd);
> +				return result;
> +			}
> +
>  			set_blocksize(journal->j_dev_bd, super->s_blocksize);
> +		}
> +
>  		return 0;
>  	}
>  
> -	journal->j_dev_file = filp_open(jdev_name, 0, 0);
> -	if (!IS_ERR(journal->j_dev_file)) {
> -		struct inode *jdev_inode = journal->j_dev_file->f_mapping->host;
> -		if (!S_ISBLK(jdev_inode->i_mode)) {
> -			reiserfs_warning(super, "journal_init_dev: '%s' is "
> -					 "not a block device", jdev_name);
> -			result = -ENOTBLK;
> -			release_journal_dev(super, journal);
> -		} else {
> -			/* ok */
> -			journal->j_dev_bd = I_BDEV(jdev_inode);
> -			set_blocksize(journal->j_dev_bd, super->s_blocksize);
> -			reiserfs_info(super,
> -				      "journal_init_dev: journal device: %s\n",
> -				      bdevname(journal->j_dev_bd, b));
> -		}
> -	} else {
> -		result = PTR_ERR(journal->j_dev_file);
> -		journal->j_dev_file = NULL;
> +	journal->j_dev_bd = open_bdev_excl(jdev_name, 0, journal);
> +	if (IS_ERR(journal->j_dev_bd)) {
> +		result = PTR_ERR(journal->j_dev_bd);
> +		journal->j_dev_bd = NULL;
>  		reiserfs_warning(super,
>  				 "journal_init_dev: Cannot open '%s': %i",
>  				 jdev_name, result);
> +		return result;
>  	}
> -	return result;
> +
> +	set_blocksize(journal->j_dev_bd, super->s_blocksize);
> +	reiserfs_info(super,
> +		      "journal_init_dev: journal device: %s\n",
> +		      bdevname(journal->j_dev_bd, b));
> +	return 0;
>  }
>  
>  /**
> Index: linux-2.6-xfs/include/linux/reiserfs_fs_sb.h
> ===================================================================
> --- linux-2.6-xfs.orig/include/linux/reiserfs_fs_sb.h	2007-12-13 19:06:58.000000000 +0100
> +++ linux-2.6-xfs/include/linux/reiserfs_fs_sb.h	2007-12-26 15:13:22.000000000 +0100
> @@ -177,7 +177,6 @@ struct reiserfs_journal {
>  	struct reiserfs_journal_cnode *j_last;	/* newest journal block */
>  	struct reiserfs_journal_cnode *j_first;	/*  oldest journal block.  start here for traverse */
>  
> -	struct file *j_dev_file;
>  	struct block_device *j_dev_bd;
>  	int j_1st_reserved_block;	/* first block on s_dev of reserved area journal */
>  
---end quoted text---

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] reiserfs: use open_bdev_excl
  2008-04-29 18:13 ` Christoph Hellwig
@ 2008-04-29 18:24   ` Andrew Morton
  2008-04-29 22:49   ` Edward Shishkin
  1 sibling, 0 replies; 7+ messages in thread
From: Andrew Morton @ 2008-04-29 18:24 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: chris.mason, linux-fsdevel, reiserfs-devel

On Tue, 29 Apr 2008 20:13:22 +0200
Christoph Hellwig <hch@lst.de> wrote:

> On Wed, Dec 26, 2007 at 04:31:01PM +0100, Christoph Hellwig wrote:
> > Use the proper helper to open a blockdevice by name for filesystem
> > use, this makes sure it's properly claimed (also added for open-by-number)
> > and gets rid of the struct file abuse.
> > 
> > Tested by mounting a reiserfs filesystem with external journal.
> 
> Any reason this still didn't get sent to Linus?

no, I just filed it in the wrong place.  It'll get there.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] reiserfs: use open_bdev_excl
  2008-04-29 18:13 ` Christoph Hellwig
  2008-04-29 18:24   ` Andrew Morton
@ 2008-04-29 22:49   ` Edward Shishkin
  1 sibling, 0 replies; 7+ messages in thread
From: Edward Shishkin @ 2008-04-29 22:49 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: chris.mason, Andrew Morton, linux-fsdevel, reiserfs-devel

Christoph Hellwig wrote:

>On Wed, Dec 26, 2007 at 04:31:01PM +0100, Christoph Hellwig wrote:
>  
>
>>Use the proper helper to open a blockdevice by name for filesystem
>>use, this makes sure it's properly claimed (also added for open-by-number)
>>and gets rid of the struct file abuse.
>>
>>Tested by mounting a reiserfs filesystem with external journal.
>>    
>>
>
>Any reason this still didn't get sent to Linus?
>
>  
>
>>Signed-off-by: Christoph Hellwig <hch@lst.de>
>>    
>>

Acked-by: Edward Shishkin <edward.shishkin@gmail.com>


>>Index: linux-2.6-xfs/fs/reiserfs/journal.c
>>===================================================================
>>--- linux-2.6-xfs.orig/fs/reiserfs/journal.c	2007-12-13 18:55:40.000000000 +0100
>>+++ linux-2.6-xfs/fs/reiserfs/journal.c	2007-12-26 15:13:22.000000000 +0100
>>@@ -2574,11 +2574,9 @@ static int release_journal_dev(struct su
>> 
>> 	result = 0;
>> 
>>-	if (journal->j_dev_file != NULL) {
>>-		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) {
>>+	if (journal->j_dev_bd != NULL) {
>>+		if (journal->j_dev_bd->bd_dev != super->s_dev)
>>+			bd_release(journal->j_dev_bd);
>> 		result = blkdev_put(journal->j_dev_bd);
>> 		journal->j_dev_bd = NULL;
>> 	}
>>@@ -2603,7 +2601,6 @@ static int journal_init_dev(struct super
>> 	result = 0;
>> 
>> 	journal->j_dev_bd = NULL;
>>-	journal->j_dev_file = NULL;
>> 	jdev = SB_ONDISK_JOURNAL_DEVICE(super) ?
>> 	    new_decode_dev(SB_ONDISK_JOURNAL_DEVICE(super)) : super->s_dev;
>> 
>>@@ -2620,35 +2617,34 @@ static int journal_init_dev(struct super
>> 					 "cannot init journal device '%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) {
>>+				blkdev_put(journal->j_dev_bd);
>>+				return result;
>>+			}
>>+
>> 			set_blocksize(journal->j_dev_bd, super->s_blocksize);
>>+		}
>>+
>> 		return 0;
>> 	}
>> 
>>-	journal->j_dev_file = filp_open(jdev_name, 0, 0);
>>-	if (!IS_ERR(journal->j_dev_file)) {
>>-		struct inode *jdev_inode = journal->j_dev_file->f_mapping->host;
>>-		if (!S_ISBLK(jdev_inode->i_mode)) {
>>-			reiserfs_warning(super, "journal_init_dev: '%s' is "
>>-					 "not a block device", jdev_name);
>>-			result = -ENOTBLK;
>>-			release_journal_dev(super, journal);
>>-		} else {
>>-			/* ok */
>>-			journal->j_dev_bd = I_BDEV(jdev_inode);
>>-			set_blocksize(journal->j_dev_bd, super->s_blocksize);
>>-			reiserfs_info(super,
>>-				      "journal_init_dev: journal device: %s\n",
>>-				      bdevname(journal->j_dev_bd, b));
>>-		}
>>-	} else {
>>-		result = PTR_ERR(journal->j_dev_file);
>>-		journal->j_dev_file = NULL;
>>+	journal->j_dev_bd = open_bdev_excl(jdev_name, 0, journal);
>>+	if (IS_ERR(journal->j_dev_bd)) {
>>+		result = PTR_ERR(journal->j_dev_bd);
>>+		journal->j_dev_bd = NULL;
>> 		reiserfs_warning(super,
>> 				 "journal_init_dev: Cannot open '%s': %i",
>> 				 jdev_name, result);
>>+		return result;
>> 	}
>>-	return result;
>>+
>>+	set_blocksize(journal->j_dev_bd, super->s_blocksize);
>>+	reiserfs_info(super,
>>+		      "journal_init_dev: journal device: %s\n",
>>+		      bdevname(journal->j_dev_bd, b));
>>+	return 0;
>> }
>> 
>> /**
>>Index: linux-2.6-xfs/include/linux/reiserfs_fs_sb.h
>>===================================================================
>>--- linux-2.6-xfs.orig/include/linux/reiserfs_fs_sb.h	2007-12-13 19:06:58.000000000 +0100
>>+++ linux-2.6-xfs/include/linux/reiserfs_fs_sb.h	2007-12-26 15:13:22.000000000 +0100
>>@@ -177,7 +177,6 @@ struct reiserfs_journal {
>> 	struct reiserfs_journal_cnode *j_last;	/* newest journal block */
>> 	struct reiserfs_journal_cnode *j_first;	/*  oldest journal block.  start here for traverse */
>> 
>>-	struct file *j_dev_file;
>> 	struct block_device *j_dev_bd;
>> 	int j_1st_reserved_block;	/* first block on s_dev of reserved area journal */
>> 
>>    
>>
>---end quoted text---
>--
>To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>  
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-04-29 22:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-26 15:31 [PATCH] reiserfs: use open_bdev_excl Christoph Hellwig
2008-02-07  4:45 ` Christoph Hellwig
2008-02-07  5:16   ` Andrew Morton
2008-02-07  5:19     ` Christoph Hellwig
2008-04-29 18:13 ` Christoph Hellwig
2008-04-29 18:24   ` Andrew Morton
2008-04-29 22:49   ` 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).