} else {
/* ...and that group is out of reach for everyone else */
supply -= min(supply, dedicated);
+ /*
+ * An allocation of @bytes that opens a run claims
+ * round_up(bytes, unit) whole stripes. A delalloc write's
+ * margin (below) covers that for itself, but a
+ * preallocation holds no margin -- it has no outstanding
+ * extent -- and was admitted for its byte size alone, so
+ * each fallocate() short of a stripe took up to a stripe
+ * more than the gate had charged, out of the supply behind
+ * writes already admitted: at the fill edge those writes
+ * then found no stripe and were dropped. Charge the
+ * roundup. (The excess is not held past admission; a
+ * preallocation allocates in the same call.)
+ */
+ bytes = round_up(bytes, unit);
}
/*
* Every outstanding data extent holds a whole-stripe margin