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 | (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE; | 501 | (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE; |
| 502 | q->backing_dev_info.state = 0; | 502 | q->backing_dev_info.state = 0; |
| 503 | q->backing_dev_info.capabilities = BDI_CAP_MAP_COPY; | 503 | q->backing_dev_info.capabilities = BDI_CAP_MAP_COPY; |
| 504 | q->backing_dev_info.name = "block"; | ||
| 504 | 505 | ||
| 505 | err = bdi_init(&q->backing_dev_info); | 506 | err = bdi_init(&q->backing_dev_info); |
| 506 | if (err) { | 507 | if (err) { |
| @@ -268,6 +268,7 @@ aoeblk_gdalloc(void *vp) · 267 unmodified lines | |||
| 268 | if (!d->blkq) | 268 | if (!d->blkq) |
| 269 | goto err_mempool; | 269 | goto err_mempool; |
| 270 | blk_queue_make_request(d->blkq, aoeblk_make_request); | 270 | blk_queue_make_request(d->blkq, aoeblk_make_request); |
| 271 | d->blkq->backing_dev_info.name = "aoe"; | ||
| 271 | if (bdi_init(&d->blkq->backing_dev_info)) | 272 | if (bdi_init(&d->blkq->backing_dev_info)) |
| 272 | goto err_blkq; | 273 | goto err_blkq; |
| 273 | spin_lock_irqsave(&d->lock, flags); | 274 | spin_lock_irqsave(&d->lock, flags); |
| @@ -822,6 +822,7 @@ static const struct file_operations zero_fops = { · 821 unmodified lines | |||
| 822 | * - permits private mappings, "copies" are taken of the source of zeros | 822 | * - permits private mappings, "copies" are taken of the source of zeros |
| 823 | */ | 823 | */ |
| 824 | static struct backing_dev_info zero_bdi = { | 824 | static struct backing_dev_info zero_bdi = { |
| 825 | .name = "char/mem", | ||
| 825 | .capabilities = BDI_CAP_MAP_COPY, | 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 | int err; | 1353 | int err; |
| 1354 | 1354 | ||
| 1355 | bdi->name = "btrfs"; | ||
| 1355 | bdi->capabilities = BDI_CAP_MAP_COPY; | 1356 | bdi->capabilities = BDI_CAP_MAP_COPY; |
| 1356 | err = bdi_init(bdi); | 1357 | err = bdi_init(bdi); |
| 1357 | if (err) | 1358 | if (err) |
| @@ -31,6 +31,7 @@ · 30 unmodified lines | |||
| 31 | * - no readahead or I/O queue unplugging required | 31 | * - no readahead or I/O queue unplugging required |
| 32 | */ | 32 | */ |
| 33 | struct backing_dev_info directly_mappable_cdev_bdi = { | 33 | struct backing_dev_info directly_mappable_cdev_bdi = { |
| 34 | .name = "char", | ||
| 34 | .capabilities = ( | 35 | .capabilities = ( |
| 35 | #ifdef CONFIG_MMU | 36 | #ifdef CONFIG_MMU |
| 36 | /* permit private copies of the data to be taken */ | 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 | static struct backing_dev_info configfs_backing_dev_info = { | 53 | static struct backing_dev_info configfs_backing_dev_info = { |
| 54 | .name = "configfs", | ||
| 54 | .ra_pages = 0, /* No readahead */ | 55 | .ra_pages = 0, /* No readahead */ |
| 55 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK, | 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 | int err; | 802 | int err; |
| 803 | 803 | ||
| 804 | fc->bdi.name = "fuse"; | ||
| 804 | fc->bdi.ra_pages = (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE; | 805 | fc->bdi.ra_pages = (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE; |
| 805 | fc->bdi.unplug_io_fn = default_unplug_io_fn; | 806 | fc->bdi.unplug_io_fn = default_unplug_io_fn; |
| 806 | /* fuse does it's own writeback accounting */ | 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 | static const struct inode_operations hugetlbfs_inode_operations; | 44 | static const struct inode_operations hugetlbfs_inode_operations; |
| 45 | 45 | ||
| 46 | static struct backing_dev_info hugetlbfs_backing_dev_info = { | 46 | static struct backing_dev_info hugetlbfs_backing_dev_info = { |
| 47 | .name = "hugetlbfs", | ||
| 47 | .ra_pages = 0, /* No readahead */ | 48 | .ra_pages = 0, /* No readahead */ |
| 48 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK, | 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 | server->rsize = NFS_MAX_FILE_IO_SIZE; | 879 | server->rsize = NFS_MAX_FILE_IO_SIZE; |
| 880 | server->rpages = (server->rsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; | 880 | server->rpages = (server->rsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; |
| 881 | 881 | ||
| 882 | server->backing_dev_info.name = "nfs"; | ||
| 882 | server->backing_dev_info.ra_pages = server->rpages * NFS_MAX_READAHEAD; | 883 | server->backing_dev_info.ra_pages = server->rpages * NFS_MAX_READAHEAD; |
| 883 | 884 | ||
| 884 | if (server->wsize > max_rpc_payload) | 885 | if (server->wsize > max_rpc_payload) |
| @@ -325,6 +325,7 @@ clear_fields: · 324 unmodified lines | |||
| 325 | } | 325 | } |
| 326 | 326 | ||
| 327 | static struct backing_dev_info dlmfs_backing_dev_info = { | 327 | static struct backing_dev_info dlmfs_backing_dev_info = { |
| 328 | .name = "ocfs2-dlmfs", | ||
| 328 | .ra_pages = 0, /* No readahead */ | 329 | .ra_pages = 0, /* No readahead */ |
| 329 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK, | 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 | static const struct inode_operations ramfs_dir_inode_operations; | 46 | static const struct inode_operations ramfs_dir_inode_operations; |
| 47 | 47 | ||
| 48 | static struct backing_dev_info ramfs_backing_dev_info = { | 48 | static struct backing_dev_info ramfs_backing_dev_info = { |
| 49 | .name = "ramfs", | ||
| 49 | .ra_pages = 0, /* No readahead */ | 50 | .ra_pages = 0, /* No readahead */ |
| 50 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK | | 51 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK | |
| 51 | BDI_CAP_MAP_DIRECT | BDI_CAP_MAP_COPY | | 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 | static struct backing_dev_info sysfs_backing_dev_info = { | 31 | static struct backing_dev_info sysfs_backing_dev_info = { |
| 32 | .name = "sysfs", | ||
| 32 | .ra_pages = 0, /* No readahead */ | 33 | .ra_pages = 0, /* No readahead */ |
| 33 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK, | 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 | * Read-ahead will be disabled because @c->bdi.ra_pages is 0. | 1966 | * Read-ahead will be disabled because @c->bdi.ra_pages is 0. |
| 1967 | */ | 1967 | */ |
| 1968 | c->bdi.name = "ubifs", | ||
| 1968 | c->bdi.capabilities = BDI_CAP_MAP_COPY; | 1969 | c->bdi.capabilities = BDI_CAP_MAP_COPY; |
| 1969 | c->bdi.unplug_io_fn = default_unplug_io_fn; | 1970 | c->bdi.unplug_io_fn = default_unplug_io_fn; |
| 1970 | err = bdi_init(&c->bdi); | 1971 | err = bdi_init(&c->bdi); |
| @@ -66,6 +66,8 @@ struct backing_dev_info { · 65 unmodified lines | |||
| 66 | void (*unplug_io_fn)(struct backing_dev_info *, struct page *); | 66 | void (*unplug_io_fn)(struct backing_dev_info *, struct page *); |
| 67 | void *unplug_io_data; | 67 | void *unplug_io_data; |
| 68 | 68 | ||
| 69 | char *name; | ||
| 70 | |||
| 69 | struct percpu_counter bdi_stat[NR_BDI_STAT_ITEMS]; | 71 | struct percpu_counter bdi_stat[NR_BDI_STAT_ITEMS]; |
| 70 | 72 | ||
| 71 | struct prop_local_percpu completions; | 73 | struct prop_local_percpu completions; |
| @@ -600,6 +600,7 @@ static struct inode_operations cgroup_dir_inode_operations; · 599 unmodified lines | |||
| 600 | static struct file_operations proc_cgroupstats_operations; | 600 | static struct file_operations proc_cgroupstats_operations; |
| 601 | 601 | ||
| 602 | static struct backing_dev_info cgroup_backing_dev_info = { | 602 | static struct backing_dev_info cgroup_backing_dev_info = { |
| 603 | .name = "cgroup", | ||
| 603 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK, | 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 | EXPORT_SYMBOL(default_unplug_io_fn); | 17 | EXPORT_SYMBOL(default_unplug_io_fn); |
| 18 | 18 | ||
| 19 | struct backing_dev_info default_backing_dev_info = { | 19 | struct backing_dev_info default_backing_dev_info = { |
| 20 | .name = "default", | ||
| 20 | .ra_pages = VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE, | 21 | .ra_pages = VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE, |
| 21 | .state = 0, | 22 | .state = 0, |
| 22 | .capabilities = BDI_CAP_MAP_COPY, | 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 | static struct backing_dev_info swap_backing_dev_info = { | 36 | static struct backing_dev_info swap_backing_dev_info = { |
| 37 | .name = "swap", | ||
| 37 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK | BDI_CAP_SWAP_BACKED, | 38 | .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK | BDI_CAP_SWAP_BACKED, |
| 38 | .unplug_io_fn = swap_unplug_io_fn, | 39 | .unplug_io_fn = swap_unplug_io_fn, |
| 39 | }; | 40 | }; |