Check free space available in dst before commencing plot#968
Check free space available in dst before commencing plot#968graemes wants to merge 6 commits intoericaltendorf:developmentfrom
Conversation
altendky
left a comment
There was a problem hiding this comment.
As I recall, the basic problem is that by the time the plot is done a transfer may have completed and freed up space. Maybe this needs to be optional? Also, dst is tmp for me so if we're checking space we need enough space for both things to avoid the general case of failing a plot for being out of space.
src/plotman/manager.py
Outdated
| if plotting_cfg.bladebit is None: | ||
| raise Exception( | ||
| "bladebit plotter selected but not configured, report this as a plotman bug", | ||
| if plot_util.df_b(dstdir) > plot_util.get_plotsize(32): |
There was a problem hiding this comment.
What if we invert this check and just return in that case and then avoid indenting everything else?
There was a problem hiding this comment.
Makes sense. Have also added a check for tmp/dst and space required.
There was a problem hiding this comment.
re: your first comment - the newly freed space will be detected on a subsequent check (after the appropriate refresh time)?
A small tweak to check that there is sufficient space free in the dst folder to receive a new plot.
This prevents the loop where a new plot is started only to fail because of a lack of space for the output and then repeats endlessly wasting power etc.