On Mon, 24 Oct 2022 12:05:54 -0700 Stefan Roesch <shr@xxxxxxxxxxxx> wrote: > This adds a function to return the specified value for max_bytes. It > converts the stored max_ratio of the bdi to the corresponding bytes > value. It introduces the bdi_get_bytes helper function to do the > conversion. This is an approximation as it is based on the value that is > returned by global_dirty_limits(), which can change. The helper function > will also be used by the min_bytes bdi knob. > > --- 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 1000 for finer granularity. */ > #define BDI_RATIO_SCALE 10 > > +unsigned long long bdi_get_max_bytes(struct backing_dev_info *bdi); We don't use unsigned long long much. If you want a 64-bit unsigned, use u64? > +EXPORT_SYMBOL_GPL(bdi_get_max_bytes); Is this symbol to be used by modules?