linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: exofs: add bdi backing to mount session
       [not found] <201004282059.o3SKx7hG029846@hera.kernel.org>
@ 2010-04-29 10:24 ` Boaz Harrosh
  2010-04-29 10:38   ` [PATCH] exofs: Fix "add bdi backing to mount session" fall out Boaz Harrosh
  0 siblings, 1 reply; 3+ messages in thread
From: Boaz Harrosh @ 2010-04-29 10:24 UTC (permalink / raw)
  To: Jens Axboe, Linus Torvalds, linux-fsdevel,
	Linux Kernel Mailing List

On 04/28/2010 11:59 PM, Linux Kernel Mailing List wrote:
> Gitweb:     http://git.kernel.org/linus/b3d0ab7e60d1865bb6f6a79a77aaba22f2543236
> Commit:     b3d0ab7e60d1865bb6f6a79a77aaba22f2543236
> Parent:     9df9c8b930156a2f9ce2b2ae66acb14bee2663f5
> Author:     Jens Axboe <jens.axboe@oracle.com>
> AuthorDate: Thu Apr 22 12:26:04 2010 +0200
> Committer:  Jens Axboe <jens.axboe@oracle.com>
> CommitDate: Thu Apr 22 12:26:04 2010 +0200
> 
>     exofs: add bdi backing to mount session
>     
>     This ensures that dirty data gets flushed properly.
>     
>     Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

This patch introduced a bug (together with a fix). I'm sorry that
my "Linux Kernel Mailing List" filtering techniques are lacking and
I missed it completely. Searching on google I can see it was hiding
under "[GIT PULL] block/writeback bits for 2.6.34-rc". I have only
seen it now, in git-commits-head ml.

I wish filesystem related patches where CC to linux-fsdevel, and/or
posted as individual patches, sigh.

I'll post a fix as reply to this mail. Linus please submit.

Boaz
> ---
>  fs/exofs/exofs.h |    2 ++
>  fs/exofs/super.c |    8 ++++++++
>  2 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h
> index 8442e35..5437327 100644
> --- a/fs/exofs/exofs.h
> +++ b/fs/exofs/exofs.h
> @@ -35,6 +35,7 @@
>  
>  #include <linux/fs.h>
>  #include <linux/time.h>
> +#include <linux/backing-dev.h>
>  #include "common.h"
>  
>  /* FIXME: Remove once pnfs hits mainline
> @@ -92,6 +93,7 @@ struct exofs_sb_info {
>  	struct exofs_layout	layout;		/* Default files layout,
>  						 * contains the variable osd_dev
>  						 * array. Keep last */
> +	struct backing_dev_info bdi;
>  	struct osd_dev	*_min_one_dev[1];	/* Place holder for one dev   */
>  };
>  
> diff --git a/fs/exofs/super.c b/fs/exofs/super.c
> index 18e57ea..03149b9 100644
> --- a/fs/exofs/super.c
> +++ b/fs/exofs/super.c
> @@ -302,6 +302,7 @@ static void exofs_put_super(struct super_block *sb)
>  	_exofs_print_device("Unmounting", NULL, sbi->layout.s_ods[0],
>  			    sbi->layout.s_pid);
>  
> +	bdi_destroy(&sbi->bdi);
>  	exofs_free_sbi(sbi);
>  	sb->s_fs_info = NULL;
>  }
> @@ -546,6 +547,10 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent)
>  	if (!sbi)
>  		return -ENOMEM;
>  
> +	ret = bdi_setup_and_register(&sbi->bdi, "exofs", BDI_CAP_MAP_COPY);
> +	if (ret)
> +		goto free_bdi;
> +
>  	/* use mount options to fill superblock */
>  	od = osduld_path_lookup(opts->dev_name);
>  	if (IS_ERR(od)) {
> @@ -612,6 +617,7 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent)
>  	}
>  
>  	/* set up operation vectors */
> +	sb->s_bdi = &sbi->bdi;
>  	sb->s_fs_info = sbi;
>  	sb->s_op = &exofs_sops;
>  	sb->s_export_op = &exofs_export_ops;
> @@ -643,6 +649,8 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent)
>  	return 0;
>  
>  free_sbi:
> +	bdi_destroy(&sbi->bdi);
> +free_bdi:
>  	EXOFS_ERR("Unable to mount exofs on %s pid=0x%llx err=%d\n",
>  		  opts->dev_name, sbi->layout.s_pid, ret);
>  	exofs_free_sbi(sbi);
> --
> To unsubscribe from this list: send the line "unsubscribe git-commits-head" 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] 3+ messages in thread

* [PATCH] exofs: Fix "add bdi backing to mount session" fall out
  2010-04-29 10:24 ` exofs: add bdi backing to mount session Boaz Harrosh
@ 2010-04-29 10:38   ` Boaz Harrosh
  2010-04-29 10:43     ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Boaz Harrosh @ 2010-04-29 10:38 UTC (permalink / raw)
  To: Jens Axboe, Linus Torvalds, linux-fsdevel,
	Linux Kernel Mailing List


The patch: add bdi backing to mount session
	(b3d0ab7e60d1865bb6f6a79a77aaba22f2543236)

Has a bug in the placement of the bdi member at
struct exofs_sb_info. The layout member must be kept
last.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
---
 fs/exofs/exofs.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h
index 5437327..22721b2 100644
--- a/fs/exofs/exofs.h
+++ b/fs/exofs/exofs.h
@@ -85,6 +85,7 @@ struct exofs_sb_info {
 	u32		s_next_generation;	/* next gen # to use          */
 	atomic_t	s_curr_pending;		/* number of pending commands */
 	uint8_t		s_cred[OSD_CAP_LEN];	/* credential for the fscb    */
+	struct 		backing_dev_info bdi;	/* register our bdi with VFS  */
 
 	struct pnfs_osd_data_map data_map;	/* Default raid to use
 						 * FIXME: Needed ?
@@ -93,7 +94,6 @@ struct exofs_sb_info {
 	struct exofs_layout	layout;		/* Default files layout,
 						 * contains the variable osd_dev
 						 * array. Keep last */
-	struct backing_dev_info bdi;
 	struct osd_dev	*_min_one_dev[1];	/* Place holder for one dev   */
 };
 
-- 
1.6.6.1



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

* Re: [PATCH] exofs: Fix "add bdi backing to mount session" fall out
  2010-04-29 10:38   ` [PATCH] exofs: Fix "add bdi backing to mount session" fall out Boaz Harrosh
@ 2010-04-29 10:43     ` Jens Axboe
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2010-04-29 10:43 UTC (permalink / raw)
  To: Boaz Harrosh; +Cc: Linus Torvalds, linux-fsdevel, Linux Kernel Mailing List

On Thu, Apr 29 2010, Boaz Harrosh wrote:
> 
> The patch: add bdi backing to mount session
> 	(b3d0ab7e60d1865bb6f6a79a77aaba22f2543236)
> 
> Has a bug in the placement of the bdi member at
> struct exofs_sb_info. The layout member must be kept
> last.
> 
> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
> ---
>  fs/exofs/exofs.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h
> index 5437327..22721b2 100644
> --- a/fs/exofs/exofs.h
> +++ b/fs/exofs/exofs.h
> @@ -85,6 +85,7 @@ struct exofs_sb_info {
>  	u32		s_next_generation;	/* next gen # to use          */
>  	atomic_t	s_curr_pending;		/* number of pending commands */
>  	uint8_t		s_cred[OSD_CAP_LEN];	/* credential for the fscb    */
> +	struct 		backing_dev_info bdi;	/* register our bdi with VFS  */
>  
>  	struct pnfs_osd_data_map data_map;	/* Default raid to use
>  						 * FIXME: Needed ?
> @@ -93,7 +94,6 @@ struct exofs_sb_info {
>  	struct exofs_layout	layout;		/* Default files layout,
>  						 * contains the variable osd_dev
>  						 * array. Keep last */
> -	struct backing_dev_info bdi;
>  	struct osd_dev	*_min_one_dev[1];	/* Place holder for one dev   */
>  };

Irk, silly mistake. Apparently I missed the comment, and I did move it
prior to _min_one_dev[] but didn't think enough about it.

Acked-by: Jens Axboe <jens.axboe@oracle.com>

-- 
Jens Axboe

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

end of thread, other threads:[~2010-04-30 18:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <201004282059.o3SKx7hG029846@hera.kernel.org>
2010-04-29 10:24 ` exofs: add bdi backing to mount session Boaz Harrosh
2010-04-29 10:38   ` [PATCH] exofs: Fix "add bdi backing to mount session" fall out Boaz Harrosh
2010-04-29 10:43     ` Jens Axboe

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).