Changes in uspace/srv/fs/mfs/mfs_ops.c [3dd148d:1ba6651] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/mfs/mfs_ops.c
r3dd148d r1ba6651 64 64 static int mfs_check_sanity(struct mfs_sb_info *sbi); 65 65 static bool is_power_of_two(uint32_t n); 66 static int mfs_size_block(service_id_t service_id, uint32_t *size);67 static int mfs_total_block_count(service_id_t service_id, uint64_t *count);68 static int mfs_free_block_count(service_id_t service_id, uint64_t *count);69 66 70 67 static hash_table_t open_nodes; … … 87 84 .destroy = mfs_destroy_node, 88 85 .has_children = mfs_has_children, 89 .lnkcnt_get = mfs_lnkcnt_get, 90 .size_block = mfs_size_block, 91 .total_block_count = mfs_total_block_count, 92 .free_block_count = mfs_free_block_count 86 .lnkcnt_get = mfs_lnkcnt_get 93 87 }; 94 88 … … 1135 1129 } 1136 1130 1137 static int1138 mfs_size_block(service_id_t service_id, uint32_t *size)1139 {1140 struct mfs_instance *inst;1141 int rc;1142 1143 rc = mfs_instance_get(service_id, &inst);1144 if (rc != EOK)1145 return rc;1146 1147 if (NULL == inst)1148 return ENOENT;1149 1150 *size = inst->sbi->block_size;1151 1152 return EOK;1153 }1154 1155 static int1156 mfs_total_block_count(service_id_t service_id, uint64_t *count)1157 {1158 struct mfs_instance *inst;1159 int rc;1160 1161 rc = mfs_instance_get(service_id, &inst);1162 if (rc != EOK)1163 return rc;1164 1165 if (NULL == inst)1166 return ENOENT;1167 1168 *count = (uint64_t) MFS_BMAP_SIZE_BITS(inst->sbi, BMAP_ZONE);1169 1170 return EOK;1171 }1172 1173 static int1174 mfs_free_block_count(service_id_t service_id, uint64_t *count)1175 {1176 uint32_t block_free;1177 1178 struct mfs_instance *inst;1179 int rc = mfs_instance_get(service_id, &inst);1180 if (rc != EOK)1181 return rc;1182 1183 if (NULL == inst)1184 return ENOENT;1185 1186 mfs_count_free_zones(inst, &block_free);1187 *count = block_free;1188 1189 return EOK;1190 }1191 1192 1131 vfs_out_ops_t mfs_ops = { 1193 1132 .mounted = mfs_mounted,
Note:
See TracChangeset
for help on using the changeset viewer.