Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151912411
D20229.id57281.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
868 B
Referenced Files
None
Subscribers
None
D20229.id57281.diff
View Options
Index: head/sys/kern/subr_blist.c
===================================================================
--- head/sys/kern/subr_blist.c
+++ head/sys/kern/subr_blist.c
@@ -607,7 +607,6 @@
blst_next_leaf_alloc(blmeta_t *scan, daddr_t blk, int count)
{
blmeta_t *next;
- daddr_t skip;
u_daddr_t radix;
int digit;
@@ -632,13 +631,14 @@
/*
* Update bitmaps of next-ancestors, up to least common ancestor.
*/
- skip = radix_to_skip(radix);
- while (radix != BLIST_BMAP_RADIX && next->bm_bitmap == 0) {
- (--next)->bm_bitmap ^= 1;
- radix /= BLIST_META_RADIX;
- }
- if (next->bm_bitmap == 0)
- scan[-digit * skip].bm_bitmap ^= (u_daddr_t)1 << digit;
+ while (next->bm_bitmap == 0) {
+ if (--next == scan) {
+ scan[-digit * radix_to_skip(radix)].bm_bitmap ^=
+ (u_daddr_t)1 << digit;
+ break;
+ }
+ next->bm_bitmap ^= 1;
+ }
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 12, 12:16 PM (4 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31347607
Default Alt Text
D20229.id57281.diff (868 B)
Attached To
Mode
D20229: Avoid unnecessary calculation in blst_next_leaf_alloc
Attached
Detach File
Event Timeline
Log In to Comment