Page MenuHomeFreeBSD

D20893.diff
No OneTemporary

D20893.diff

Index: head/sys/kern/subr_blist.c
===================================================================
--- head/sys/kern/subr_blist.c
+++ head/sys/kern/subr_blist.c
@@ -639,15 +639,27 @@
* bitpos() returns zero here.
*/
avail = blk - start + bitpos(~scan->bm_bitmap);
- if (avail < count) {
+ if (avail < count || avail == 0) {
/*
* There isn't a next leaf with enough free
- * blocks at its beginning to complete the
- * spanning allocation.
+ * blocks at its beginning to bother
+ * allocating.
*/
return (avail);
}
maxcount = imin(avail, maxcount);
+ if (maxcount % BLIST_BMAP_RADIX == 0) {
+ /*
+ * There was no next leaf. Back scan up to
+ * last leaf.
+ */
+ --scan;
+ while (radix != BLIST_BMAP_RADIX) {
+ radix /= BLIST_META_RADIX;
+ --scan;
+ }
+ blk -= BLIST_BMAP_RADIX;
+ }
}
}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 21, 11:24 PM (5 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25826689
Default Alt Text
D20893.diff (900 B)

Event Timeline