Changeset 1433ecda in mainline for uspace/lib/block
- Timestamp:
- 2018-04-04T15:42:37Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2c4e1cc
- Parents:
- 47b2d7e3
- File:
-
- 1 edited
-
uspace/lib/block/block.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/block/block.c
r47b2d7e3 r1433ecda 225 225 rc = read_blocks(devcon, 0, 1, bb_buf, devcon->pblock_size); 226 226 if (rc != EOK) { 227 free(bb_buf);227 free(bb_buf); 228 228 return rc; 229 229 } … … 244 244 static size_t cache_key_hash(void *key) 245 245 { 246 aoff64_t *lba = (aoff64_t *)key;246 aoff64_t *lba = (aoff64_t *)key; 247 247 return *lba; 248 248 } … … 256 256 static bool cache_key_equal(void *key, const ht_link_t *item) 257 257 { 258 aoff64_t *lba = (aoff64_t *)key;258 aoff64_t *lba = (aoff64_t *)key; 259 259 block_t *b = hash_table_get_inst(item, block_t, hash_link); 260 260 return b->lba == *lba; … … 417 417 ht_link_t *hlink = hash_table_find(&cache->block_hash, &ba); 418 418 if (hlink) { 419 found:419 found: 420 420 /* 421 421 * We found the block in the cache. … … 453 453 * Try to recycle a block from the free list. 454 454 */ 455 recycle:455 recycle: 456 456 if (list_empty(&cache->free_list)) { 457 457 fibril_mutex_unlock(&cache->lock); … … 491 491 } else { 492 492 printf("Too many errors writing block %" 493 PRIuOFF64 "from device handle %" PRIun "\n"493 PRIuOFF64 "from device handle %" PRIun "\n" 494 494 "SEVERE DATA LOSS POSSIBLE\n", 495 b->lba, devcon->service_id);495 b->lba, devcon->service_id); 496 496 } 497 497 } else … … 649 649 } else { 650 650 printf("Too many errors writing block %" 651 PRIuOFF64 "from device handle %" PRIun "\n"651 PRIuOFF64 "from device handle %" PRIun "\n" 652 652 "SEVERE DATA LOSS POSSIBLE\n", 653 block->lba, devcon->service_id);653 block->lba, devcon->service_id); 654 654 } 655 655 }
Note:
See TracChangeset
for help on using the changeset viewer.
