Lines Matching refs:header
177 struct ext2fs_extattr_header *header; in ext2_extattr_block_check() local
180 header = (struct ext2fs_extattr_header *)bp->b_data; in ext2_extattr_block_check()
182 error = ext2_extattr_check(EXT2_IFIRST(header), in ext2_extattr_block_check()
196 struct ext2fs_extattr_dinode_header *header; in ext2_extattr_inode_list() local
216 header = (struct ext2fs_extattr_dinode_header *)((char *)dinode + in ext2_extattr_inode_list()
219 if (le32toh(header->h_magic) != EXTATTR_MAGIC) { in ext2_extattr_inode_list()
224 error = ext2_extattr_check(EXT2_IFIRST(header), in ext2_extattr_inode_list()
231 for (entry = EXT2_IFIRST(header); !EXT2_IS_LAST_ENTRY(entry); in ext2_extattr_inode_list()
270 struct ext2fs_extattr_header *header; in ext2_extattr_block_list() local
285 header = EXT2_HDR(bp); in ext2_extattr_block_list()
286 if (le32toh(header->h_magic) != EXTATTR_MAGIC || in ext2_extattr_block_list()
287 le32toh(header->h_blocks) != 1) { in ext2_extattr_block_list()
337 struct ext2fs_extattr_dinode_header *header; in ext2_extattr_inode_get() local
357 header = (struct ext2fs_extattr_dinode_header *)((char *)dinode + in ext2_extattr_inode_get()
360 if (le32toh(header->h_magic) != EXTATTR_MAGIC) { in ext2_extattr_inode_get()
365 error = ext2_extattr_check(EXT2_IFIRST(header), in ext2_extattr_inode_get()
372 for (entry = EXT2_IFIRST(header); !EXT2_IS_LAST_ENTRY(entry); in ext2_extattr_inode_get()
392 error = uiomove(((char *)EXT2_IFIRST(header)) + in ext2_extattr_inode_get()
412 struct ext2fs_extattr_header *header; in ext2_extattr_block_get() local
427 header = EXT2_HDR(bp); in ext2_extattr_block_get()
428 if (le32toh(header->h_magic) != EXTATTR_MAGIC || in ext2_extattr_block_get()
429 le32toh(header->h_blocks) != 1) { in ext2_extattr_block_get()
542 struct ext2fs_extattr_dinode_header *header; in ext2_extattr_inode_delete() local
562 header = (struct ext2fs_extattr_dinode_header *)((char *)dinode + in ext2_extattr_inode_delete()
565 if (le32toh(header->h_magic) != EXTATTR_MAGIC) { in ext2_extattr_inode_delete()
570 error = ext2_extattr_check(EXT2_IFIRST(header), in ext2_extattr_inode_delete()
578 entry = EXT2_IFIRST(header); in ext2_extattr_inode_delete()
592 memset(header, 0, sizeof(struct ext2fs_extattr_dinode_header)); in ext2_extattr_inode_delete()
598 for (entry = EXT2_IFIRST(header); !EXT2_IS_LAST_ENTRY(entry); in ext2_extattr_inode_delete()
614 ext2_extattr_delete_entry((char *)EXT2_IFIRST(header), in ext2_extattr_inode_delete()
615 EXT2_IFIRST(header), entry, in ext2_extattr_inode_delete()
633 struct ext2fs_extattr_header *header; in ext2_extattr_block_clone() local
639 header = EXT2_HDR(sbp); in ext2_extattr_block_clone()
640 if (le32toh(header->h_magic) != EXTATTR_MAGIC || in ext2_extattr_block_clone()
641 le32toh(header->h_refcount) == 1) in ext2_extattr_block_clone()
655 header->h_refcount = htole32(le32toh(header->h_refcount) - 1); in ext2_extattr_block_clone()
661 header = EXT2_HDR(cbp); in ext2_extattr_block_clone()
662 header->h_refcount = htole32(1); in ext2_extattr_block_clone()
674 struct ext2fs_extattr_header *header; in ext2_extattr_block_delete() local
689 header = EXT2_HDR(bp); in ext2_extattr_block_delete()
690 if (le32toh(header->h_magic) != EXTATTR_MAGIC || in ext2_extattr_block_delete()
691 le32toh(header->h_blocks) != 1) { in ext2_extattr_block_delete()
702 if (le32toh(header->h_refcount) > 1) { in ext2_extattr_block_delete()
907 struct ext2fs_extattr_dinode_header *header; in ext2_extattr_inode_set() local
928 header = (struct ext2fs_extattr_dinode_header *)((char *)dinode + in ext2_extattr_inode_set()
931 if (le32toh(header->h_magic) != EXTATTR_MAGIC) { in ext2_extattr_inode_set()
936 error = ext2_extattr_check(EXT2_IFIRST(header), (char *)dinode + in ext2_extattr_inode_set()
944 for (entry = EXT2_IFIRST(header); !EXT2_IS_LAST_ENTRY(entry); in ext2_extattr_inode_set()
967 size = ext2_extattr_get_size(EXT2_IFIRST(header), entry, in ext2_extattr_inode_set()
975 ext2_extattr_set_exist_entry((char *)EXT2_IFIRST(header), in ext2_extattr_inode_set()
976 EXT2_IFIRST(header), entry, (char *)header + max_size, uio); in ext2_extattr_inode_set()
991 size = ext2_extattr_get_size(EXT2_IFIRST(header), NULL, in ext2_extattr_inode_set()
999 ext2_extattr_set_new_entry((char *)EXT2_IFIRST(header), in ext2_extattr_inode_set()
1000 EXT2_IFIRST(header), name, attrnamespace, in ext2_extattr_inode_set()
1001 (char *)header + max_size, uio); in ext2_extattr_inode_set()
1008 ext2_extattr_hash_entry(struct ext2fs_extattr_header *header, in ext2_extattr_hash_entry() argument
1022 uint32_t *value = (uint32_t *)((char *)header + in ext2_extattr_hash_entry()
1036 ext2_extattr_rehash(struct ext2fs_extattr_header *header, in ext2_extattr_rehash() argument
1042 ext2_extattr_hash_entry(header, entry); in ext2_extattr_rehash()
1044 here = EXT2_ENTRY(header+1); in ext2_extattr_rehash()
1059 header->h_hash = htole32(hash); in ext2_extattr_rehash()
1068 struct ext2fs_extattr_header *header; in ext2_extattr_block_set() local
1085 header = EXT2_HDR(bp); in ext2_extattr_block_set()
1086 if (le32toh(header->h_magic) != EXTATTR_MAGIC || in ext2_extattr_block_set()
1087 le32toh(header->h_blocks) != 1) { in ext2_extattr_block_set()
1098 if (le32toh(header->h_refcount) > 1) { in ext2_extattr_block_set()
1105 header = EXT2_HDR(bp); in ext2_extattr_block_set()
1159 ext2_extattr_rehash(header, entry); in ext2_extattr_block_set()
1188 header = EXT2_HDR(bp); in ext2_extattr_block_set()
1189 header->h_magic = htole32(EXTATTR_MAGIC); in ext2_extattr_block_set()
1190 header->h_refcount = htole32(1); in ext2_extattr_block_set()
1191 header->h_blocks = htole32(1); in ext2_extattr_block_set()
1192 header->h_hash = 0; in ext2_extattr_block_set()
1193 memset(header->h_reserved, 0, sizeof(header->h_reserved)); in ext2_extattr_block_set()
1194 memcpy(bp->b_data, header, sizeof(struct ext2fs_extattr_header)); in ext2_extattr_block_set()
1207 ext2_extattr_rehash(header, entry); in ext2_extattr_block_set()
1217 struct ext2fs_extattr_header *header; in ext2_extattr_free() local
1232 header = EXT2_HDR(bp); in ext2_extattr_free()
1233 if (le32toh(header->h_magic) != EXTATTR_MAGIC || in ext2_extattr_free()
1234 le32toh(header->h_blocks) != 1) { in ext2_extattr_free()
1246 if (le32toh(header->h_refcount) > 1) { in ext2_extattr_free()
1247 header->h_refcount = htole32(le32toh(header->h_refcount) - 1); in ext2_extattr_free()