ref: c1737799ff0b5cbe14c34bec3c3f806437fdc20e
parent: b46f6b5e87ceed7487c6816f1c16d1e607dca489
author: gkostka <kostka.grzegorz@gmail.com>
date: Mon Nov 16 15:28:02 EST 2015
Add ext4_sb_set_blocks_cnt
--- a/lwext4/ext4_super.h
+++ b/lwext4/ext4_super.h
@@ -54,6 +54,15 @@
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*/