|
|
| version 1.107, 2007/05/11 06:05:23 | version 1.108, 2007/11/02 03:08:06 |
|---|---|
| Line 73 STATIC int xfs_rtmodify_summary(xfs_moun | Line 73 STATIC int xfs_rtmodify_summary(xfs_moun |
| */ | */ |
| /* | /* |
| * xfs_lowbit32: get low bit set out of 32-bit argument, -1 if none set. | |
| */ | |
| STATIC int | |
| xfs_lowbit32( | |
| __uint32_t v) | |
| { | |
| if (v) | |
| return ffs(v) - 1; | |
| return -1; | |
| } | |
| /* | |
| * Allocate space to the bitmap or summary file, and zero it, for growfs. | * Allocate space to the bitmap or summary file, and zero it, for growfs. |
| */ | */ |
| STATIC int /* error */ | STATIC int /* error */ |
| Line 444 xfs_rtallocate_extent_near( | Line 432 xfs_rtallocate_extent_near( |
| } | } |
| bbno = XFS_BITTOBLOCK(mp, bno); | bbno = XFS_BITTOBLOCK(mp, bno); |
| i = 0; | i = 0; |
| ASSERT(minlen != 0); | |
| log2len = xfs_highbit32(minlen); | log2len = xfs_highbit32(minlen); |
| /* | /* |
| * Loop over all bitmap blocks (bbno + i is current block). | * Loop over all bitmap blocks (bbno + i is current block). |
| Line 612 xfs_rtallocate_extent_size( | Line 601 xfs_rtallocate_extent_size( |
| xfs_suminfo_t sum; /* summary information for extents */ | xfs_suminfo_t sum; /* summary information for extents */ |
| ASSERT(minlen % prod == 0 && maxlen % prod == 0); | ASSERT(minlen % prod == 0 && maxlen % prod == 0); |
| ASSERT(maxlen != 0); | |
| /* | /* |
| * Loop over all the levels starting with maxlen. | * Loop over all the levels starting with maxlen. |
| * At each level, look at all the bitmap blocks, to see if there | * At each level, look at all the bitmap blocks, to see if there |
| Line 669 xfs_rtallocate_extent_size( | Line 660 xfs_rtallocate_extent_size( |
| *rtblock = NULLRTBLOCK; | *rtblock = NULLRTBLOCK; |
| return 0; | return 0; |
| } | } |
| ASSERT(minlen != 0); | |
| ASSERT(maxlen != 0); | |
| /* | /* |
| * Loop over sizes, from maxlen down to minlen. | * Loop over sizes, from maxlen down to minlen. |
| * This time, when we do the allocations, allow smaller ones | * This time, when we do the allocations, allow smaller ones |
| Line 1954 xfs_growfs_rt( | Line 1948 xfs_growfs_rt( |
| nsbp->sb_blocksize * nsbp->sb_rextsize); | nsbp->sb_blocksize * nsbp->sb_rextsize); |
| nsbp->sb_rextents = nsbp->sb_rblocks; | nsbp->sb_rextents = nsbp->sb_rblocks; |
| do_div(nsbp->sb_rextents, nsbp->sb_rextsize); | do_div(nsbp->sb_rextents, nsbp->sb_rextsize); |
| ASSERT(nsbp->sb_rextents != 0); | |
| nsbp->sb_rextslog = xfs_highbit32(nsbp->sb_rextents); | nsbp->sb_rextslog = xfs_highbit32(nsbp->sb_rextents); |
| nrsumlevels = nmp->m_rsumlevels = nsbp->sb_rextslog + 1; | nrsumlevels = nmp->m_rsumlevels = nsbp->sb_rextslog + 1; |
| nrsumsize = | nrsumsize = |