Changeset 1787e527 in mainline for uspace/lib/libblock/libblock.h


Ignore:
Timestamp:
2009-11-16T21:22:54Z (15 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5ebdf94
Parents:
fcbd1be (diff), 9c70ed6 (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.
Message:

merged with head (unstable)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libblock/libblock.h

    rfcbd1be r1787e527  
    6060#define BLOCK_FLAGS_NOREAD      1
    6161
    62 typedef unsigned bn_t;  /**< Block number type. */
     62typedef uint64_t bn_t;  /**< Block number type. */
    6363
    6464typedef struct block {
     
    6969        /** If true, the block needs to be written back to the block device. */
    7070        bool dirty;
     71        /** If true, the blcok does not contain valid data. */
     72        bool toxic;
    7173        /** Readers / Writer lock protecting the contents of the block. */
    7274        fibril_rwlock_t contents_lock;
     
    9698extern void block_fini(dev_handle_t);
    9799
    98 extern int block_bb_read(dev_handle_t, off_t, size_t);
     100extern int block_bb_read(dev_handle_t, bn_t);
    99101extern void *block_bb_get(dev_handle_t);
    100102
    101103extern int block_cache_init(dev_handle_t, size_t, unsigned, enum cache_mode);
    102104
    103 extern block_t *block_get(dev_handle_t, bn_t, int);
    104 extern void block_put(block_t *);
     105extern int block_get(block_t **, dev_handle_t, bn_t, int);
     106extern int block_put(block_t *);
    105107
    106108extern int block_seqread(dev_handle_t, off_t *, size_t *, off_t *, void *,
    107     size_t, size_t);
     109    size_t);
     110
     111extern int block_get_bsize(dev_handle_t, size_t *);
     112extern int block_read_direct(dev_handle_t, bn_t, size_t, void *);
     113extern int block_write_direct(dev_handle_t, bn_t, size_t, const void *);
    108114
    109115#endif
Note: See TracChangeset for help on using the changeset viewer.