Home | History | Annotate | Download | only in fstest

Lines Matching defs:sb

80 bool getSuperBlock(const int blk_fd, struct ext4_super_block* sb) {
86 if (read(blk_fd, sb, sizeof(*sb)) != sizeof(*sb)) {
91 if (sb->s_magic != 0xEF53) {
101 struct ext4_super_block sb;
102 if (!getSuperBlock(blk_fd, &sb)) {
107 if (sb.s_state & 0x2) {
113 sb.s_state |= 0x2;
121 if (write(blk_fd, &sb, sizeof(sb)) != sizeof(sb)) {
131 struct ext4_super_block sb;
132 if (!getSuperBlock(blk_fd, &sb)) {
136 if ((sb.s_log_block_size != 1) && (sb.s_log_block_size != 2)) {
140 int block_size = 1 << (10 + sb.s_log_block_size);
141 int num_bgs = DIV_ROUND_UP(sb.s_blocks_count_lo, sb.s_blocks_per_group);
143 if (sb.s_desc_size != sizeof(struct ext2_group_desc)) {
145 sb.s_desc_size);
315 struct ext4_super_block sb;
316 ASSERT_TRUE(ext4::getSuperBlock(getCacheBlkFd(), &sb));
317 // Verify e2fsck has recovered the error bit of sb.
318 ASSERT_FALSE(sb.s_state & 0x2);