History

writeback: remove bdi->congested_fn

Except for pktdvd, the only places setting congested bits are file systems that allocate their own backing_dev_info structures. And pktdvd is a deprecated driver that isn't useful in stack setup either. So remove the dead congested_fn stacking infrastructure.

Christoph Hellwig committed 6 years ago

Commit 21cf8661 parent 8c911f323 files · +1 −468Browse files

Showing the changes to include/linux (3 of 23 files). Show all

Unified · Split

3 files
  1. include/linux/backing-dev-defs.h +0 −4
  2. include/linux/backing-dev.h +0 −4
  3. include/linux/device-mapper.h +0 −11
include/linux/backing-dev-defs.h+0−4
@@ -33,8 +33,6 @@ enum wb_congested_state { · 32 unmodified lines
3333 WB_sync_congested, /* The sync queue is getting full */
3434 };
3535
36−typedef int (congested_fn)(void *, int);
37−
3836 enum wb_stat_item {
3937 WB_RECLAIMABLE,
4038 WB_WRITEBACK,
@@ -170,8 +168,6 @@ struct backing_dev_info { · 129 unmodified lines
170168 struct list_head bdi_list;
171169 unsigned long ra_pages; /* max readahead in PAGE_SIZE units */
172170 unsigned long io_pages; /* max allowed IO size */
173− congested_fn *congested_fn; /* Function pointer if device is md/dm */
174− void *congested_data; /* Pointer to aux data for congested func */
175171
176172 struct kref refcnt; /* Reference counter for the structure */
177173 unsigned int capabilities; /* Device capabilities */
include/linux/backing-dev.h+0−4
@@ -169,10 +169,6 @@ static inline struct backing_dev_info *inode_to_bdi(struct inode *inode) · 168 unmodified lines
169169
170170 static inline int wb_congested(struct bdi_writeback *wb, int cong_bits)
171171 {
172− struct backing_dev_info *bdi = wb->bdi;
173−
174− if (bdi->congested_fn)
175− return bdi->congested_fn(bdi->congested_data, cong_bits);
176172 return wb->congested & cong_bits;
177173 }
178174
include/linux/device-mapper.h+0−11
@@ -322,12 +322,6 @@ struct dm_target { · 321 unmodified lines
322322 bool discards_supported:1;
323323 };
324324
325−/* Each target can link one of these into the table */
326−struct dm_target_callbacks {
327− struct list_head list;
328− int (*congested_fn) (struct dm_target_callbacks *, int);
329−};
330−
331325 void *dm_per_bio_data(struct bio *bio, size_t data_size);
332326 struct bio *dm_bio_from_per_bio_data(void *data, size_t data_size);
333327 unsigned dm_bio_get_target_bio_nr(const struct bio *bio);
@@ -477,11 +471,6 @@ int dm_table_create(struct dm_table **result, fmode_t mode, · 143 unmodified lines
477471 int dm_table_add_target(struct dm_table *t, const char *type,
478472 sector_t start, sector_t len, char *params);
479473
480−/*
481− * Target_ctr should call this if it needs to add any callbacks.
482− */
483−void dm_table_add_target_callbacks(struct dm_table *t, struct dm_target_callbacks *cb);
484−
485474 /*
486475 * Target can use this to set the table's type.
487476 * Can only ever be called from a target's ctr.