Changeset cf2af94 in mainline for uspace/lib/block/libblock.c
- Timestamp:
- 2011-02-09T11:46:47Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cb15135a
- Parents:
- a49c4002 (diff), 0b37882 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/block/libblock.c
ra49c4002 rcf2af94 44 44 #include <sys/mman.h> 45 45 #include <async.h> 46 #include <ipc/ipc.h>47 46 #include <as.h> 48 47 #include <assert.h> … … 177 176 if (rc != EOK) { 178 177 munmap(comm_area, comm_size); 179 ipc_hangup(dev_phone);178 async_hangup(dev_phone); 180 179 return rc; 181 180 } … … 183 182 if (get_block_size(dev_phone, &bsize) != EOK) { 184 183 munmap(comm_area, comm_size); 185 ipc_hangup(dev_phone);184 async_hangup(dev_phone); 186 185 return rc; 187 186 } … … 190 189 if (rc != EOK) { 191 190 munmap(comm_area, comm_size); 192 ipc_hangup(dev_phone);191 async_hangup(dev_phone); 193 192 return rc; 194 193 } … … 211 210 212 211 munmap(devcon->comm_area, devcon->comm_size); 213 ipc_hangup(devcon->dev_phone);212 async_hangup(devcon->dev_phone); 214 213 215 214 free(devcon); … … 295 294 296 295 /* Allow 1:1 or small-to-large block size translation */ 297 if (cache->lblock_size % devcon->pblock_size != 0) 296 if (cache->lblock_size % devcon->pblock_size != 0) { 297 free(cache); 298 298 return ENOTSUP; 299 } 299 300 300 301 cache->blocks_cluster = cache->lblock_size / devcon->pblock_size; … … 437 438 if (!b->data) { 438 439 free(b); 440 b = NULL; 439 441 goto recycle; 440 442 } … … 564 566 assert(devcon); 565 567 assert(devcon->cache); 568 assert(block->refcnt >= 1); 566 569 567 570 cache = devcon->cache; … … 623 626 unsigned long key = block->lba; 624 627 hash_table_remove(&cache->block_hash, &key, 1); 628 free(block->data); 625 629 free(block); 626 free(block->data);627 630 cache->blocks_cached--; 628 631 fibril_mutex_unlock(&cache->lock); … … 862 865 static int get_block_size(int dev_phone, size_t *bsize) 863 866 { 864 ipcarg_t bs;867 sysarg_t bs; 865 868 int rc; 866 869 … … 875 878 static int get_num_blocks(int dev_phone, aoff64_t *nblocks) 876 879 { 877 ipcarg_t nb_l, nb_h;880 sysarg_t nb_l, nb_h; 878 881 int rc; 879 882
Note:
See TracChangeset
for help on using the changeset viewer.