History

writeback: add name to backing_dev_info

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.

Jens Axboe committed 17 years ago

Commit d9938311 parent f09b00d17 files · +18 −0Browse files

Unified · Split

17 files
  1. block/blk-core.c +1 −0
  2. drivers/block/aoe/aoeblk.c +1 −0
  3. drivers/char/mem.c +1 −0
  4. fs/btrfs/disk-io.c +1 −0
  5. fs/char_dev.c +1 −0
  6. fs/configfs/inode.c +1 −0
  7. fs/fuse/inode.c +1 −0
  8. fs/hugetlbfs/inode.c +1 −0
  9. fs/nfs/client.c +1 −0
  10. fs/ocfs2/dlm/dlmfs.c +1 −0
  11. fs/ramfs/inode.c +1 −0
  12. fs/sysfs/inode.c +1 −0
  13. fs/ubifs/super.c +1 −0
  14. include/linux/backing-dev.h +2 −0
  15. kernel/cgroup.c +1 −0
  16. mm/backing-dev.c +1 −0
  17. mm/swap_state.c +1 −0
block/blk-core.c+1−0
@@ -501,6 +501,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id) · 500 unmodified lines
501501 (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE;
502502 q->backing_dev_info.state = 0;
503503 q->backing_dev_info.capabilities = BDI_CAP_MAP_COPY;
504+ q->backing_dev_info.name = "block";
504505
505506 err = bdi_init(&q->backing_dev_info);
506507 if (err) {
drivers/block/aoe/aoeblk.c+1−0
@@ -268,6 +268,7 @@ aoeblk_gdalloc(void *vp) · 267 unmodified lines
268268 if (!d->blkq)
269269 goto err_mempool;
270270 blk_queue_make_request(d->blkq, aoeblk_make_request);
271+ d->blkq->backing_dev_info.name = "aoe";
271272 if (bdi_init(&d->blkq->backing_dev_info))
272273 goto err_blkq;
273274 spin_lock_irqsave(&d->lock, flags);
drivers/char/mem.c+1−0
@@ -822,6 +822,7 @@ static const struct file_operations zero_fops = { · 821 unmodified lines
822822 * - permits private mappings, "copies" are taken of the source of zeros
823823 */
824824 static struct backing_dev_info zero_bdi = {
825+ .name = "char/mem",
825826 .capabilities = BDI_CAP_MAP_COPY,
826827 };
827828
fs/btrfs/disk-io.c+1−0
@@ -1352,6 +1352,7 @@ static int setup_bdi(struct btrfs_fs_info *info, struct backing_dev_info *bdi) · 1351 unmodified lines
13521352 {
13531353 int err;
13541354
1355+ bdi->name = "btrfs";
13551356 bdi->capabilities = BDI_CAP_MAP_COPY;
13561357 err = bdi_init(bdi);
13571358 if (err)
fs/char_dev.c+1−0
@@ -31,6 +31,7 @@ · 30 unmodified lines
3131 * - no readahead or I/O queue unplugging required
3232 */
3333 struct backing_dev_info directly_mappable_cdev_bdi = {
34+ .name = "char",
3435 .capabilities = (
3536 #ifdef CONFIG_MMU
3637 /* permit private copies of the data to be taken */
fs/configfs/inode.c+1−0
@@ -51,6 +51,7 @@ static const struct address_space_operations configfs_aops = { · 50 unmodified lines
5151 };
5252
5353 static struct backing_dev_info configfs_backing_dev_info = {
54+ .name = "configfs",
5455 .ra_pages = 0, /* No readahead */
5556 .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK,
5657 };
fs/fuse/inode.c+1−0
@@ -801,6 +801,7 @@ static int fuse_bdi_init(struct fuse_conn *fc, struct super_block *sb) · 800 unmodified lines
801801 {
802802 int err;
803803
804+ fc->bdi.name = "fuse";
804805 fc->bdi.ra_pages = (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE;
805806 fc->bdi.unplug_io_fn = default_unplug_io_fn;
806807 /* fuse does it's own writeback accounting */
fs/hugetlbfs/inode.c+1−0
@@ -44,6 +44,7 @@ static const struct inode_operations hugetlbfs_dir_inode_operations; · 43 unmodified lines
4444 static const struct inode_operations hugetlbfs_inode_operations;
4545
4646 static struct backing_dev_info hugetlbfs_backing_dev_info = {
47+ .name = "hugetlbfs",
4748 .ra_pages = 0, /* No readahead */
4849 .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK,
4950 };
fs/nfs/client.c+1−0
@@ -879,6 +879,7 @@ static void nfs_server_set_fsinfo(struct nfs_server *server, struct nfs_fsinfo * · 878 unmodified lines
879879 server->rsize = NFS_MAX_FILE_IO_SIZE;
880880 server->rpages = (server->rsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
881881
882+ server->backing_dev_info.name = "nfs";
882883 server->backing_dev_info.ra_pages = server->rpages * NFS_MAX_READAHEAD;
883884
884885 if (server->wsize > max_rpc_payload)
fs/ocfs2/dlm/dlmfs.c+1−0
@@ -325,6 +325,7 @@ clear_fields: · 324 unmodified lines
325325 }
326326
327327 static struct backing_dev_info dlmfs_backing_dev_info = {
328+ .name = "ocfs2-dlmfs",
328329 .ra_pages = 0, /* No readahead */
329330 .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK,
330331 };
fs/ramfs/inode.c+1−0
@@ -46,6 +46,7 @@ static const struct super_operations ramfs_ops; · 45 unmodified lines
4646 static const struct inode_operations ramfs_dir_inode_operations;
4747
4848 static struct backing_dev_info ramfs_backing_dev_info = {
49+ .name = "ramfs",
4950 .ra_pages = 0, /* No readahead */
5051 .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK |
5152 BDI_CAP_MAP_DIRECT | BDI_CAP_MAP_COPY |
fs/sysfs/inode.c+1−0
@@ -29,6 +29,7 @@ static const struct address_space_operations sysfs_aops = { · 28 unmodified lines
2929 };
3030
3131 static struct backing_dev_info sysfs_backing_dev_info = {
32+ .name = "sysfs",
3233 .ra_pages = 0, /* No readahead */
3334 .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK,
3435 };
fs/ubifs/super.c+1−0
@@ -1965,6 +1965,7 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent) · 1964 unmodified lines
19651965 *
19661966 * Read-ahead will be disabled because @c->bdi.ra_pages is 0.
19671967 */
1968+ c->bdi.name = "ubifs",
19681969 c->bdi.capabilities = BDI_CAP_MAP_COPY;
19691970 c->bdi.unplug_io_fn = default_unplug_io_fn;
19701971 err = bdi_init(&c->bdi);
include/linux/backing-dev.h+2−0
@@ -66,6 +66,8 @@ struct backing_dev_info { · 65 unmodified lines
6666 void (*unplug_io_fn)(struct backing_dev_info *, struct page *);
6767 void *unplug_io_data;
6868
69+ char *name;
70+
6971 struct percpu_counter bdi_stat[NR_BDI_STAT_ITEMS];
7072
7173 struct prop_local_percpu completions;
kernel/cgroup.c+1−0
@@ -600,6 +600,7 @@ static struct inode_operations cgroup_dir_inode_operations; · 599 unmodified lines
600600 static struct file_operations proc_cgroupstats_operations;
601601
602602 static struct backing_dev_info cgroup_backing_dev_info = {
603+ .name = "cgroup",
603604 .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK,
604605 };
605606
mm/backing-dev.c+1−0
@@ -17,6 +17,7 @@ void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page) · 16 unmodified lines
1717 EXPORT_SYMBOL(default_unplug_io_fn);
1818
1919 struct backing_dev_info default_backing_dev_info = {
20+ .name = "default",
2021 .ra_pages = VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE,
2122 .state = 0,
2223 .capabilities = BDI_CAP_MAP_COPY,
mm/swap_state.c+1−0
@@ -34,6 +34,7 @@ static const struct address_space_operations swap_aops = { · 33 unmodified lines
3434 };
3535
3636 static struct backing_dev_info swap_backing_dev_info = {
37+ .name = "swap",
3738 .capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK | BDI_CAP_SWAP_BACKED,
3839 .unplug_io_fn = swap_unplug_io_fn,
3940 };

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t