Changeset 78d50bd in mainline for uspace/lib/block


Ignore:
Timestamp:
2015-06-29T18:47:07Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3faa03d
Parents:
28ed0d95
Message:

Implement partition block device interface in VBD based on data from liblabel.

Location:
uspace/lib/block
Files:
2 edited

Legend:

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

    r28ed0d95 r78d50bd  
    789789}
    790790
     791/** Synchronize blocks to persistent storage.
     792 *
     793 * @param service_id    Service ID of the block device.
     794 * @param ba            Address of first block (physical).
     795 * @param cnt           Number of blocks.
     796 *
     797 * @return              EOK on success or negative error code on failure.
     798 */
     799int block_sync_cache(service_id_t service_id, aoff64_t ba, size_t cnt)
     800{
     801        devcon_t *devcon;
     802
     803        devcon = devcon_search(service_id);
     804        assert(devcon);
     805
     806        return bd_sync_cache(devcon->bd, ba, cnt);
     807}
     808
    791809/** Get device block size.
    792810 *
  • uspace/lib/block/block.h

    r28ed0d95 r78d50bd  
    120120extern int block_read_bytes_direct(service_id_t, aoff64_t, size_t, void *);
    121121extern int block_write_direct(service_id_t, aoff64_t, size_t, const void *);
     122extern int block_sync_cache(service_id_t, aoff64_t, size_t);
    122123
    123124#endif
Note: See TracChangeset for help on using the changeset viewer.