Changeset a900fb1 in mainline
- Timestamp:
- 2011-04-17T18:37:36Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9e2d6dc
- Parents:
- 6fcc03a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/minixfs/mfs_balloc.c
r6fcc03a ra900fb1 142 142 143 143 /*Free bit found in this block, compute the real index*/ 144 *idx = (freebit + bits_per_block * i); 144 *idx = freebit + bits_per_block * i; 145 *idx += (bid == BMAP_INODE); 146 mfsdebug("alloc index %d %d\n", (int) *idx, i); 145 147 if (*idx > limit) { 146 148 /*Index is beyond the limit, it is invalid*/ … … 180 182 const size_t chunk_bits = sizeof(bitchunk_t) * 8; 181 183 182 for (i = start_bit; i < bsize / sizeof(uint32_t); ++i) { 184 for (i = start_bit / sizeof(uint32_t); 185 i < bsize / sizeof(uint32_t); ++i) { 183 186 if (!(~b[i])) { 184 187 /*No free bit in this chunk*/ … … 189 192 190 193 for (j = 0; j < chunk_bits; ++j) { 191 if (chunk & (1 << j)) { 194 if (!(chunk & (1 << j))) { 195 mfsdebug("i = %d j = %d\n", i, j); 192 196 r = i * chunk_bits + j; 193 197 chunk |= 1 << j;
Note:
See TracChangeset
for help on using the changeset viewer.