Lines Matching refs:header
26 * | header |
37 * The block header is followed by multiple entry descriptors. These entry
373 struct ext2_xattr_header *header = NULL;
380 * header -- Points either into bh, or to a temporarily
383 * the block pointed to by header.
385 * pointed to by header.
388 * end -- Points right after the block pointed to by header.
411 header = HDR(bh);
413 if (header->h_magic != cpu_to_le32(EXT2_XATTR_MAGIC) ||
414 header->h_blocks != cpu_to_le32(1)) {
456 free = min_offs - ((char*)last - (char*)header) - sizeof(__u32);
493 if (header) {
496 /* assert(header == HDR(bh)); */
500 if (header->h_refcount == cpu_to_le32(1)) {
512 header = kmalloc(bh->b_size, GFP_KERNEL);
514 if (header == NULL)
516 memcpy(header, HDR(bh), bh->b_size);
517 header->h_refcount = cpu_to_le32(1);
520 here = ENTRY((char *)header + offset);
522 last = ENTRY((char *)header + offset);
526 header = kzalloc(sb->s_blocksize, GFP_KERNEL);
528 if (header == NULL)
530 end = (char *)header + sb->s_blocksize;
531 header->h_magic = cpu_to_le32(EXT2_XATTR_MAGIC);
532 header->h_blocks = header->h_refcount = cpu_to_le32(1);
533 last = here = ENTRY(header+1);
549 char *first_val = (char *)header + min_offs;
551 char *val = (char *)header + offs;
572 last = ENTRY(header+1);
596 char *val = (char *)header + min_offs - size;
598 cpu_to_le16((char *)val - (char *)header);
606 if (IS_LAST_ENTRY(ENTRY(header+1))) {
608 if (bh && header == HDR(bh))
612 ext2_xattr_rehash(header, here);
613 if (bh && header == HDR(bh))
615 error = ext2_xattr_set2(inode, bh, header);
620 if (!(bh && header == HDR(bh)))
621 kfree(header);
632 struct ext2_xattr_header *header)
638 if (header) {
639 new_bh = ext2_xattr_cache_find(inode, header);
659 } else if (old_bh && header == HDR(old_bh)) {
682 memcpy(new_bh->b_data, header, new_bh->b_size);
911 ext2_xattr_cache_find(struct inode *inode, struct ext2_xattr_header *header)
913 __u32 hash = le32_to_cpu(header->h_hash);
916 if (!header->h_hash)
944 } else if (!ext2_xattr_cmp(header, HDR(bh))) {
966 static inline void ext2_xattr_hash_entry(struct ext2_xattr_header *header,
980 __le32 *value = (__le32 *)((char *)header +
1002 static void ext2_xattr_rehash(struct ext2_xattr_header *header,
1008 ext2_xattr_hash_entry(header, entry);
1009 here = ENTRY(header+1);
1021 header->h_hash = cpu_to_le32(hash);