This enables us to track who does what and print info. Its main use is catching dirty inodes on the default_backing_dev_info, so we can fix that up.
Unified · Split
| @@ -501,6 +501,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id) · 500 unmodified lines | ||
| 501 | 501 | (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE; |
| 502 | 502 | q->backing_dev_info.state = 0; |
| 503 | 503 | q->backing_dev_info.capabilities = BDI_CAP_MAP_COPY; |
| 504 | + q->backing_dev_info.name = "block"; | |
| 504 | 505 | |
| 505 | 506 | err = bdi_init(&q->backing_dev_info); |
| 506 | 507 | if (err) { |
| @@ -268,6 +268,7 @@ aoeblk_gdalloc(void *vp) · 267 unmodified lines | ||
| 268 | 268 | if (!d->blkq) |
| 269 | 269 | goto err_mempool; |
| 270 | 270 | blk_queue_make_request(d->blkq, aoeblk_make_request); |
| 271 | + d->blkq->backing_dev_info.name = "aoe"; | |
| 271 | 272 | if (bdi_init(&d->blkq->backing_dev_info)) |
| 272 | 273 | goto err_blkq; |
| 273 | 274 | spin_lock_irqsave(&d->lock, flags); |
| @@ -822,6 +822,7 @@ static const struct file_operations zero_fops = { · 821 unmodified lines | ||
| 822 | 822 | * - permits private mappings, "copies" are taken of the source of zeros |
| 823 | 823 | */ |
| 824 | 824 | static struct backing_dev_info zero_bdi = { |
| 825 | + .name = "char/mem", | |
| 825 | 826 | .capabilities = BDI_CAP_MAP_COPY, |
| 826 | 827 | }; |
| 827 | 828 | |
| @@ -1352,6 +1352,7 @@ static int setup_bdi(struct btrfs_fs_info *info, struct backing_dev_info *bdi) · 1351 unmodified lines | ||
| 1352 | 1352 | { |
| 1353 | 1353 | int err; |
| 1354 | 1354 | |
| 1355 | + bdi->name = "btrfs"; | |
| 1355 | 1356 | bdi->capabilities = BDI_CAP_MAP_COPY; |
| 1356 | 1357 | err = bdi_init(bdi); |
| 1357 | 1358 | if (err) |
| @@ -31,6 +31,7 @@ · 30 unmodified lines | ||
| 31 | 31 | * - no readahead or I/O queue unplugging required |
| 32 | 32 | */ |
| 33 | 33 | struct backing_dev_info directly_mappable_cdev_bdi = { |
| 34 | + .name = "char", | |
| 34 | 35 | .capabilities = ( |
| 35 | 36 | #ifdef CONFIG_MMU |
| 36 | 37 | /* permit private copies of the data to be taken */ |
| @@ -51,6 +51,7 @@ static const struct address_space_operations configfs_aops = { · 50 unmodified lines | ||
| 51 | 51 | }; |
| 52 | 52 | |
| 53 | 53 | static struct backing_dev_info configfs_backing_dev_info = { |
| 54 | + .name = "configfs", | |
| 54 | 55 | .ra_pages = 0, /* No readahead */ |
| 55 | 56 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK, |
| 56 | 57 | }; |
| @@ -801,6 +801,7 @@ static int fuse_bdi_init(struct fuse_conn *fc, struct super_block *sb) · 800 unmodified lines | ||
| 801 | 801 | { |
| 802 | 802 | int err; |
| 803 | 803 | |
| 804 | + fc->bdi.name = "fuse"; | |
| 804 | 805 | fc->bdi.ra_pages = (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE; |
| 805 | 806 | fc->bdi.unplug_io_fn = default_unplug_io_fn; |
| 806 | 807 | /* fuse does it's own writeback accounting */ |
| @@ -44,6 +44,7 @@ static const struct inode_operations hugetlbfs_dir_inode_operations; · 43 unmodified lines | ||
| 44 | 44 | static const struct inode_operations hugetlbfs_inode_operations; |
| 45 | 45 | |
| 46 | 46 | static struct backing_dev_info hugetlbfs_backing_dev_info = { |
| 47 | + .name = "hugetlbfs", | |
| 47 | 48 | .ra_pages = 0, /* No readahead */ |
| 48 | 49 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK, |
| 49 | 50 | }; |
| @@ -879,6 +879,7 @@ static void nfs_server_set_fsinfo(struct nfs_server *server, struct nfs_fsinfo * · 878 unmodified lines | ||
| 879 | 879 | server->rsize = NFS_MAX_FILE_IO_SIZE; |
| 880 | 880 | server->rpages = (server->rsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; |
| 881 | 881 | |
| 882 | + server->backing_dev_info.name = "nfs"; | |
| 882 | 883 | server->backing_dev_info.ra_pages = server->rpages * NFS_MAX_READAHEAD; |
| 883 | 884 | |
| 884 | 885 | if (server->wsize > max_rpc_payload) |
| @@ -325,6 +325,7 @@ clear_fields: · 324 unmodified lines | ||
| 325 | 325 | } |
| 326 | 326 | |
| 327 | 327 | static struct backing_dev_info dlmfs_backing_dev_info = { |
| 328 | + .name = "ocfs2-dlmfs", | |
| 328 | 329 | .ra_pages = 0, /* No readahead */ |
| 329 | 330 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK, |
| 330 | 331 | }; |
| @@ -46,6 +46,7 @@ static const struct super_operations ramfs_ops; · 45 unmodified lines | ||
| 46 | 46 | static const struct inode_operations ramfs_dir_inode_operations; |
| 47 | 47 | |
| 48 | 48 | static struct backing_dev_info ramfs_backing_dev_info = { |
| 49 | + .name = "ramfs", | |
| 49 | 50 | .ra_pages = 0, /* No readahead */ |
| 50 | 51 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK | |
| 51 | 52 | BDI_CAP_MAP_DIRECT | BDI_CAP_MAP_COPY | |
| @@ -29,6 +29,7 @@ static const struct address_space_operations sysfs_aops = { · 28 unmodified lines | ||
| 29 | 29 | }; |
| 30 | 30 | |
| 31 | 31 | static struct backing_dev_info sysfs_backing_dev_info = { |
| 32 | + .name = "sysfs", | |
| 32 | 33 | .ra_pages = 0, /* No readahead */ |
| 33 | 34 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK, |
| 34 | 35 | }; |
| @@ -1965,6 +1965,7 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent) · 1964 unmodified lines | ||
| 1965 | 1965 | * |
| 1966 | 1966 | * Read-ahead will be disabled because @c->bdi.ra_pages is 0. |
| 1967 | 1967 | */ |
| 1968 | + c->bdi.name = "ubifs", | |
| 1968 | 1969 | c->bdi.capabilities = BDI_CAP_MAP_COPY; |
| 1969 | 1970 | c->bdi.unplug_io_fn = default_unplug_io_fn; |
| 1970 | 1971 | err = bdi_init(&c->bdi); |
| @@ -66,6 +66,8 @@ struct backing_dev_info { · 65 unmodified lines | ||
| 66 | 66 | void (*unplug_io_fn)(struct backing_dev_info *, struct page *); |
| 67 | 67 | void *unplug_io_data; |
| 68 | 68 | |
| 69 | + char *name; | |
| 70 | + | |
| 69 | 71 | struct percpu_counter bdi_stat[NR_BDI_STAT_ITEMS]; |
| 70 | 72 | |
| 71 | 73 | struct prop_local_percpu completions; |
| @@ -600,6 +600,7 @@ static struct inode_operations cgroup_dir_inode_operations; · 599 unmodified lines | ||
| 600 | 600 | static struct file_operations proc_cgroupstats_operations; |
| 601 | 601 | |
| 602 | 602 | static struct backing_dev_info cgroup_backing_dev_info = { |
| 603 | + .name = "cgroup", | |
| 603 | 604 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK, |
| 604 | 605 | }; |
| 605 | 606 | |
| @@ -17,6 +17,7 @@ void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page) · 16 unmodified lines | ||
| 17 | 17 | EXPORT_SYMBOL(default_unplug_io_fn); |
| 18 | 18 | |
| 19 | 19 | struct backing_dev_info default_backing_dev_info = { |
| 20 | + .name = "default", | |
| 20 | 21 | .ra_pages = VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE, |
| 21 | 22 | .state = 0, |
| 22 | 23 | .capabilities = BDI_CAP_MAP_COPY, |
| @@ -34,6 +34,7 @@ static const struct address_space_operations swap_aops = { · 33 unmodified lines | ||
| 34 | 34 | }; |
| 35 | 35 | |
| 36 | 36 | static struct backing_dev_info swap_backing_dev_info = { |
| 37 | + .name = "swap", | |
| 37 | 38 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK | BDI_CAP_SWAP_BACKED, |
| 38 | 39 | .unplug_io_fn = swap_unplug_io_fn, |
| 39 | 40 | }; |