Changeset 40949d5 in mainline
- Timestamp:
- 2011-05-02T18:55:36Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c2fcfc0
- Parents:
- fdc05ca
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/minixfs/mfs_balloc.c
rfdc05ca r40949d5 128 128 on_error(r, goto out); 129 129 130 unsigned tmp = *search % bits_per_block; 131 130 132 freebit = find_free_bit_and_set(b->data, sbi->block_size, 131 sbi->native, *search);133 sbi->native, tmp); 132 134 if (freebit == -1) { 133 135 /*No free bit in this block*/ … … 138 140 /*Free bit found in this block, compute the real index*/ 139 141 *idx = freebit + bits_per_block * i; 140 *idx += (bid == BMAP_INODE) ;142 *idx += (bid == BMAP_INODE) ? 1 : 0; 141 143 mfsdebug("alloc index %d %d\n", (int) *idx, i); 142 144 if (*idx > limit) { … … 175 177 const size_t chunk_bits = sizeof(bitchunk_t) * 8; 176 178 177 for (i = start_bit / sizeof(uint32_t);178 i < bsize / sizeof( uint32_t); ++i) {179 for (i = start_bit / chunk_bits; 180 i < bsize / sizeof(bitchunk_t); ++i) { 179 181 if (!(~b[i])) { 180 182 /*No free bit in this chunk*/
Note:
See TracChangeset
for help on using the changeset viewer.