diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-28 10:56:05 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-28 10:56:05 -0400 |
| commit | 970b06485ffee36aa3549dfe4c6b2a2c2118354d (patch) | |
| tree | 1b0f6f4182e73d19071addf8a209e5fb58483d08 /fs/btrfs | |
| parent | 696e65c3606aa3f587eeb181766baf49ea750cfc (diff) | |
| parent | 33f60e9640b2f60dde6735293d4aa5ecc5b1d5d5 (diff) | |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
coda: move backing-dev.h kernel include inside __KERNEL__
mtd: ensure that bdi entries are properly initialized and registered
Move mtd_bdi_*mappable to mtdcore.c
btrfs: convert to using bdi_setup_and_register()
Catch filesystems lacking s_bdi
drbd: Terminate a connection early if sending the protocol fails
drbd: fix memory leak
Fix JFFS2 sync silent failure
smbfs: add bdi backing to mount session
ncpfs: add bdi backing to mount session
exofs: add bdi backing to mount session
ecryptfs: add bdi backing to mount session
coda: add bdi backing to mount session
cifs: add bdi backing to mount session
afs: add bdi backing to mount session.
9p: add bdi backing to mount session
bdi: add helper function for doing init and register of a bdi for a file system
block: ensure jiffies wrap is handled correctly in blk_rq_timed_out_timer
Diffstat (limited to 'fs/btrfs')
| -rw-r--r-- | fs/btrfs/disk-io.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index e7b8f2c89ccb..feca04197d02 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
| @@ -44,8 +44,6 @@ static struct extent_io_ops btree_extent_io_ops; | |||
| 44 | static void end_workqueue_fn(struct btrfs_work *work); | 44 | static void end_workqueue_fn(struct btrfs_work *work); |
| 45 | static void free_fs_root(struct btrfs_root *root); | 45 | static void free_fs_root(struct btrfs_root *root); |
| 46 | 46 | ||
| 47 | static atomic_t btrfs_bdi_num = ATOMIC_INIT(0); | ||
| 48 | |||
| 49 | /* | 47 | /* |
| 50 | * end_io_wq structs are used to do processing in task context when an IO is | 48 | * end_io_wq structs are used to do processing in task context when an IO is |
| 51 | * complete. This is used during reads to verify checksums, and it is used | 49 | * complete. This is used during reads to verify checksums, and it is used |
| @@ -1375,19 +1373,11 @@ static int setup_bdi(struct btrfs_fs_info *info, struct backing_dev_info *bdi) | |||
| 1375 | { | 1373 | { |
| 1376 | int err; | 1374 | int err; |
| 1377 | 1375 | ||
| 1378 | bdi->name = "btrfs"; | ||
| 1379 | bdi->capabilities = BDI_CAP_MAP_COPY; | 1376 | bdi->capabilities = BDI_CAP_MAP_COPY; |
| 1380 | err = bdi_init(bdi); | 1377 | err = bdi_setup_and_register(bdi, "btrfs", BDI_CAP_MAP_COPY); |
| 1381 | if (err) | 1378 | if (err) |
| 1382 | return err; | 1379 | return err; |
| 1383 | 1380 | ||
| 1384 | err = bdi_register(bdi, NULL, "btrfs-%d", | ||
| 1385 | atomic_inc_return(&btrfs_bdi_num)); | ||
| 1386 | if (err) { | ||
| 1387 | bdi_destroy(bdi); | ||
| 1388 | return err; | ||
| 1389 | } | ||
| 1390 | |||
| 1391 | bdi->ra_pages = default_backing_dev_info.ra_pages; | 1381 | bdi->ra_pages = default_backing_dev_info.ra_pages; |
| 1392 | bdi->unplug_io_fn = btrfs_unplug_io_fn; | 1382 | bdi->unplug_io_fn = btrfs_unplug_io_fn; |
| 1393 | bdi->unplug_io_data = info; | 1383 | bdi->unplug_io_data = info; |
