diff options
author | Stefan Roesch <shr@devkernel.io> | 2022-11-18 16:52:05 -0800 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-11-30 15:59:05 -0800 |
commit | 712c00d66a342a3ed375df41c3df7d3d2abad2c0 (patch) | |
tree | 493b209f1e7a446e28adcf656f3126ee307551ff /include | |
parent | c354d9268d7825eb8643f658c5091079d4f11a4a (diff) | |
download | linux-stable-712c00d66a342a3ed375df41c3df7d3d2abad2c0.tar.gz linux-stable-712c00d66a342a3ed375df41c3df7d3d2abad2c0.tar.bz2 linux-stable-712c00d66a342a3ed375df41c3df7d3d2abad2c0.zip |
mm: add bdi_get_min_bytes() function
This adds a function to return the specified value for min_bytes. It
converts the stored min_ratio of the bdi to the corresponding bytes
value. This is an approximation as it is based on the value that is
returned by global_dirty_limits(), which can change. The returned
value can be different than the value when the min_bytes value was set.
Link: https://lkml.kernel.org/r/20221119005215.3052436-11-shr@devkernel.io
Signed-off-by: Stefan Roesch <shr@devkernel.io>
Cc: Chris Mason <clm@meta.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/backing-dev.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index ea6c993433d5..8e04567727e6 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h @@ -105,6 +105,7 @@ static inline unsigned long wb_stat_error(void) /* BDI ratio is expressed as part per 1000000 for finer granularity. */ #define BDI_RATIO_SCALE 10000 +u64 bdi_get_min_bytes(struct backing_dev_info *bdi); u64 bdi_get_max_bytes(struct backing_dev_info *bdi); int bdi_set_min_ratio(struct backing_dev_info *bdi, unsigned int min_ratio); int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio); |