1 Index: linux-2.6.9-67.0.20/fs/ext3/ialloc.c
2 ===================================================================
3 --- linux-2.6.9-67.0.20.orig/fs/ext3/ialloc.c
4 +++ linux-2.6.9-67.0.20/fs/ext3/ialloc.c
5 @@ -632,6 +632,9 @@ got:
6 spin_unlock(&sbi->s_next_gen_lock);
8 ei->i_state = EXT3_STATE_NEW;
10 + (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ?
11 + sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0;
14 if(DQUOT_ALLOC_INODE(inode)) {
15 Index: linux-2.6.9-67.0.20/fs/ext3/inode.c
16 ===================================================================
17 --- linux-2.6.9-67.0.20.orig/fs/ext3/inode.c
18 +++ linux-2.6.9-67.0.20/fs/ext3/inode.c
19 @@ -2275,7 +2275,7 @@ static unsigned long ext3_get_inode_bloc
20 * trying to determine the inode's location on-disk and no read need be
23 -static int ext3_get_inode_loc(struct inode *inode,
24 +int ext3_get_inode_loc(struct inode *inode,
25 struct ext3_iloc *iloc, int in_mem)
28 @@ -2485,6 +2485,11 @@ void ext3_read_inode(struct inode * inod
29 ei->i_data[block] = raw_inode->i_block[block];
30 INIT_LIST_HEAD(&ei->i_orphan);
32 + if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE)
33 + ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
35 + ei->i_extra_isize = 0;
37 if (S_ISREG(inode->i_mode)) {
38 inode->i_op = &ext3_file_inode_operations;
39 inode->i_fop = &ext3_file_operations;
40 @@ -2620,6 +2625,9 @@ static int ext3_do_update_inode(handle_t
41 } else for (block = 0; block < EXT3_N_BLOCKS; block++)
42 raw_inode->i_block[block] = ei->i_data[block];
44 + if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE)
45 + raw_inode->i_extra_isize = cpu_to_le16(ei->i_extra_isize);
47 BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
48 rc = ext3_journal_dirty_metadata(handle, bh);
50 @@ -2850,7 +2858,8 @@ ext3_reserve_inode_write(handle_t *handl
54 - err = ext3_get_inode_loc(inode, iloc, 1);
55 + err = ext3_get_inode_loc(inode, iloc, EXT3_I(inode)->i_state &
58 BUFFER_TRACE(iloc->bh, "get_write_access");
59 err = ext3_journal_get_write_access(handle, iloc->bh);
60 Index: linux-2.6.9-67.0.20/fs/ext3/xattr.c
61 ===================================================================
62 --- linux-2.6.9-67.0.20.orig/fs/ext3/xattr.c
63 +++ linux-2.6.9-67.0.20/fs/ext3/xattr.c
64 @@ -149,17 +149,12 @@ ext3_listxattr(struct dentry *dentry, ch
70 - * Copy an extended attribute into the buffer
71 - * provided, or compute the buffer size required.
72 - * Buffer is NULL to compute the size of the buffer required.
73 + * ext3_xattr_block_get()
75 - * Returns a negative error number on failure, or the number of bytes
76 - * used / required on success.
77 + * routine looks for attribute in EA block and returns it's value and size
80 -ext3_xattr_get(struct inode *inode, int name_index, const char *name,
81 +ext3_xattr_block_get(struct inode *inode, int name_index, const char *name,
82 void *buffer, size_t buffer_size)
84 struct buffer_head *bh = NULL;
85 @@ -173,7 +168,6 @@ ext3_xattr_get(struct inode *inode, int
89 - down_read(&EXT3_I(inode)->xattr_sem);
91 if (!EXT3_I(inode)->i_file_acl)
93 @@ -246,15 +240,87 @@ found:
97 - up_read(&EXT3_I(inode)->xattr_sem);
103 - * ext3_xattr_list()
104 + * ext3_xattr_ibody_get()
106 - * Copy a list of attribute names into the buffer
107 + * routine looks for attribute in inode body and returns it's value and size
110 +ext3_xattr_ibody_get(struct inode *inode, int name_index, const char *name,
111 + void *buffer, size_t buffer_size)
113 + int size, name_len = strlen(name), storage_size;
114 + struct ext3_xattr_entry *last;
115 + struct ext3_inode *raw_inode;
116 + struct ext3_iloc iloc;
120 + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
123 + ret = ext3_get_inode_loc(inode, &iloc, 0);
126 + raw_inode = ext3_raw_inode(&iloc);
128 + storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
129 + EXT3_GOOD_OLD_INODE_SIZE -
130 + EXT3_I(inode)->i_extra_isize -
132 + start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
133 + EXT3_I(inode)->i_extra_isize;
134 + if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
138 + start += sizeof(__u32);
139 + end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
141 + last = (struct ext3_xattr_entry *) start;
142 + while (!IS_LAST_ENTRY(last)) {
143 + struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
144 + if (le32_to_cpu(last->e_value_size) > storage_size ||
145 + (char *) next >= end) {
146 + ext3_error(inode->i_sb, "ext3_xattr_ibody_get",
147 + "inode %ld", inode->i_ino);
151 + if (name_index == last->e_name_index &&
152 + name_len == last->e_name_len &&
153 + !memcmp(name, last->e_name, name_len))
158 + /* can't find EA */
163 + size = le32_to_cpu(last->e_value_size);
166 + if (buffer_size >= size) {
167 + memcpy(buffer, start + le16_to_cpu(last->e_value_offs),
180 + * Copy an extended attribute into the buffer
181 * provided, or compute the buffer size required.
182 * Buffer is NULL to compute the size of the buffer required.
184 @@ -262,7 +328,31 @@ cleanup:
185 * used / required on success.
188 -ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size)
189 +ext3_xattr_get(struct inode *inode, int name_index, const char *name,
190 + void *buffer, size_t buffer_size)
194 + down_read(&EXT3_I(inode)->xattr_sem);
196 + /* try to find attribute in inode body */
197 + err = ext3_xattr_ibody_get(inode, name_index, name,
198 + buffer, buffer_size);
200 + /* search was unsuccessful, try to find EA in dedicated block */
201 + err = ext3_xattr_block_get(inode, name_index, name,
202 + buffer, buffer_size);
203 + up_read(&EXT3_I(inode)->xattr_sem);
208 +/* ext3_xattr_ibody_list()
210 + * generate list of attributes stored in EA block
213 +ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size)
215 struct buffer_head *bh = NULL;
216 struct ext3_xattr_entry *entry;
217 @@ -273,7 +363,6 @@ ext3_xattr_list(struct inode *inode, cha
218 ea_idebug(inode, "buffer=%p, buffer_size=%ld",
219 buffer, (long)buffer_size);
221 - down_read(&EXT3_I(inode)->xattr_sem);
223 if (!EXT3_I(inode)->i_file_acl)
225 @@ -330,11 +419,149 @@ bad_block: ext3_error(inode->i_sb, "ext3
229 - up_read(&EXT3_I(inode)->xattr_sem);
234 +/* ext3_xattr_ibody_list()
236 + * generate list of attributes stored in inode body
239 +ext3_xattr_ibody_list(struct inode *inode, char *buffer, size_t buffer_size)
241 + struct ext3_xattr_entry *last;
242 + struct ext3_inode *raw_inode;
243 + char *start, *end, *buf;
244 + struct ext3_iloc iloc;
246 + size_t rest = buffer_size;
250 + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
253 + ret = ext3_get_inode_loc(inode, &iloc, 0);
256 + raw_inode = ext3_raw_inode(&iloc);
258 + storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
259 + EXT3_GOOD_OLD_INODE_SIZE -
260 + EXT3_I(inode)->i_extra_isize -
262 + start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
263 + EXT3_I(inode)->i_extra_isize;
264 + if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
268 + start += sizeof(__u32);
269 + end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
271 + last = (struct ext3_xattr_entry *) start;
272 + while (!IS_LAST_ENTRY(last)) {
273 + struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
274 + struct xattr_handler *handler;
275 + if (le32_to_cpu(last->e_value_size) > storage_size ||
276 + (char *) next >= end) {
277 + ext3_error(inode->i_sb, "ext3_xattr_ibody_list",
278 + "inode %ld", inode->i_ino);
282 + handler = ext3_xattr_handler(last->e_name_index);
284 + size += handler->list(inode, NULL, 0, last->e_name,
294 + if (size > buffer_size)
298 + last = (struct ext3_xattr_entry *) start;
300 + while (!IS_LAST_ENTRY(last)) {
301 + struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
302 + struct xattr_handler *handler;
303 + handler = ext3_xattr_handler(last->e_name_index);
305 + size_t size = handler->list(inode, buffer, rest,
326 + * ext3_xattr_list()
328 + * Copy a list of attribute names into the buffer
329 + * provided, or compute the buffer size required.
330 + * Buffer is NULL to compute the size of the buffer required.
332 + * Returns a negative error number on failure, or the number of bytes
333 + * used / required on success.
336 +ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size)
339 + int size = buffer_size;
341 + down_read(&EXT3_I(inode)->xattr_sem);
343 + /* get list of attributes stored in inode body */
344 + error = ext3_xattr_ibody_list(inode, buffer, buffer_size);
346 + /* some error occured while collecting
347 + * attributes in inode body */
353 + /* get list of attributes stored in dedicated block */
355 + buffer_size -= error;
356 + if (buffer_size <= 0) {
363 + error = ext3_xattr_block_list(inode, buffer, buffer_size);
365 + /* listing was successful, so we return len */
369 + up_read(&EXT3_I(inode)->xattr_sem);
370 + return error + size;
374 * If the EXT3_FEATURE_COMPAT_EXT_ATTR feature of this file system is
376 @@ -356,6 +583,279 @@ static void ext3_xattr_update_super_bloc
380 + * ext3_xattr_ibody_find()
382 + * search attribute and calculate free space in inode body
383 + * NOTE: free space includes space our attribute hold
386 +ext3_xattr_ibody_find(struct inode *inode, int name_index,
387 + const char *name, struct ext3_xattr_entry *rentry, int *free)
389 + struct ext3_xattr_entry *last;
390 + struct ext3_inode *raw_inode;
391 + int name_len = strlen(name);
392 + int err, storage_size;
393 + struct ext3_iloc iloc;
397 + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
400 + err = ext3_get_inode_loc(inode, &iloc, 0);
403 + raw_inode = ext3_raw_inode(&iloc);
405 + storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
406 + EXT3_GOOD_OLD_INODE_SIZE -
407 + EXT3_I(inode)->i_extra_isize -
409 + *free = storage_size - sizeof(__u32);
410 + start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
411 + EXT3_I(inode)->i_extra_isize;
412 + if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
416 + start += sizeof(__u32);
417 + end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
419 + last = (struct ext3_xattr_entry *) start;
420 + while (!IS_LAST_ENTRY(last)) {
421 + struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
422 + if (le32_to_cpu(last->e_value_size) > storage_size ||
423 + (char *) next >= end) {
424 + ext3_error(inode->i_sb, "ext3_xattr_ibody_find",
425 + "inode %ld", inode->i_ino);
430 + if (name_index == last->e_name_index &&
431 + name_len == last->e_name_len &&
432 + !memcmp(name, last->e_name, name_len)) {
433 + memcpy(rentry, last, sizeof(struct ext3_xattr_entry));
436 + *free -= EXT3_XATTR_LEN(last->e_name_len);
437 + *free -= le32_to_cpu(last->e_value_size);
447 + * ext3_xattr_block_find()
449 + * search attribute and calculate free space in EA block (if it allocated)
450 + * NOTE: free space includes space our attribute hold
453 +ext3_xattr_block_find(struct inode *inode, int name_index, const char *name,
454 + struct ext3_xattr_entry *rentry, int *free)
456 + struct buffer_head *bh = NULL;
457 + struct ext3_xattr_entry *entry;
459 + int name_len, error = -ENOENT;
461 + if (!EXT3_I(inode)->i_file_acl) {
462 + *free = inode->i_sb->s_blocksize -
463 + sizeof(struct ext3_xattr_header) -
467 + ea_idebug(inode, "reading block %d", EXT3_I(inode)->i_file_acl);
468 + bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl);
471 + ea_bdebug(bh, "b_count=%d, refcount=%d",
472 + atomic_read(&(bh->b_count)), le32_to_cpu(HDR(bh)->h_refcount));
473 + end = bh->b_data + bh->b_size;
474 + if (HDR(bh)->h_magic != cpu_to_le32(EXT3_XATTR_MAGIC) ||
475 + HDR(bh)->h_blocks != cpu_to_le32(1)) {
476 +bad_block: ext3_error(inode->i_sb, "ext3_xattr_get",
477 + "inode %ld: bad block %d", inode->i_ino,
478 + EXT3_I(inode)->i_file_acl);
482 + /* find named attribute */
483 + name_len = strlen(name);
484 + *free = bh->b_size - sizeof(__u32);
486 + entry = FIRST_ENTRY(bh);
487 + while (!IS_LAST_ENTRY(entry)) {
488 + struct ext3_xattr_entry *next =
489 + EXT3_XATTR_NEXT(entry);
490 + if ((char *)next >= end)
492 + if (name_index == entry->e_name_index &&
493 + name_len == entry->e_name_len &&
494 + memcmp(name, entry->e_name, name_len) == 0) {
495 + memcpy(rentry, entry, sizeof(struct ext3_xattr_entry));
498 + *free -= EXT3_XATTR_LEN(entry->e_name_len);
499 + *free -= le32_to_cpu(entry->e_value_size);
509 + * ext3_xattr_inode_set()
511 + * this routine add/remove/replace attribute in inode body
514 +ext3_xattr_ibody_set(handle_t *handle, struct inode *inode, int name_index,
515 + const char *name, const void *value, size_t value_len,
518 + struct ext3_xattr_entry *last, *next, *here = NULL;
519 + struct ext3_inode *raw_inode;
520 + int name_len = strlen(name);
521 + int esize = EXT3_XATTR_LEN(name_len);
522 + struct buffer_head *bh;
523 + int err, storage_size;
524 + struct ext3_iloc iloc;
525 + int free, min_offs;
528 + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
531 + err = ext3_get_inode_loc(inode, &iloc, 0);
534 + raw_inode = ext3_raw_inode(&iloc);
537 + storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
538 + EXT3_GOOD_OLD_INODE_SIZE -
539 + EXT3_I(inode)->i_extra_isize -
541 + start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
542 + EXT3_I(inode)->i_extra_isize;
543 + if ((*(__u32*) start) != EXT3_XATTR_MAGIC) {
544 + /* inode had no attributes before */
545 + *((__u32*) start) = cpu_to_le32(EXT3_XATTR_MAGIC);
547 + start += sizeof(__u32);
548 + end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
549 + min_offs = storage_size;
550 + free = storage_size - sizeof(__u32);
552 + last = (struct ext3_xattr_entry *) start;
553 + while (!IS_LAST_ENTRY(last)) {
554 + next = EXT3_XATTR_NEXT(last);
555 + if (le32_to_cpu(last->e_value_size) > storage_size ||
556 + (char *) next >= end) {
557 + ext3_error(inode->i_sb, "ext3_xattr_ibody_set",
558 + "inode %ld", inode->i_ino);
563 + if (last->e_value_size) {
564 + int offs = le16_to_cpu(last->e_value_offs);
565 + if (offs < min_offs)
568 + if (name_index == last->e_name_index &&
569 + name_len == last->e_name_len &&
570 + !memcmp(name, last->e_name, name_len))
573 + /* we calculate all but our attribute
574 + * because it will be removed before changing */
575 + free -= EXT3_XATTR_LEN(last->e_name_len);
576 + free -= le32_to_cpu(last->e_value_size);
581 + if (value && (esize + value_len > free)) {
586 + err = ext3_reserve_inode_write(handle, inode, &iloc);
593 + /* time to remove old value */
594 + struct ext3_xattr_entry *e;
595 + int size = le32_to_cpu(here->e_value_size);
596 + int border = le16_to_cpu(here->e_value_offs);
600 + memmove(start + min_offs + size, start + min_offs,
601 + border - min_offs);
603 + /* recalculate offsets */
604 + e = (struct ext3_xattr_entry *) start;
605 + while (!IS_LAST_ENTRY(e)) {
606 + struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(e);
607 + int offs = le16_to_cpu(e->e_value_offs);
610 + cpu_to_le16(offs + size);
616 + border = EXT3_XATTR_LEN(here->e_name_len);
617 + src = (char *) here + EXT3_XATTR_LEN(here->e_name_len);
618 + size = (char *) last - src;
619 + if ((char *) here + size > end)
620 + printk("ALERT at %s:%d: 0x%p + %d > 0x%p\n",
621 + __FILE__, __LINE__, here, size, end);
622 + memmove(here, src, size);
623 + last = (struct ext3_xattr_entry *) ((char *) last - border);
624 + *((__u32 *) last) = 0;
628 + int offs = min_offs - value_len;
629 + /* use last to create new entry */
630 + memset(last, 0, esize);
631 + last->e_name_len = strlen(name);
632 + last->e_name_index = name_index;
633 + last->e_value_offs = cpu_to_le16(offs);
634 + last->e_value_size = cpu_to_le32(value_len);
635 + last->e_hash = last->e_value_block = 0;
636 + memcpy(last->e_name, name, last->e_name_len);
637 + if (start + offs + value_len > end)
638 + printk("ALERT at %s:%d: 0x%p + %d + %zd > 0x%p\n",
639 + __FILE__, __LINE__, start, offs,
641 + memcpy(start + offs, value, value_len);
642 + last = EXT3_XATTR_NEXT(last);
643 + *((__u32 *) last) = 0;
646 + ext3_mark_iloc_dirty(handle, inode, &iloc);
653 * ext3_xattr_set_handle()
655 * Create, replace or remove an extended attribute for this inode. Buffer
656 @@ -369,6 +869,110 @@ static void ext3_xattr_update_super_bloc
659 ext3_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,
660 + const char *name, const void *value, size_t value_len,
663 + struct ext3_xattr_entry entry;
664 + int err, where = 0, found = 0, total;
665 + int free1 = -1, free2 = -1;
668 + ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
669 + name_index, name, value, (long)value_len);
671 + if (IS_RDONLY(inode))
673 + if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
679 + name_len = strlen(name);
680 + if (name_len > 255 || value_len > inode->i_sb->s_blocksize)
682 + down_write(&EXT3_I(inode)->xattr_sem);
684 + /* try to find attribute in inode body */
685 + err = ext3_xattr_ibody_find(inode, name_index, name, &entry, &free1);
687 + /* found EA in inode */
690 + } else if (err == -ENOENT) {
691 + /* there is no such attribute in inode body */
692 + /* try to find attribute in dedicated block */
693 + err = ext3_xattr_block_find(inode, name_index, name,
695 + if (err != 0 && err != -ENOENT) {
696 + /* not found EA in block */
698 + } else if (err == 0) {
699 + /* found EA in block */
706 + /* check flags: may replace? may create ? */
707 + if (found && (flags & XATTR_CREATE)) {
710 + } else if (!found && (flags & XATTR_REPLACE)) {
713 + } else if (!found && !value) {
718 + /* check if we have enough space to store attribute */
719 + total = EXT3_XATTR_LEN(strlen(name)) + value_len;
720 + if (free1 >= 0 && total > free1 && free2 >= 0 && total > free2) {
721 + /* have no enough space */
726 + /* time to remove attribute */
729 + /* EA is stored in inode body */
730 + ext3_xattr_ibody_set(handle, inode, name_index, name,
733 + /* EA is stored in separated block */
734 + ext3_xattr_block_set(handle, inode, name_index, name,
739 + /* Add entry if value is provided */
740 + if (value != NULL) {
741 + /* try to store EA in inode body */
742 + err = ext3_xattr_ibody_set(handle, inode, name_index, name,
743 + value, value_len, flags);
745 + /* can't store EA in inode body */
746 + /* try to store in block */
747 + err = ext3_xattr_block_set(handle, inode, name_index,
748 + name, value, value_len, flags);
753 + up_write(&EXT3_I(inode)->xattr_sem);
758 + * ext3_xattr_block_set()
760 + * this routine add/remove/replace attribute in EA block
763 +ext3_xattr_block_set(handle_t *handle, struct inode *inode, int name_index,
764 const char *name, const void *value, size_t value_len,
767 @@ -391,22 +995,7 @@ ext3_xattr_set_handle(handle_t *handle,
768 * towards the end of the block).
769 * end -- Points right after the block pointed to by header.
772 - ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
773 - name_index, name, value, (long)value_len);
775 - if (IS_RDONLY(inode))
777 - if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
783 name_len = strlen(name);
784 - if (name_len > 255 || value_len > sb->s_blocksize)
786 - down_write(&EXT3_I(inode)->xattr_sem);
787 if (EXT3_I(inode)->i_file_acl) {
788 /* The inode already has an extended attribute block. */
789 bh = sb_bread(sb, EXT3_I(inode)->i_file_acl);
790 @@ -638,7 +1227,6 @@ cleanup:
792 if (!(bh && header == HDR(bh)))
794 - up_write(&EXT3_I(inode)->xattr_sem);
798 Index: linux-2.6.9-67.0.20/fs/ext3/xattr.h
799 ===================================================================
800 --- linux-2.6.9-67.0.20.orig/fs/ext3/xattr.h
801 +++ linux-2.6.9-67.0.20/fs/ext3/xattr.h
802 @@ -67,7 +67,8 @@ extern ssize_t ext3_listxattr(struct den
803 extern int ext3_xattr_get(struct inode *, int, const char *, void *, size_t);
804 extern int ext3_xattr_list(struct inode *, char *, size_t);
805 extern int ext3_xattr_set(struct inode *, int, const char *, const void *, size_t, int);
806 -extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *, const void *, size_t, int);
807 +extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *,const void *,size_t,int);
808 +extern int ext3_xattr_block_set(handle_t *, struct inode *, int, const char *,const void *,size_t,int);
810 extern void ext3_xattr_delete_inode(handle_t *, struct inode *);
811 extern void ext3_xattr_put_super(struct super_block *);
812 Index: linux-2.6.9-67.0.20/include/linux/ext3_fs.h
813 ===================================================================
814 --- linux-2.6.9-67.0.20.orig/include/linux/ext3_fs.h
815 +++ linux-2.6.9-67.0.20/include/linux/ext3_fs.h
816 @@ -293,6 +293,8 @@ struct ext3_inode {
817 __u32 m_i_reserved2[2];
819 } osd2; /* OS dependent 2 */
820 + __u16 i_extra_isize;
824 #define i_size_high i_dir_acl
825 @@ -757,6 +759,7 @@ extern unsigned long ext3_count_free (st
826 extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
827 extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
828 extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
829 +int ext3_get_inode_loc(struct inode *inode, struct ext3_iloc *iloc, int in_mem);
831 extern void ext3_read_inode (struct inode *);
832 extern int ext3_write_inode (struct inode *, int);
833 Index: linux-2.6.9-67.0.20/include/linux/ext3_fs_i.h
834 ===================================================================
835 --- linux-2.6.9-67.0.20.orig/include/linux/ext3_fs_i.h
836 +++ linux-2.6.9-67.0.20/include/linux/ext3_fs_i.h
837 @@ -113,6 +113,9 @@ struct ext3_inode_info {
841 + /* on-disk additional length */
842 + __u16 i_extra_isize;
845 * truncate_sem is for serialising ext3_truncate() against
846 * ext3_getblock(). In the 2.4 ext2 design, great chunks of inode's