Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137003660
D20893.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
900 B
Referenced Files
None
Subscribers
None
D20893.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D20893: Fix a next_leaf bug
Attached
Detach File
Event Timeline
Log In to Comment