Changeset a6ba0c9 in mainline


Ignore:
Timestamp:
2010-11-27T17:46:58Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d70d80ed
Parents:
f092718
Message:

Rename boff to (p)ba.

Location:
uspace/lib/block
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/block/libblock.c

    rf092718 ra6ba0c9  
    261261{
    262262        block_t *b = hash_table_get_instance(item, block_t, hash_link);
    263         return b->boff == *key;
     263        return b->lba == *key;
    264264}
    265265
     
    339339                }
    340340
    341                 unsigned long key = b->boff;
     341                unsigned long key = b->lba;
    342342                hash_table_remove(&cache->block_hash, &key, 1);
    343343               
     
    380380 *                              block pointer on success.
    381381 * @param devmap_handle         Device handle of the block device.
    382  * @param boff                  Block offset.
     382 * @param ba                    Block address (logical).
    383383 * @param flags                 If BLOCK_FLAGS_NOREAD is specified, block_get()
    384384 *                              will not read the contents of the block from the
     
    387387 * @return                      EOK on success or a negative error code.
    388388 */
    389 int block_get(block_t **block, devmap_handle_t devmap_handle, aoff64_t boff, int flags)
     389int block_get(block_t **block, devmap_handle_t devmap_handle, aoff64_t ba, int flags)
    390390{
    391391        devcon_t *devcon;
     
    393393        block_t *b;
    394394        link_t *l;
    395         unsigned long key = boff;
     395        unsigned long key = ba;
    396396        int rc;
    397397       
     
    501501                         */
    502502                        list_remove(&b->free_link);
    503                         temp_key = b->boff;
     503                        temp_key = b->lba;
    504504                        hash_table_remove(&cache->block_hash, &temp_key, 1);
    505505                }
     
    508508                b->devmap_handle = devmap_handle;
    509509                b->size = cache->lblock_size;
    510                 b->boff = boff;
    511                 b->pba = ba_ltop(devcon, b->boff);
     510                b->lba = ba;
     511                b->pba = ba_ltop(devcon, b->lba);
    512512                hash_table_insert(&cache->block_hash, &key, &b->hash_link);
    513513
     
    621621                         * Take the block out of the cache and free it.
    622622                         */
    623                         unsigned long key = block->boff;
     623                        unsigned long key = block->lba;
    624624                        hash_table_remove(&cache->block_hash, &key, 1);
    625625                        free(block);
     
    719719 *
    720720 * @param devmap_handle Device handle of the block device.
    721  * @param ba            Address of first block.
     721 * @param ba            Address of first block (physical).
    722722 * @param cnt           Number of blocks.
    723723 * @param src           Buffer for storing the data.
     
    747747 *
    748748 * @param devmap_handle Device handle of the block device.
    749  * @param ba            Address of first block.
     749 * @param ba            Address of first block (physical).
    750750 * @param cnt           Number of blocks.
    751751 * @param src           The data to be written.
  • uspace/lib/block/libblock.h

    rf092718 ra6ba0c9  
    7474        devmap_handle_t devmap_handle;
    7575        /** Logical block address */
    76         aoff64_t boff;
     76        aoff64_t lba;
    7777        /** Physical block address */
    7878        aoff64_t pba;
Note: See TracChangeset for help on using the changeset viewer.