Home | History | Annotate | Download | only in ext2fs

Lines Matching defs:gd

665 ext2fs_cg_update(struct m_ext2fs *fs, int cg, struct ext2_gd *gd, int nbfree, int nifree, int ndirs, daddr_t ioff)
668 uint32_t ext2bgd_nifree = fs2h16(gd->ext2bgd_nifree) |
669 (fs2h16(gd->ext2bgd_nifree_hi) << 16);
671 gd->ext2bgd_nifree = h2fs16(ext2bgd_nifree);
672 gd->ext2bgd_nifree_hi = h2fs16(ext2bgd_nifree >> 16);
683 fs2h16(gd->ext2bgd_itable_unused_lo))) {
684 gd->ext2bgd_itable_unused_lo =
689 gd->ext2bgd_itable_unused_lo <= ext2bgd_nifree);
694 uint32_t ext2bgd_nbfree = fs2h16(gd->ext2bgd_nbfree)
695 | (fs2h16(gd->ext2bgd_nbfree_hi) << 16);
697 gd->ext2bgd_nbfree = h2fs16(ext2bgd_nbfree);
698 gd->ext2bgd_nbfree_hi = h2fs16(ext2bgd_nbfree >> 16);
702 uint32_t ext2bgd_ndirs = fs2h16(gd->ext2bgd_ndirs)
703 | (fs2h16(gd->ext2bgd_ndirs_hi) << 16);
705 gd->ext2bgd_ndirs = h2fs16(ext2bgd_ndirs);
706 gd->ext2bgd_ndirs_hi = h2fs16(ext2bgd_ndirs >> 16);
710 gd->ext2bgd_checksum = ext2fs_cg_get_csum(fs, cg, gd);
797 ext2fs_cg_get_csum(struct m_ext2fs *fs, int cg, struct ext2_gd *gd)
813 crc32 = ext2fs_crc32c(crc32, gd, off);
815 crc32 = ext2fs_crc32c(crc32, gd + off + 2, cgsize - (off + 2));
828 crc = crc16(crc, (uint8_t *)gd, off);
829 crc = crc16(crc, (uint8_t *)gd + off + 2, cgsize - (off + 2));
835 ext2fs_init_bb(struct m_ext2fs *fs, int cg, struct ext2_gd *gd, char *bbp)
847 for(i=0; i < fs->e2fs.e2fs_bpg - fs2h16(gd->ext2bgd_nbfree); i++)
857 struct ext2_gd *gd;
867 gd = &fs->e2fs_gd[cg];
870 uint16_t csum = ext2fs_cg_get_csum(fs, cg, gd);
871 if (gd->ext2bgd_checksum != csum) {
873 __func__, cg, gd->ext2bgd_checksum, csum);
879 (gd->ext2bgd_flags & h2fs16(E2FS_BG_INODE_ZEROED)) != 0)
890 ioff = fs->e2fs.e2fs_ipg - fs2h16(gd->ext2bgd_itable_unused_lo);
897 fs2h32(gd->ext2bgd_i_tables),
898 fs2h32(gd->ext2bgd_i_tables_hi), i),
914 fs2h32(gd->ext2bgd_i_tables),
915 fs2h32(gd->ext2bgd_i_tables_hi), i),
923 gd->ext2bgd_flags |= h2fs16(E2FS_BG_INODE_ZEROED);
924 gd->ext2bgd_checksum = ext2fs_cg_get_csum(fs, cg, gd);