Changeset d2663d8 in mainline for uspace/srv/fs/mfs/mfs_ops.c


Ignore:
Timestamp:
2013-09-13T16:02:09Z (11 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8c5ba67
Parents:
cc8044e (diff), fd7dbbb (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:

merge mfs changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/mfs/mfs_ops.c

    rcc8044e rd2663d8  
    216216        sbi->isearch = 0;
    217217        sbi->zsearch = 0;
     218        sbi->nfree_zones_valid = false;
     219        sbi->nfree_zones = 0;
    218220
    219221        if (version == MFS_VERSION_V3) {
     
    11811183                return rc;
    11821184
    1183         rc = mfs_count_free_zones(inst, &block_free);
    1184         *count = block_free;
     1185        struct mfs_sb_info *sbi = inst->sbi;
     1186
     1187        if (!sbi->nfree_zones_valid) {
     1188                /* The cached number of free zones is not valid,
     1189                 * we need to scan the bitmap to retrieve the
     1190                 * current value.
     1191                 */
     1192
     1193                rc = mfs_count_free_zones(inst, &block_free);
     1194                if (rc != EOK)
     1195                        return rc;
     1196
     1197                sbi->nfree_zones = block_free;
     1198                sbi->nfree_zones_valid = true;
     1199        }
     1200
     1201        *count = sbi->nfree_zones;
    11851202
    11861203        return rc;
Note: See TracChangeset for help on using the changeset viewer.