All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]  V2 jbd2_stats_proc_init wrong place.
@ 2010-11-11 21:23 yangsheng
  2010-11-15 16:59 ` Eric Sandeen
  0 siblings, 1 reply; 3+ messages in thread
From: yangsheng @ 2010-11-11 21:23 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: yangsheng

 The jbd2_stats_proc_init() was placed on wrong location in
 jbd2_journal_init_dev().  This may cause /proc/fs/jdb2/<dev>/*
 cannot be created when using external journal device.
---
 fs/jbd2/journal.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 13b0a92..a435710 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -897,9 +897,18 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev,
 	if (!journal)
 		return NULL;
 
+	journal->j_dev = bdev;
+	journal->j_fs_dev = fs_dev;
+	journal->j_blk_offset = start;
+	journal->j_maxlen = len;
+	bdevname(journal->j_dev, journal->j_devname);
+	p = journal->j_devname;
+	while ((p = strchr(p, '/')))
+		*p = '!';
+	jbd2_stats_proc_init(journal);
+
 	/* journal descriptor can store up to n blocks -bzzz */
 	journal->j_blocksize = blocksize;
-	jbd2_stats_proc_init(journal);
 	n = journal->j_blocksize / sizeof(journal_block_tag_t);
 	journal->j_wbufsize = n;
 	journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL);
@@ -908,14 +917,6 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev,
 			__func__);
 		goto out_err;
 	}
-	journal->j_dev = bdev;
-	journal->j_fs_dev = fs_dev;
-	journal->j_blk_offset = start;
-	journal->j_maxlen = len;
-	bdevname(journal->j_dev, journal->j_devname);
-	p = journal->j_devname;
-	while ((p = strchr(p, '/')))
-		*p = '!';
 
 	bh = __getblk(journal->j_dev, start, journal->j_blocksize);
 	if (!bh) {
-- 
1.7.2.3


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

* Re: [PATCH]  V2 jbd2_stats_proc_init wrong place.
  2010-11-11 21:23 [PATCH] V2 jbd2_stats_proc_init wrong place yangsheng
@ 2010-11-15 16:59 ` Eric Sandeen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2010-11-15 16:59 UTC (permalink / raw)
  To: yangsheng; +Cc: linux-fsdevel, ext4 development

On 11/11/10 3:23 PM, yangsheng wrote:
>  The jbd2_stats_proc_init() was placed on wrong location in
>  jbd2_journal_init_dev().  This may cause /proc/fs/jdb2/<dev>/*
>  cannot be created when using external journal device.
> ---
>  fs/jbd2/journal.c |   19 ++++++++++---------
>  1 files changed, 10 insertions(+), 9 deletions(-)

adding linux-ext4 to cc:

> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
> index 13b0a92..a435710 100644
> --- a/fs/jbd2/journal.c
> +++ b/fs/jbd2/journal.c
> @@ -897,9 +897,18 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev,
>  	if (!journal)
>  		return NULL;
>  
> +	journal->j_dev = bdev;
> +	journal->j_fs_dev = fs_dev;
> +	journal->j_blk_offset = start;
> +	journal->j_maxlen = len;
> +	bdevname(journal->j_dev, journal->j_devname);
> +	p = journal->j_devname;
> +	while ((p = strchr(p, '/')))
> +		*p = '!';
> +	jbd2_stats_proc_init(journal);
> +
>  	/* journal descriptor can store up to n blocks -bzzz */
>  	journal->j_blocksize = blocksize;
> -	jbd2_stats_proc_init(journal);
>  	n = journal->j_blocksize / sizeof(journal_block_tag_t);
>  	journal->j_wbufsize = n;
>  	journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL);
> @@ -908,14 +917,6 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev,
>  			__func__);
>  		goto out_err;
>  	}
> -	journal->j_dev = bdev;
> -	journal->j_fs_dev = fs_dev;
> -	journal->j_blk_offset = start;
> -	journal->j_maxlen = len;
> -	bdevname(journal->j_dev, journal->j_devname);
> -	p = journal->j_devname;
> -	while ((p = strchr(p, '/')))
> -		*p = '!';
>  
>  	bh = __getblk(journal->j_dev, start, journal->j_blocksize);
>  	if (!bh) {


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

* [PATCH]  V2 jbd2_stats_proc_init wrong place.
@ 2010-11-11 21:23 yangsheng
  0 siblings, 0 replies; 3+ messages in thread
From: yangsheng @ 2010-11-11 21:23 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: yangsheng

The jbd2_stats_proc_init() was placed on wrong location in
jbd2_journal_init_dev().  This may cause /proc/fs/jdb2/<dev>/*
cannot be created when using external journal device.
---
fs/jbd2/journal.c |   19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 13b0a92..a435710 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -897,9 +897,18 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev,
	if (!journal)
		return NULL;

+	journal->j_dev = bdev;
+	journal->j_fs_dev = fs_dev;
+	journal->j_blk_offset = start;
+	journal->j_maxlen = len;
+	bdevname(journal->j_dev, journal->j_devname);
+	p = journal->j_devname;
+	while ((p = strchr(p, '/')))
+		*p = '!';
+	jbd2_stats_proc_init(journal);
+
	/* journal descriptor can store up to n blocks -bzzz */
	journal->j_blocksize = blocksize;
-	jbd2_stats_proc_init(journal);
	n = journal->j_blocksize / sizeof(journal_block_tag_t);
	journal->j_wbufsize = n;
	journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL);
@@ -908,14 +917,6 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev,
			__func__);
		goto out_err;
	}
-	journal->j_dev = bdev;
-	journal->j_fs_dev = fs_dev;
-	journal->j_blk_offset = start;
-	journal->j_maxlen = len;
-	bdevname(journal->j_dev, journal->j_devname);
-	p = journal->j_devname;
-	while ((p = strchr(p, '/')))
-		*p = '!';

	bh = __getblk(journal->j_dev, start, journal->j_blocksize);
	if (!bh) {
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" 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 related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-15 16:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-11 21:23 [PATCH] V2 jbd2_stats_proc_init wrong place yangsheng
2010-11-15 16:59 ` Eric Sandeen
  -- strict thread matches above, loose matches on Subject: below --
2010-11-11 21:23 yangsheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.