1 Index: linux-stage/fs/ext4/ext4.h
2 ===================================================================
3 --- linux-stage.orig/fs/ext4/ext4.h
4 +++ linux-stage/fs/ext4/ext4.h
5 @@ -1267,6 +1267,7 @@ EXT4_INODE_BIT_FNS(state, state_flags)
6 #define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
7 #define EXT4_FEATURE_INCOMPAT_MMP 0x0100
8 #define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
9 +#define EXT4_FEATURE_INCOMPAT_EA_INODE 0x0400
10 #define EXT4_FEATURE_INCOMPAT_DIRDATA 0x1000
12 #define EXT4_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR
13 @@ -1276,6 +1277,7 @@ EXT4_INODE_BIT_FNS(state, state_flags)
14 EXT4_FEATURE_INCOMPAT_EXTENTS| \
15 EXT4_FEATURE_INCOMPAT_64BIT| \
16 EXT4_FEATURE_INCOMPAT_FLEX_BG| \
17 + EXT4_FEATURE_INCOMPAT_EA_INODE| \
18 EXT4_FEATURE_INCOMPAT_MMP| \
19 EXT4_FEATURE_INCOMPAT_DIRDATA)
21 @@ -1607,6 +1609,12 @@ struct mmpd_data {
25 + * Maximum size of xattr attributes for FEATURE_INCOMPAT_EA_INODE 1Mb
26 + * This limit is arbitrary, but is reasonable for the xattr API.
28 +#define EXT4_XATTR_MAX_LARGE_EA_SIZE (1024 * 1024)
34 Index: linux-stage/fs/ext4/xattr.c
35 ===================================================================
36 --- linux-stage.orig/fs/ext4/xattr.c
37 +++ linux-stage/fs/ext4/xattr.c
38 @@ -168,19 +168,26 @@ ext4_xattr_check_block(struct buffer_hea
42 -ext4_xattr_check_entry(struct ext4_xattr_entry *entry, size_t size)
43 +ext4_xattr_check_entry(struct ext4_xattr_entry *entry, size_t size,
44 + struct inode *inode)
46 size_t value_size = le32_to_cpu(entry->e_value_size);
48 - if (entry->e_value_block != 0 || value_size > size ||
49 - le16_to_cpu(entry->e_value_offs) + value_size > size)
50 + if ((entry->e_value_inum == 0) &&
51 + (le16_to_cpu(entry->e_value_offs) + value_size > size))
53 + if (entry->e_value_inum != 0 &&
54 + (le32_to_cpu(entry->e_value_inum) < EXT4_FIRST_INO(inode->i_sb) ||
55 + le32_to_cpu(entry->e_value_inum) >
56 + le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_inodes_count)))
62 ext4_xattr_find_entry(struct ext4_xattr_entry **pentry, int name_index,
63 - const char *name, size_t size, int sorted)
64 + const char *name, size_t size, int sorted,
65 + struct inode *inode)
67 struct ext4_xattr_entry *entry;
69 @@ -200,11 +207,103 @@ ext4_xattr_find_entry(struct ext4_xattr_
73 - if (!cmp && ext4_xattr_check_entry(entry, size))
74 + if (!cmp && ext4_xattr_check_entry(entry, size, inode))
76 return cmp ? -ENODATA : 0;
80 + * Read the EA value from an inode.
83 +ext4_xattr_inode_read(struct inode *ea_inode, void *buf, size_t *size)
85 + unsigned long block = 0;
86 + struct buffer_head *bh = NULL;
88 + size_t csize, ret_size = 0;
93 + blocksize = ea_inode->i_sb->s_blocksize;
95 + while (ret_size < *size) {
96 + csize = (*size - ret_size) > blocksize ? blocksize :
98 + bh = ext4_bread(NULL, ea_inode, block, 0, &err);
103 + memcpy(buf, bh->b_data, csize);
116 +struct inode *ext4_xattr_inode_iget(struct inode *parent, int ea_ino, int *err)
118 + struct inode *ea_inode = NULL;
120 + ea_inode = ext4_iget(parent->i_sb, ea_ino);
121 + if (ea_inode == NULL || is_bad_inode(ea_inode)) {
122 + ext4_error(parent->i_sb, "error while reading EA inode %d",
128 + if (ea_inode->i_xattr_inode_parent != parent->i_ino ||
129 + ea_inode->i_generation != parent->i_generation) {
130 + ext4_error(parent->i_sb, "Backpointer from EA inode %d "
131 + "to parent invalid.", ea_ino);
136 + if (!(EXT4_I(ea_inode)->i_flags & EXT4_EA_INODE_FL)) {
137 + ext4_error(parent->i_sb, "EA inode %d does not have "
138 + "EXT4_EA_INODE_FL flag set.\n", ea_ino);
152 + * Read the value from the EA inode.
155 +ext4_xattr_inode_get(struct inode *inode, int ea_ino, void *buffer,
158 + struct inode *ea_inode = NULL;
161 + ea_inode = ext4_xattr_inode_iget(inode, ea_ino, &err);
165 + err = ext4_xattr_inode_read(ea_inode, buffer, size);
172 ext4_xattr_block_get(struct inode *inode, int name_index, const char *name,
173 void *buffer, size_t buffer_size)
174 @@ -236,7 +335,8 @@ bad_block:
176 ext4_xattr_cache_insert(bh);
178 - error = ext4_xattr_find_entry(&entry, name_index, name, bh->b_size, 1);
179 + error = ext4_xattr_find_entry(&entry, name_index, name, bh->b_size, 1,
184 @@ -246,8 +346,16 @@ bad_block:
186 if (size > buffer_size)
188 - memcpy(buffer, bh->b_data + le16_to_cpu(entry->e_value_offs),
190 + if (entry->e_value_inum != 0) {
191 + error = ext4_xattr_inode_get(inode,
192 + le32_to_cpu(entry->e_value_inum),
197 + memcpy(buffer, bh->b_data +
198 + le16_to_cpu(entry->e_value_offs), size);
203 @@ -281,7 +389,7 @@ ext4_xattr_ibody_get(struct inode *inode
206 error = ext4_xattr_find_entry(&entry, name_index, name,
207 - end - (void *)entry, 0);
208 + end - (void *)entry, 0, inode);
211 size = le32_to_cpu(entry->e_value_size);
212 @@ -289,8 +397,16 @@ ext4_xattr_ibody_get(struct inode *inode
214 if (size > buffer_size)
216 - memcpy(buffer, (void *)IFIRST(header) +
217 - le16_to_cpu(entry->e_value_offs), size);
218 + if (entry->e_value_inum != 0) {
219 + error = ext4_xattr_inode_get(inode,
220 + le32_to_cpu(entry->e_value_inum),
225 + memcpy(buffer, (void *)IFIRST(header) +
226 + le16_to_cpu(entry->e_value_offs), size);
231 @@ -512,7 +628,7 @@ static size_t ext4_xattr_free_space(stru
233 for (; !IS_LAST_ENTRY(last); last = EXT4_XATTR_NEXT(last)) {
234 *total += EXT4_XATTR_LEN(last->e_name_len);
235 - if (!last->e_value_block && last->e_value_size) {
236 + if (last->e_value_inum == 0 && last->e_value_size > 0) {
237 size_t offs = le16_to_cpu(last->e_value_offs);
238 if (offs < *min_offs)
240 @@ -521,11 +637,159 @@ static size_t ext4_xattr_free_space(stru
241 return (*min_offs - ((void *)last - base) - sizeof(__u32));
245 + * Write the value of the EA in an inode.
248 +ext4_xattr_inode_write(handle_t *handle, struct inode *ea_inode,
249 + const void *buf, int bufsize)
251 + struct buffer_head *bh = NULL, dummy;
252 + unsigned long block = 0;
253 + unsigned blocksize = ea_inode->i_sb->s_blocksize;
254 + unsigned max_blocks = (bufsize + blocksize - 1) >> ea_inode->i_blkbits;
255 + int csize, wsize = 0;
260 + while (ret >= 0 && ret < max_blocks) {
264 + ret = ext4_get_blocks(handle, ea_inode, block, max_blocks,
265 + &dummy, EXT4_GET_BLOCKS_CREATE);
267 + ext4_mark_inode_dirty(handle, ea_inode);
268 + if (ret == -ENOSPC &&
269 + ext4_should_retry_alloc(ea_inode->i_sb, &retries)) {
281 + while (wsize < bufsize) {
284 + csize = (bufsize - wsize) > blocksize ? blocksize :
286 + bh = ext4_getblk(handle, ea_inode, block, 0, &ret);
289 + ret = ext4_journal_get_write_access(handle, bh);
293 + memcpy(bh->b_data, buf, csize);
294 + set_buffer_uptodate(bh);
295 + ext4_journal_dirty_metadata(handle, bh);
302 + i_size_write(ea_inode, wsize);
303 + ext4_update_i_disksize(ea_inode, wsize);
305 + ext4_mark_inode_dirty(handle, ea_inode);
314 + * Create an inode to store the value of a large EA.
316 +static struct inode *
317 +ext4_xattr_inode_create(handle_t *handle, struct inode *inode)
319 + struct inode *ea_inode = NULL;
322 + * Let the next inode be the goal, so we try and allocate the EA inode
323 + * in the same group, or nearby one.
325 + ea_inode = ext4_new_inode(handle, inode->i_sb->s_root->d_inode,
326 + S_IFREG|0600, NULL, inode->i_ino + 1);
328 + if (!IS_ERR(ea_inode)) {
329 + ea_inode->i_op = &ext4_file_inode_operations;
330 + ea_inode->i_fop = &ext4_file_operations;
331 + ext4_set_aops(ea_inode);
332 + ea_inode->i_generation = inode->i_generation;
333 + EXT4_I(ea_inode)->i_flags |= EXT4_EA_INODE_FL;
336 + * A back-pointer from EA inode to parent inode will be useful
339 + ea_inode->i_xattr_inode_parent = inode->i_ino;
340 + unlock_new_inode(ea_inode);
347 + * Unlink the inode storing the value of the EA.
350 +ext4_xattr_inode_unlink(struct inode *inode, int ea_ino)
352 + struct inode *ea_inode = NULL;
355 + ea_inode = ext4_xattr_inode_iget(inode, ea_ino, &err);
359 + ea_inode->i_nlink = 0;
366 + * Add value of the EA in an inode.
369 +ext4_xattr_inode_set(handle_t *handle, struct inode *inode, int *ea_ino,
370 + const void *value, size_t value_len)
372 + struct inode *ea_inode = NULL;
375 + /* Create an inode for the EA value */
376 + ea_inode = ext4_xattr_inode_create(handle, inode);
377 + if (IS_ERR(ea_inode))
380 + err = ext4_xattr_inode_write(handle, ea_inode, value, value_len);
382 + ea_inode->i_nlink = 0;
384 + *ea_ino = ea_inode->i_ino;
391 struct ext4_xattr_info {
400 struct ext4_xattr_search {
401 @@ -537,15 +801,23 @@ struct ext4_xattr_search {
405 -ext4_xattr_set_entry(struct ext4_xattr_info *i, struct ext4_xattr_search *s)
406 +ext4_xattr_set_entry(struct ext4_xattr_info *i, struct ext4_xattr_search *s,
407 + handle_t *handle, struct inode *inode)
409 struct ext4_xattr_entry *last;
410 size_t free, min_offs = s->end - s->base, name_len = strlen(i->name);
411 + int in_inode = i->in_inode;
413 + if (EXT4_HAS_INCOMPAT_FEATURE(inode->i_sb,
414 + EXT4_FEATURE_INCOMPAT_EA_INODE) &&
415 + (EXT4_XATTR_SIZE(i->value_len) >
416 + EXT4_XATTR_MIN_LARGE_EA_SIZE(inode->i_sb->s_blocksize)))
419 /* Compute min_offs and last. */
421 for (; !IS_LAST_ENTRY(last); last = EXT4_XATTR_NEXT(last)) {
422 - if (!last->e_value_block && last->e_value_size) {
423 + if (last->e_value_inum == 0 && last->e_value_size > 0) {
424 size_t offs = le16_to_cpu(last->e_value_offs);
427 @@ -553,16 +825,21 @@ ext4_xattr_set_entry(struct ext4_xattr_i
429 free = min_offs - ((void *)last - s->base) - sizeof(__u32);
431 - if (!s->here->e_value_block && s->here->e_value_size) {
432 + if (!in_inode && s->here->e_value_inum == 0 &&
433 + s->here->e_value_size > 0) {
434 size_t size = le32_to_cpu(s->here->e_value_size);
435 free += EXT4_XATTR_SIZE(size);
437 free += EXT4_XATTR_LEN(name_len);
440 - if (free < EXT4_XATTR_SIZE(i->value_len) ||
441 - free < EXT4_XATTR_LEN(name_len) +
442 - EXT4_XATTR_SIZE(i->value_len))
443 + size_t value_len = EXT4_XATTR_SIZE(i->value_len);
448 + if (free < value_len ||
449 + free < EXT4_XATTR_LEN(name_len) + value_len)
453 @@ -576,7 +853,8 @@ ext4_xattr_set_entry(struct ext4_xattr_i
454 s->here->e_name_len = name_len;
455 memcpy(s->here->e_name, i->name, name_len);
457 - if (!s->here->e_value_block && s->here->e_value_size) {
458 + if (s->here->e_value_offs > 0 && s->here->e_value_inum == 0 &&
459 + s->here->e_value_size > 0) {
460 void *first_val = s->base + min_offs;
461 size_t offs = le16_to_cpu(s->here->e_value_offs);
462 void *val = s->base + offs;
463 @@ -605,13 +883,17 @@ ext4_xattr_set_entry(struct ext4_xattr_i
465 while (!IS_LAST_ENTRY(last)) {
466 size_t o = le16_to_cpu(last->e_value_offs);
467 - if (!last->e_value_block &&
468 - last->e_value_size && o < offs)
469 + if (last->e_value_size > 0 && o < offs)
471 cpu_to_le16(o + size);
472 last = EXT4_XATTR_NEXT(last);
475 + if (s->here->e_value_inum != 0) {
476 + ext4_xattr_inode_unlink(inode,
477 + le32_to_cpu(s->here->e_value_inum));
478 + s->here->e_value_inum = 0;
481 /* Remove the old name. */
482 size_t size = EXT4_XATTR_LEN(name_len);
483 @@ -625,10 +907,17 @@ ext4_xattr_set_entry(struct ext4_xattr_i
485 /* Insert the new value. */
486 s->here->e_value_size = cpu_to_le32(i->value_len);
487 - if (i->value_len) {
489 + int ea_ino = le32_to_cpu(s->here->e_value_inum);
490 + ext4_xattr_inode_set(handle, inode, &ea_ino, i->value,
492 + s->here->e_value_inum = cpu_to_le32(ea_ino);
493 + s->here->e_value_offs = 0;
494 + } else if (i->value_len) {
495 size_t size = EXT4_XATTR_SIZE(i->value_len);
496 void *val = s->base + min_offs - size;
497 s->here->e_value_offs = cpu_to_le16(min_offs - size);
498 + s->here->e_value_inum = 0;
499 memset(val + size - EXT4_XATTR_PAD, 0,
500 EXT4_XATTR_PAD); /* Clear the pad bytes. */
501 memcpy(val, i->value, i->value_len);
502 @@ -673,7 +962,7 @@ ext4_xattr_block_find(struct inode *inod
503 bs->s.end = bs->bh->b_data + bs->bh->b_size;
504 bs->s.here = bs->s.first;
505 error = ext4_xattr_find_entry(&bs->s.here, i->name_index,
506 - i->name, bs->bh->b_size, 1);
507 + i->name, bs->bh->b_size, 1, inode);
508 if (error && error != -ENODATA)
510 bs->s.not_found = error;
511 @@ -697,8 +986,6 @@ ext4_xattr_block_set(handle_t *handle, s
513 #define header(x) ((struct ext4_xattr_header *)(x))
515 - if (i->value && i->value_len > sb->s_blocksize)
518 ce = mb_cache_entry_get(ext4_xattr_cache, bs->bh->b_bdev,
520 @@ -713,7 +1000,7 @@ ext4_xattr_block_set(handle_t *handle, s
523 ea_bdebug(bs->bh, "modifying in-place");
524 - error = ext4_xattr_set_entry(i, s);
525 + error = ext4_xattr_set_entry(i, s, handle, inode);
527 if (!IS_LAST_ENTRY(s->first))
528 ext4_xattr_rehash(header(s->base),
529 @@ -765,7 +1052,7 @@ ext4_xattr_block_set(handle_t *handle, s
530 s->end = s->base + sb->s_blocksize;
533 - error = ext4_xattr_set_entry(i, s);
534 + error = ext4_xattr_set_entry(i, s, handle, inode);
538 @@ -909,7 +1196,7 @@ ext4_xattr_ibody_find(struct inode *inod
539 /* Find the named attribute. */
540 error = ext4_xattr_find_entry(&is->s.here, i->name_index,
542 - (void *)is->s.base, 0);
543 + (void *)is->s.base, 0, inode);
544 if (error && error != -ENODATA)
546 is->s.not_found = error;
547 @@ -928,7 +1215,7 @@ ext4_xattr_ibody_set(handle_t *handle, s
549 if (EXT4_I(inode)->i_extra_isize == 0)
551 - error = ext4_xattr_set_entry(i, s);
552 + error = ext4_xattr_set_entry(i, s, handle, inode);
555 header = IHDR(inode, ext4_raw_inode(&is->iloc));
556 @@ -964,7 +1251,7 @@ ext4_xattr_set_handle(handle_t *handle,
559 .value_len = value_len,
563 struct ext4_xattr_ibody_find is = {
564 .s = { .not_found = -ENODATA, },
565 @@ -1033,6 +1320,15 @@ ext4_xattr_set_handle(handle_t *handle,
568 error = ext4_xattr_block_set(handle, inode, &i, &bs);
569 + if (EXT4_HAS_INCOMPAT_FEATURE(inode->i_sb,
570 + EXT4_FEATURE_INCOMPAT_EA_INODE) &&
571 + error == -ENOSPC) {
572 + /* xattr not fit to block, store at external
575 + error = ext4_xattr_ibody_set(handle, inode,
580 if (!is.s.not_found) {
581 @@ -1080,10 +1376,25 @@ ext4_xattr_set(struct inode *inode, int
582 const void *value, size_t value_len, int flags)
585 + struct super_block *sb = inode->i_sb;
586 + int buffer_credits;
587 int error, retries = 0;
589 + buffer_credits = EXT4_DATA_TRANS_BLOCKS(sb);
590 + if ((value_len >= EXT4_XATTR_MIN_LARGE_EA_SIZE(sb->s_blocksize)) &&
591 + EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EA_INODE)) {
592 + int nrblocks = (value_len + sb->s_blocksize - 1) >>
593 + sb->s_blocksize_bits;
595 + /* For new inode */
596 + buffer_credits += EXT4_SINGLEDATA_TRANS_BLOCKS(sb) + 3;
598 + /* For data blocks of EA inode */
599 + buffer_credits += ext4_meta_trans_blocks(inode, nrblocks, 0);
603 - handle = ext4_journal_start(inode, EXT4_DATA_TRANS_BLOCKS(inode->i_sb));
604 + handle = ext4_journal_start(inode, buffer_credits);
605 if (IS_ERR(handle)) {
606 error = PTR_ERR(handle);
608 @@ -1093,7 +1404,7 @@ retry:
609 value, value_len, flags);
610 error2 = ext4_journal_stop(handle);
611 if (error == -ENOSPC &&
612 - ext4_should_retry_alloc(inode->i_sb, &retries))
613 + ext4_should_retry_alloc(sb, &retries))
617 @@ -1115,7 +1426,7 @@ static void ext4_xattr_shift_entries(str
619 /* Adjust the value offsets of the entries */
620 for (; !IS_LAST_ENTRY(last); last = EXT4_XATTR_NEXT(last)) {
621 - if (!last->e_value_block && last->e_value_size) {
622 + if (last->e_value_inum == 0 && last->e_value_size > 0) {
623 new_offs = le16_to_cpu(last->e_value_offs) +
625 BUG_ON(new_offs + le32_to_cpu(last->e_value_size)
626 @@ -1353,15 +1664,41 @@ cleanup:
628 * ext4_xattr_delete_inode()
630 - * Free extended attribute resources associated with this inode. This
631 + * Free extended attribute resources associated with this inode. Traverse
632 + * all entries and unlink any xattr inodes associated with this inode. This
633 * is called immediately before an inode is freed. We have exclusive
634 - * access to the inode.
635 + * access to the inode. If an orphan inode is deleted it will also delete any
636 + * xattr block and all xattr inodes. They are checked by ext4_xattr_inode_iget()
637 + * to ensure they belong to the parent inode and were not deleted already.
640 ext4_xattr_delete_inode(handle_t *handle, struct inode *inode)
642 struct buffer_head *bh = NULL;
643 + struct ext4_xattr_ibody_header *header;
644 + struct ext4_inode *raw_inode;
645 + struct ext4_iloc iloc;
646 + struct ext4_xattr_entry *entry;
649 + if (!ext4_test_inode_state(inode, EXT4_STATE_XATTR))
650 + goto delete_external_ea;
652 + error = ext4_get_inode_loc(inode, &iloc);
655 + raw_inode = ext4_raw_inode(&iloc);
656 + header = IHDR(inode, raw_inode);
657 + entry = IFIRST(header);
658 + for (; !IS_LAST_ENTRY(entry); entry = EXT4_XATTR_NEXT(entry)) {
659 + if (entry->e_value_inum != 0) {
660 + ext4_xattr_inode_unlink(inode,
661 + le32_to_cpu(entry->e_value_inum));
662 + entry->e_value_inum = 0;
667 if (!EXT4_I(inode)->i_file_acl)
669 bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl);
670 @@ -1376,6 +1713,16 @@ ext4_xattr_delete_inode(handle_t *handle
671 inode->i_ino, EXT4_I(inode)->i_file_acl);
675 + entry = BFIRST(bh);
676 + for (; !IS_LAST_ENTRY(entry); entry = EXT4_XATTR_NEXT(entry)) {
677 + if (entry->e_value_inum != 0) {
678 + ext4_xattr_inode_unlink(inode,
679 + le32_to_cpu(entry->e_value_inum));
680 + entry->e_value_inum = 0;
684 ext4_xattr_release_block(handle, inode, bh);
685 EXT4_I(inode)->i_file_acl = 0;
687 @@ -1450,10 +1797,9 @@ ext4_xattr_cmp(struct ext4_xattr_header
688 entry1->e_name_index != entry2->e_name_index ||
689 entry1->e_name_len != entry2->e_name_len ||
690 entry1->e_value_size != entry2->e_value_size ||
691 + entry1->e_value_inum != entry2->e_value_inum ||
692 memcmp(entry1->e_name, entry2->e_name, entry1->e_name_len))
694 - if (entry1->e_value_block != 0 || entry2->e_value_block != 0)
696 if (memcmp((char *)header1 + le16_to_cpu(entry1->e_value_offs),
697 (char *)header2 + le16_to_cpu(entry2->e_value_offs),
698 le32_to_cpu(entry1->e_value_size)))
699 @@ -1538,7 +1884,7 @@ static inline void ext4_xattr_hash_entry
703 - if (entry->e_value_block == 0 && entry->e_value_size != 0) {
704 + if (entry->e_value_inum == 0 && entry->e_value_size != 0) {
705 __le32 *value = (__le32 *)((char *)header +
706 le16_to_cpu(entry->e_value_offs));
707 for (n = (le32_to_cpu(entry->e_value_size) +
708 Index: linux-stage/fs/ext4/xattr.h
709 ===================================================================
710 --- linux-stage.orig/fs/ext4/xattr.h
711 +++ linux-stage/fs/ext4/xattr.h
712 @@ -38,7 +38,7 @@ struct ext4_xattr_entry {
713 __u8 e_name_len; /* length of name */
714 __u8 e_name_index; /* attribute name index */
715 __le16 e_value_offs; /* offset in disk block of value */
716 - __le32 e_value_block; /* disk block attribute is stored on (n/i) */
717 + __le32 e_value_inum; /* inode in which the value is stored */
718 __le32 e_value_size; /* size of attribute value */
719 __le32 e_hash; /* hash value of name and value */
720 char e_name[0]; /* attribute name */
721 @@ -63,6 +63,15 @@ struct ext4_xattr_entry {
722 EXT4_I(inode)->i_extra_isize))
723 #define IFIRST(hdr) ((struct ext4_xattr_entry *)((hdr)+1))
725 +#define i_xattr_inode_parent i_mtime.tv_sec
728 + * The minimum size of EA value when you start storing it in an external inode
729 + * size of block - size of header - size of 1 entry - 4 null bytes
731 +#define EXT4_XATTR_MIN_LARGE_EA_SIZE(b) \
732 + ((b) - EXT4_XATTR_LEN(3) - sizeof(struct ext4_xattr_header) - 4)
734 # ifdef CONFIG_EXT4_FS_XATTR
736 extern struct xattr_handler ext4_xattr_user_handler;