Changeset b2c96093 in mainline for uspace/srv/fs/mfs/mfs.h


Ignore:
Timestamp:
2013-07-11T15:37:02Z (11 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2b3e8840
Parents:
224174f
Message:

mfs: add functions to get the number of free entries in the bitmaps.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/mfs/mfs.h

    r224174f rb2c96093  
    5858#endif
    5959
     60#define MFS_BMAP_START_BLOCK(sbi, bid) \
     61    ((bid) == BMAP_ZONE ? 2 + (sbi)->ibmap_blocks : 2)
     62
     63#define MFS_BMAP_SIZE_BITS(sbi, bid) \
     64    ((bid) == BMAP_ZONE ? (sbi)->nzones - (sbi)->firstdatazone - 1 : \
     65    (sbi)->ninodes - 1)
     66
     67#define MFS_BMAP_SIZE_BLOCKS(sbi, bid) \
     68    ((bid) == BMAP_ZONE ? (sbi)->zbmap_blocks : (sbi)->ibmap_blocks)
     69
    6070typedef uint32_t bitchunk_t;
    6171
     
    201211mfs_free_zone(struct mfs_instance *inst, uint32_t zone);
    202212
     213extern int
     214mfs_count_free_zones(struct mfs_instance *inst, uint32_t *zones);
     215
     216extern int
     217mfs_count_free_inodes(struct mfs_instance *inst, uint32_t *inodes);
     218
     219
    203220/* mfs_utils.c */
    204221extern uint16_t
Note: See TracChangeset for help on using the changeset viewer.