From 51407d4401bc2c4697964bcbdada3d00a57a49db Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 22 Apr 2010 12:26:04 +0200 Subject: [PATCH] --- yaml --- r: 190335 b: refs/heads/master c: b3d0ab7e60d1865bb6f6a79a77aaba22f2543236 h: refs/heads/master i: 190333: 6453ee7cfd26e9daa28566690b11d9781b621ec6 190331: d19a3a347a6f451dae54186f602a2d3785d8a872 190327: 6f40a9ea55fd65756775a8c45dc8b7c3369a5b3b 190319: 5bf6f4132b8b3d82ebb911d40f470c710a9c7ade 190303: 4847e680ef9e3b27750402d212c4bb12425b4c40 190271: c3a2aa72685f9fb3933bd2919ab34851c2d9b2e1 190207: 70b22e19b0010161132c94feebf72163c0a434c5 v: v3 --- [refs] | 2 +- trunk/fs/exofs/exofs.h | 2 ++ trunk/fs/exofs/super.c | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 16bc3eacef3b..a006c24c4cb2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9df9c8b930156a2f9ce2b2ae66acb14bee2663f5 +refs/heads/master: b3d0ab7e60d1865bb6f6a79a77aaba22f2543236 diff --git a/trunk/fs/exofs/exofs.h b/trunk/fs/exofs/exofs.h index 8442e353309f..54373278a353 100644 --- a/trunk/fs/exofs/exofs.h +++ b/trunk/fs/exofs/exofs.h @@ -35,6 +35,7 @@ #include #include +#include #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/trunk/fs/exofs/super.c b/trunk/fs/exofs/super.c index 18e57ea1e5b4..03149b9a5178 100644 --- a/trunk/fs/exofs/super.c +++ b/trunk/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);