Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105808121
D11096.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D11096.diff
View Options
Index: head/sys/kern/subr_blist.c
===================================================================
--- head/sys/kern/subr_blist.c
+++ head/sys/kern/subr_blist.c
@@ -127,8 +127,8 @@
daddr_t radix, int skip, daddr_t blk);
static void blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix,
daddr_t skip, blist_t dest, daddr_t count);
-static int blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count);
-static int blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count,
+static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count);
+static daddr_t blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count,
daddr_t radix, int skip, daddr_t blk);
static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix,
int skip, daddr_t count);
@@ -248,10 +248,10 @@
* actually filled that were free before the call.
*/
-int
+daddr_t
blist_fill(blist_t bl, daddr_t blkno, daddr_t count)
{
- int filled;
+ daddr_t filled;
if (bl) {
if (bl->bl_radix == BLIST_BMAP_RADIX)
@@ -726,11 +726,11 @@
* the number of blocks allocated by the call.
*/
-static int
+static daddr_t
blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count)
{
int n = blk & (BLIST_BMAP_RADIX - 1);
- int nblks;
+ daddr_t nblks;
u_daddr_t mask, bitmap;
mask = ((u_daddr_t)-1 << n) &
@@ -753,7 +753,7 @@
* range must be within the extent of this node. Returns the
* number of blocks allocated by the call.
*/
-static int
+static daddr_t
blst_meta_fill(
blmeta_t *scan,
daddr_t allocBlk,
@@ -764,7 +764,7 @@
) {
int i;
int next_skip = ((u_int)skip / BLIST_META_RADIX);
- int nblks = 0;
+ daddr_t nblks = 0;
if (count > radix)
panic("blist_meta_fill: allocation too large");
@@ -1047,8 +1047,8 @@
break;
case 'l':
if (sscanf(buf + 1, "%llx %lld", &da, &count) == 2) {
- printf(" n=%d\n",
- blist_fill(bl, da, count));
+ printf(" n=%jd\n",
+ (intmax_t)blist_fill(bl, da, count));
} else {
printf("?\n");
}
Index: head/sys/sys/blist.h
===================================================================
--- head/sys/sys/blist.h
+++ head/sys/sys/blist.h
@@ -96,7 +96,7 @@
extern void blist_destroy(blist_t blist);
extern daddr_t blist_alloc(blist_t blist, daddr_t count);
extern void blist_free(blist_t blist, daddr_t blkno, daddr_t count);
-extern int blist_fill(blist_t bl, daddr_t blkno, daddr_t count);
+extern daddr_t blist_fill(blist_t bl, daddr_t blkno, daddr_t count);
extern void blist_print(blist_t blist);
extern void blist_resize(blist_t *pblist, daddr_t count, int freenew, int flags);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 12:01 AM (21 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15549034
Default Alt Text
D11096.diff (2 KB)
Attached To
Mode
D11096: blist_fill()'s return type is too narrow
Attached
Detach File
Event Timeline
Log In to Comment