#ifndef EXT4_SUPER_H_
#define EXT4_SUPER_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include "ext4_types.h"
to_le32(s->blocks_count_lo);
}
+/**@brief Blocks count set in superblock.
+ * @param s superblock descriptor
+ * @return count of blocks*/
+static inline void ext4_sb_set_blocks_cnt(struct ext4_sblock *s, uint64_t cnt)
+{
+ s->blocks_count_lo = to_le32((cnt << 32) >> 32);
+ s->blocks_count_hi = to_le32(cnt >> 32);
+}
+
/**@brief Free blocks count get stored in superblock.
* @param s superblock descriptor
* @return free blocks*/
uint32_t ext4_num_base_meta_clusters(struct ext4_sblock *s,
uint32_t block_group);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_SUPER_H_ */
/**