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.
Showing the changes to include/linux (3 of 23 files). Show all
Unified · Split
| @@ -33,8 +33,6 @@ enum wb_congested_state { · 32 unmodified lines | |||
| 33 | WB_sync_congested, /* The sync queue is getting full */ | 33 | WB_sync_congested, /* The sync queue is getting full */ |
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| 36 | typedef int (congested_fn)(void *, int); | ||
| 37 | |||
| 38 | enum wb_stat_item { | 36 | enum wb_stat_item { |
| 39 | WB_RECLAIMABLE, | 37 | WB_RECLAIMABLE, |
| 40 | WB_WRITEBACK, | 38 | WB_WRITEBACK, |
| @@ -170,8 +168,6 @@ struct backing_dev_info { · 129 unmodified lines | |||
| 170 | struct list_head bdi_list; | 168 | struct list_head bdi_list; |
| 171 | unsigned long ra_pages; /* max readahead in PAGE_SIZE units */ | 169 | unsigned long ra_pages; /* max readahead in PAGE_SIZE units */ |
| 172 | unsigned long io_pages; /* max allowed IO size */ | 170 | 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 */ | ||
| 175 | 171 | ||
| 176 | struct kref refcnt; /* Reference counter for the structure */ | 172 | struct kref refcnt; /* Reference counter for the structure */ |
| 177 | unsigned int capabilities; /* Device capabilities */ | 173 | unsigned int capabilities; /* Device capabilities */ |
| @@ -169,10 +169,6 @@ static inline struct backing_dev_info *inode_to_bdi(struct inode *inode) · 168 unmodified lines | |||
| 169 | 169 | ||
| 170 | static inline int wb_congested(struct bdi_writeback *wb, int cong_bits) | 170 | static inline int wb_congested(struct bdi_writeback *wb, int cong_bits) |
| 171 | { | 171 | { |
| 172 | struct backing_dev_info *bdi = wb->bdi; | ||
| 173 | |||
| 174 | if (bdi->congested_fn) | ||
| 175 | return bdi->congested_fn(bdi->congested_data, cong_bits); | ||
| 176 | return wb->congested & cong_bits; | 172 | return wb->congested & cong_bits; |
| 177 | } | 173 | } |
| 178 | 174 | ||
| @@ -322,12 +322,6 @@ struct dm_target { · 321 unmodified lines | |||
| 322 | bool discards_supported:1; | 322 | bool discards_supported:1; |
| 323 | }; | 323 | }; |
| 324 | 324 | ||
| 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 | |||
| 331 | void *dm_per_bio_data(struct bio *bio, size_t data_size); | 325 | void *dm_per_bio_data(struct bio *bio, size_t data_size); |
| 332 | struct bio *dm_bio_from_per_bio_data(void *data, size_t data_size); | 326 | struct bio *dm_bio_from_per_bio_data(void *data, size_t data_size); |
| 333 | unsigned dm_bio_get_target_bio_nr(const struct bio *bio); | 327 | 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 | |||
| 477 | int dm_table_add_target(struct dm_table *t, const char *type, | 471 | int dm_table_add_target(struct dm_table *t, const char *type, |
| 478 | sector_t start, sector_t len, char *params); | 472 | sector_t start, sector_t len, char *params); |
| 479 | 473 | ||
| 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 | |||
| 485 | /* | 474 | /* |
| 486 | * Target can use this to set the table's type. | 475 | * Target can use this to set the table's type. |
| 487 | * Can only ever be called from a target's ctr. | 476 | * Can only ever be called from a target's ctr. |