mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
makefs/zfs: Use unsigned integers for indirect block level counts
No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
1e3214571b
commit
b5a2bf512d
|
@ -673,7 +673,7 @@ dnode_cursor_init(zfs_opt_t *zfs, zfs_objset_t *os, dnode_phys_t *dnode,
|
|||
}
|
||||
|
||||
static void
|
||||
_dnode_cursor_flush(zfs_opt_t *zfs, struct dnode_cursor *c, int levels)
|
||||
_dnode_cursor_flush(zfs_opt_t *zfs, struct dnode_cursor *c, unsigned int levels)
|
||||
{
|
||||
blkptr_t *bp, *pbp;
|
||||
void *buf;
|
||||
|
@ -685,7 +685,7 @@ _dnode_cursor_flush(zfs_opt_t *zfs, struct dnode_cursor *c, int levels)
|
|||
|
||||
blksz = MAXBLOCKSIZE;
|
||||
blkid = (c->dataoff / c->datablksz) / BLKPTR_PER_INDIR;
|
||||
for (int level = 1; level <= levels; level++) {
|
||||
for (unsigned int level = 1; level <= levels; level++) {
|
||||
buf = c->inddir[level - 1];
|
||||
|
||||
if (level == c->dnode->dn_nlevels - 1) {
|
||||
|
@ -724,7 +724,7 @@ blkptr_t *
|
|||
dnode_cursor_next(zfs_opt_t *zfs, struct dnode_cursor *c, off_t off)
|
||||
{
|
||||
off_t blkid, l1id;
|
||||
int levels;
|
||||
unsigned int levels;
|
||||
|
||||
if (c->dnode->dn_nlevels == 1) {
|
||||
assert(off < MAXBLOCKSIZE);
|
||||
|
@ -753,8 +753,9 @@ dnode_cursor_next(zfs_opt_t *zfs, struct dnode_cursor *c, off_t off)
|
|||
void
|
||||
dnode_cursor_finish(zfs_opt_t *zfs, struct dnode_cursor *c)
|
||||
{
|
||||
int levels;
|
||||
unsigned int levels;
|
||||
|
||||
assert(c->dnode->dn_nlevels > 0);
|
||||
levels = c->dnode->dn_nlevels - 1;
|
||||
if (levels > 0)
|
||||
_dnode_cursor_flush(zfs, c, levels);
|
||||
|
|
Loading…
Reference in a new issue