Changes in uspace/srv/fs/mfs/mfs_ops.c [d0a1e9b6:1ba6651] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/mfs/mfs_ops.c
rd0a1e9b6 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 uint32_t mfs_size_block(service_id_t service_id);67 static uint64_t mfs_total_block(service_id_t service_id);68 static uint64_t mfs_free_block(service_id_t service_id);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 = mfs_total_block, 92 .free_block = mfs_free_block 86 .lnkcnt_get = mfs_lnkcnt_get 93 87 }; 94 88 … … 1135 1129 } 1136 1130 1137 static uint32_t1138 mfs_size_block(service_id_t service_id)1139 {1140 uint32_t block_size;1141 1142 struct mfs_instance *inst;1143 int rc = mfs_instance_get(service_id, &inst);1144 if (rc != EOK)1145 return rc;1146 if (NULL == inst)1147 return ENOENT;1148 1149 block_size = inst->sbi->block_size;1150 1151 return block_size;1152 }1153 1154 static uint64_t1155 mfs_total_block(service_id_t service_id)1156 {1157 uint64_t block_total;1158 1159 struct mfs_instance *inst;1160 int rc = mfs_instance_get(service_id, &inst);1161 if (rc != EOK)1162 return rc;1163 1164 if (NULL == inst)1165 return ENOENT;1166 1167 block_total = (uint64_t)inst->sbi->nzones;1168 1169 return block_total;1170 }1171 1172 static uint64_t1173 mfs_free_block(service_id_t service_id)1174 {1175 uint32_t block_free;1176 1177 struct mfs_instance *inst;1178 int rc = mfs_instance_get(service_id, &inst);1179 if (rc != EOK)1180 return rc;1181 1182 if (NULL == inst)1183 return ENOENT;1184 1185 mfs_count_free_zones(inst, &block_free);1186 1187 return (uint64_t)block_free;1188 }1189 1190 1131 vfs_out_ops_t mfs_ops = { 1191 1132 .mounted = mfs_mounted,
Note:
See TracChangeset
for help on using the changeset viewer.