diff options
| author | Jan Kara <jack@suse.cz> | 2017-04-12 06:24:25 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@fb.com> | 2017-04-20 14:09:55 -0400 |
| commit | baf7a616d537f577d33b7d9986f40532e2bd9f66 (patch) | |
| tree | 3eaedfef1afdc00ab57824802669d0f3f5a70d5e /include/linux/backing-dev.h | |
| parent | 2bc19cd5fdb5ff2c681761e81cc9044eb2ee753a (diff) | |
bdi: Provide bdi_register_va() and bdi_alloc()
Add function that registers bdi and takes va_list instead of variable
number of arguments.
Add bdi_alloc() as simple wrapper for NUMA-unaware users allocating BDI.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/backing-dev.h')
| -rw-r--r-- | include/linux/backing-dev.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index c52a48cb9a66..47a98e6e2a65 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
| @@ -30,6 +30,8 @@ void bdi_put(struct backing_dev_info *bdi); | |||
| 30 | __printf(3, 4) | 30 | __printf(3, 4) |
| 31 | int bdi_register(struct backing_dev_info *bdi, struct device *parent, | 31 | int bdi_register(struct backing_dev_info *bdi, struct device *parent, |
| 32 | const char *fmt, ...); | 32 | const char *fmt, ...); |
| 33 | int bdi_register_va(struct backing_dev_info *bdi, struct device *parent, | ||
| 34 | const char *fmt, va_list args); | ||
| 33 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); | 35 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); |
| 34 | int bdi_register_owner(struct backing_dev_info *bdi, struct device *owner); | 36 | int bdi_register_owner(struct backing_dev_info *bdi, struct device *owner); |
| 35 | void bdi_unregister(struct backing_dev_info *bdi); | 37 | void bdi_unregister(struct backing_dev_info *bdi); |
| @@ -37,6 +39,10 @@ void bdi_unregister(struct backing_dev_info *bdi); | |||
| 37 | int __must_check bdi_setup_and_register(struct backing_dev_info *, char *); | 39 | int __must_check bdi_setup_and_register(struct backing_dev_info *, char *); |
| 38 | void bdi_destroy(struct backing_dev_info *bdi); | 40 | void bdi_destroy(struct backing_dev_info *bdi); |
| 39 | struct backing_dev_info *bdi_alloc_node(gfp_t gfp_mask, int node_id); | 41 | struct backing_dev_info *bdi_alloc_node(gfp_t gfp_mask, int node_id); |
| 42 | static inline struct backing_dev_info *bdi_alloc(gfp_t gfp_mask) | ||
| 43 | { | ||
| 44 | return bdi_alloc_node(gfp_mask, NUMA_NO_NODE); | ||
| 45 | } | ||
| 40 | 46 | ||
| 41 | void wb_start_writeback(struct bdi_writeback *wb, long nr_pages, | 47 | void wb_start_writeback(struct bdi_writeback *wb, long nr_pages, |
| 42 | bool range_cyclic, enum wb_reason reason); | 48 | bool range_cyclic, enum wb_reason reason); |
