2 Index: linux-2.6.0/fs/ext3/ialloc.c
3 ===================================================================
4 --- linux-2.6.0.orig/fs/ext3/ialloc.c 2004-01-14 18:54:11.000000000 +0300
5 +++ linux-2.6.0/fs/ext3/ialloc.c 2004-01-14 18:54:12.000000000 +0300
7 inode->i_generation = EXT3_SB(sb)->s_next_generation++;
9 ei->i_state = EXT3_STATE_NEW;
10 + if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) {
11 + ei->i_extra_isize = sizeof(__u16) /* i_extra_isize */
12 + + sizeof(__u16); /* i_pad1 */
14 + ei->i_extra_isize = 0;
17 if(DQUOT_ALLOC_INODE(inode)) {
18 Index: linux-2.6.0/fs/ext3/inode.c
19 ===================================================================
20 --- linux-2.6.0.orig/fs/ext3/inode.c 2004-01-14 18:54:12.000000000 +0300
21 +++ linux-2.6.0/fs/ext3/inode.c 2004-01-14 19:09:46.000000000 +0300
23 * trying to determine the inode's location on-disk and no read need be
26 -static int ext3_get_inode_loc(struct inode *inode,
27 +int ext3_get_inode_loc(struct inode *inode,
28 struct ext3_iloc *iloc, int in_mem)
31 @@ -2547,6 +2547,11 @@
32 ei->i_data[block] = raw_inode->i_block[block];
33 INIT_LIST_HEAD(&ei->i_orphan);
35 + if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE)
36 + ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
38 + ei->i_extra_isize = 0;
40 if (S_ISREG(inode->i_mode)) {
41 inode->i_op = &ext3_file_inode_operations;
42 inode->i_fop = &ext3_file_operations;
44 } else for (block = 0; block < EXT3_N_BLOCKS; block++)
45 raw_inode->i_block[block] = ei->i_data[block];
47 + if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE)
48 + raw_inode->i_extra_isize = cpu_to_le16(ei->i_extra_isize);
50 BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
51 rc = ext3_journal_dirty_metadata(handle, bh);
53 @@ -2849,7 +2857,8 @@ ext3_reserve_inode_write(handle_t *handl
57 - err = ext3_get_inode_loc(inode, iloc, 1);
58 + err = ext3_get_inode_loc(inode, iloc, EXT3_I(inode)->i_state &
61 BUFFER_TRACE(iloc->bh, "get_write_access");
62 err = ext3_journal_get_write_access(handle, iloc->bh);
63 Index: linux-2.6.0/fs/ext3/xattr.c
64 ===================================================================
65 --- linux-2.6.0.orig/fs/ext3/xattr.c 2003-12-30 08:33:13.000000000 +0300
66 +++ linux-2.6.0/fs/ext3/xattr.c 2004-01-14 18:54:12.000000000 +0300
73 - * Copy an extended attribute into the buffer
74 - * provided, or compute the buffer size required.
75 - * Buffer is NULL to compute the size of the buffer required.
76 + * ext3_xattr_block_get()
78 - * Returns a negative error number on failure, or the number of bytes
79 - * used / required on success.
80 + * routine looks for attribute in EA block and returns it's value and size
83 -ext3_xattr_get(struct inode *inode, int name_index, const char *name,
84 +ext3_xattr_block_get(struct inode *inode, int name_index, const char *name,
85 void *buffer, size_t buffer_size)
87 struct buffer_head *bh = NULL;
92 - down_read(&EXT3_I(inode)->xattr_sem);
94 if (!EXT3_I(inode)->i_file_acl)
100 - up_read(&EXT3_I(inode)->xattr_sem);
106 - * ext3_xattr_list()
107 + * ext3_xattr_ibody_get()
109 - * Copy a list of attribute names into the buffer
110 + * routine looks for attribute in inode body and returns it's value and size
113 +ext3_xattr_ibody_get(struct inode *inode, int name_index, const char *name,
114 + void *buffer, size_t buffer_size)
116 + int size, name_len = strlen(name), storage_size;
117 + struct ext3_xattr_entry *last;
118 + struct ext3_inode *raw_inode;
119 + struct ext3_iloc iloc;
123 + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
126 + ret = ext3_get_inode_loc(inode, &iloc, 0);
129 + raw_inode = ext3_raw_inode(&iloc);
131 + storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
132 + EXT3_GOOD_OLD_INODE_SIZE -
133 + EXT3_I(inode)->i_extra_isize -
135 + start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
136 + EXT3_I(inode)->i_extra_isize;
137 + if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
141 + start += sizeof(__u32);
142 + end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
144 + last = (struct ext3_xattr_entry *) start;
145 + while (!IS_LAST_ENTRY(last)) {
146 + struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
147 + if (le32_to_cpu(last->e_value_size) > storage_size ||
148 + (char *) next >= end) {
149 + ext3_error(inode->i_sb, "ext3_xattr_ibody_get",
150 + "inode %ld", inode->i_ino);
154 + if (name_index == last->e_name_index &&
155 + name_len == last->e_name_len &&
156 + !memcmp(name, last->e_name, name_len))
161 + /* can't find EA */
166 + size = le32_to_cpu(last->e_value_size);
169 + if (buffer_size >= size) {
170 + memcpy(buffer, start + le16_to_cpu(last->e_value_offs),
183 + * Copy an extended attribute into the buffer
184 * provided, or compute the buffer size required.
185 * Buffer is NULL to compute the size of the buffer required.
188 * used / required on success.
191 -ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size)
192 +ext3_xattr_get(struct inode *inode, int name_index, const char *name,
193 + void *buffer, size_t buffer_size)
197 + down_read(&EXT3_I(inode)->xattr_sem);
199 + /* try to find attribute in inode body */
200 + err = ext3_xattr_ibody_get(inode, name_index, name,
201 + buffer, buffer_size);
203 + /* search was unsuccessful, try to find EA in dedicated block */
204 + err = ext3_xattr_block_get(inode, name_index, name,
205 + buffer, buffer_size);
206 + up_read(&EXT3_I(inode)->xattr_sem);
211 +/* ext3_xattr_ibody_list()
213 + * generate list of attributes stored in EA block
216 +ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size)
218 struct buffer_head *bh = NULL;
219 struct ext3_xattr_entry *entry;
221 ea_idebug(inode, "buffer=%p, buffer_size=%ld",
222 buffer, (long)buffer_size);
224 - down_read(&EXT3_I(inode)->xattr_sem);
226 if (!EXT3_I(inode)->i_file_acl)
228 @@ -431,11 +520,138 @@
232 - up_read(&EXT3_I(inode)->xattr_sem);
237 +/* ext3_xattr_ibody_list()
239 + * generate list of attributes stored in inode body
242 +ext3_xattr_ibody_list(struct inode *inode, char *buffer, size_t buffer_size)
244 + struct ext3_xattr_entry *last;
245 + struct ext3_inode *raw_inode;
246 + char *start, *end, *buf;
247 + struct ext3_iloc iloc;
252 + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
255 + ret = ext3_get_inode_loc(inode, &iloc, 0);
258 + raw_inode = ext3_raw_inode(&iloc);
260 + storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
261 + EXT3_GOOD_OLD_INODE_SIZE -
262 + EXT3_I(inode)->i_extra_isize -
264 + start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
265 + EXT3_I(inode)->i_extra_isize;
266 + if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
270 + start += sizeof(__u32);
271 + end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
273 + last = (struct ext3_xattr_entry *) start;
274 + while (!IS_LAST_ENTRY(last)) {
275 + struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
276 + struct ext3_xattr_handler *handler;
277 + if (le32_to_cpu(last->e_value_size) > storage_size ||
278 + (char *) next >= end) {
279 + ext3_error(inode->i_sb, "ext3_xattr_ibody_list",
280 + "inode %ld", inode->i_ino);
284 + handler = ext3_xattr_handler(last->e_name_index);
286 + size += handler->list(NULL, inode, last->e_name,
296 + if (size > buffer_size)
300 + last = (struct ext3_xattr_entry *) start;
302 + while (!IS_LAST_ENTRY(last)) {
303 + struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
304 + struct ext3_xattr_handler *handler;
305 + handler = ext3_xattr_handler(last->e_name_index);
307 + buf += handler->list(buf, inode, last->e_name,
318 + * ext3_xattr_list()
320 + * Copy a list of attribute names into the buffer
321 + * provided, or compute the buffer size required.
322 + * Buffer is NULL to compute the size of the buffer required.
324 + * Returns a negative error number on failure, or the number of bytes
325 + * used / required on success.
328 +ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size)
331 + int size = buffer_size;
333 + down_read(&EXT3_I(inode)->xattr_sem);
335 + /* get list of attributes stored in inode body */
336 + error = ext3_xattr_ibody_list(inode, buffer, buffer_size);
338 + /* some error occured while collecting
339 + * attributes in inode body */
345 + /* get list of attributes stored in dedicated block */
347 + buffer_size -= error;
348 + if (buffer_size <= 0) {
355 + error = ext3_xattr_block_list(inode, buffer, buffer_size);
357 + /* listing was successful, so we return len */
361 + up_read(&EXT3_I(inode)->xattr_sem);
362 + return error + size;
366 * If the EXT3_FEATURE_COMPAT_EXT_ATTR feature of this file system is
368 @@ -457,6 +673,279 @@
372 + * ext3_xattr_ibody_find()
374 + * search attribute and calculate free space in inode body
375 + * NOTE: free space includes space our attribute hold
378 +ext3_xattr_ibody_find(struct inode *inode, int name_index,
379 + const char *name, struct ext3_xattr_entry *rentry, int *free)
381 + struct ext3_xattr_entry *last;
382 + struct ext3_inode *raw_inode;
383 + int name_len = strlen(name);
384 + int err, storage_size;
385 + struct ext3_iloc iloc;
389 + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
392 + err = ext3_get_inode_loc(inode, &iloc, 0);
395 + raw_inode = ext3_raw_inode(&iloc);
397 + storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
398 + EXT3_GOOD_OLD_INODE_SIZE -
399 + EXT3_I(inode)->i_extra_isize -
401 + *free = storage_size - sizeof(__u32);
402 + start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
403 + EXT3_I(inode)->i_extra_isize;
404 + if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
408 + start += sizeof(__u32);
409 + end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
411 + last = (struct ext3_xattr_entry *) start;
412 + while (!IS_LAST_ENTRY(last)) {
413 + struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
414 + if (le32_to_cpu(last->e_value_size) > storage_size ||
415 + (char *) next >= end) {
416 + ext3_error(inode->i_sb, "ext3_xattr_ibody_find",
417 + "inode %ld", inode->i_ino);
422 + if (name_index == last->e_name_index &&
423 + name_len == last->e_name_len &&
424 + !memcmp(name, last->e_name, name_len)) {
425 + memcpy(rentry, last, sizeof(struct ext3_xattr_entry));
428 + *free -= EXT3_XATTR_LEN(last->e_name_len);
429 + *free -= le32_to_cpu(last->e_value_size);
439 + * ext3_xattr_block_find()
441 + * search attribute and calculate free space in EA block (if it allocated)
442 + * NOTE: free space includes space our attribute hold
445 +ext3_xattr_block_find(struct inode *inode, int name_index, const char *name,
446 + struct ext3_xattr_entry *rentry, int *free)
448 + struct buffer_head *bh = NULL;
449 + struct ext3_xattr_entry *entry;
451 + int name_len, error = -ENOENT;
453 + if (!EXT3_I(inode)->i_file_acl) {
454 + *free = inode->i_sb->s_blocksize -
455 + sizeof(struct ext3_xattr_header) -
459 + ea_idebug(inode, "reading block %d", EXT3_I(inode)->i_file_acl);
460 + bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl);
463 + ea_bdebug(bh, "b_count=%d, refcount=%d",
464 + atomic_read(&(bh->b_count)), le32_to_cpu(HDR(bh)->h_refcount));
465 + end = bh->b_data + bh->b_size;
466 + if (HDR(bh)->h_magic != cpu_to_le32(EXT3_XATTR_MAGIC) ||
467 + HDR(bh)->h_blocks != cpu_to_le32(1)) {
468 +bad_block: ext3_error(inode->i_sb, "ext3_xattr_get",
469 + "inode %ld: bad block %d", inode->i_ino,
470 + EXT3_I(inode)->i_file_acl);
474 + /* find named attribute */
475 + name_len = strlen(name);
476 + *free = bh->b_size - sizeof(__u32);
478 + entry = FIRST_ENTRY(bh);
479 + while (!IS_LAST_ENTRY(entry)) {
480 + struct ext3_xattr_entry *next =
481 + EXT3_XATTR_NEXT(entry);
482 + if ((char *)next >= end)
484 + if (name_index == entry->e_name_index &&
485 + name_len == entry->e_name_len &&
486 + memcmp(name, entry->e_name, name_len) == 0) {
487 + memcpy(rentry, entry, sizeof(struct ext3_xattr_entry));
490 + *free -= EXT3_XATTR_LEN(entry->e_name_len);
491 + *free -= le32_to_cpu(entry->e_value_size);
501 + * ext3_xattr_inode_set()
503 + * this routine add/remove/replace attribute in inode body
506 +ext3_xattr_ibody_set(handle_t *handle, struct inode *inode, int name_index,
507 + const char *name, const void *value, size_t value_len,
510 + struct ext3_xattr_entry *last, *next, *here = NULL;
511 + struct ext3_inode *raw_inode;
512 + int name_len = strlen(name);
513 + int esize = EXT3_XATTR_LEN(name_len);
514 + struct buffer_head *bh;
515 + int err, storage_size;
516 + struct ext3_iloc iloc;
517 + int free, min_offs;
520 + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
523 + err = ext3_get_inode_loc(inode, &iloc, 0);
526 + raw_inode = ext3_raw_inode(&iloc);
529 + storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
530 + EXT3_GOOD_OLD_INODE_SIZE -
531 + EXT3_I(inode)->i_extra_isize -
533 + start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
534 + EXT3_I(inode)->i_extra_isize;
535 + if ((*(__u32*) start) != EXT3_XATTR_MAGIC) {
536 + /* inode had no attributes before */
537 + *((__u32*) start) = cpu_to_le32(EXT3_XATTR_MAGIC);
539 + start += sizeof(__u32);
540 + end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
541 + min_offs = storage_size;
542 + free = storage_size - sizeof(__u32);
544 + last = (struct ext3_xattr_entry *) start;
545 + while (!IS_LAST_ENTRY(last)) {
546 + next = EXT3_XATTR_NEXT(last);
547 + if (le32_to_cpu(last->e_value_size) > storage_size ||
548 + (char *) next >= end) {
549 + ext3_error(inode->i_sb, "ext3_xattr_ibody_set",
550 + "inode %ld", inode->i_ino);
555 + if (last->e_value_size) {
556 + int offs = le16_to_cpu(last->e_value_offs);
557 + if (offs < min_offs)
560 + if (name_index == last->e_name_index &&
561 + name_len == last->e_name_len &&
562 + !memcmp(name, last->e_name, name_len))
565 + /* we calculate all but our attribute
566 + * because it will be removed before changing */
567 + free -= EXT3_XATTR_LEN(last->e_name_len);
568 + free -= le32_to_cpu(last->e_value_size);
573 + if (value && (esize + value_len > free)) {
578 + err = ext3_reserve_inode_write(handle, inode, &iloc);
585 + /* time to remove old value */
586 + struct ext3_xattr_entry *e;
587 + int size = le32_to_cpu(here->e_value_size);
588 + int border = le16_to_cpu(here->e_value_offs);
592 + memmove(start + min_offs + size, start + min_offs,
593 + border - min_offs);
595 + /* recalculate offsets */
596 + e = (struct ext3_xattr_entry *) start;
597 + while (!IS_LAST_ENTRY(e)) {
598 + struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(e);
599 + int offs = le16_to_cpu(e->e_value_offs);
602 + cpu_to_le16(offs + size);
608 + border = EXT3_XATTR_LEN(here->e_name_len);
609 + src = (char *) here + EXT3_XATTR_LEN(here->e_name_len);
610 + size = (char *) last - src;
611 + if ((char *) here + size > end)
612 + printk("ALERT at %s:%d: 0x%p + %d > 0x%p\n",
613 + __FILE__, __LINE__, here, size, end);
614 + memmove(here, src, size);
615 + last = (struct ext3_xattr_entry *) ((char *) last - border);
616 + *((__u32 *) last) = 0;
620 + int offs = min_offs - value_len;
621 + /* use last to create new entry */
622 + last->e_name_len = strlen(name);
623 + last->e_name_index = name_index;
624 + last->e_value_offs = cpu_to_le16(offs);
625 + last->e_value_size = cpu_to_le32(value_len);
626 + last->e_hash = last->e_value_block = 0;
627 + memset(last->e_name, 0, esize);
628 + memcpy(last->e_name, name, last->e_name_len);
629 + if (start + offs + value_len > end)
630 + printk("ALERT at %s:%d: 0x%p + %d + %zd > 0x%p\n",
631 + __FILE__, __LINE__, start, offs,
633 + memcpy(start + offs, value, value_len);
634 + last = EXT3_XATTR_NEXT(last);
635 + *((__u32 *) last) = 0;
638 + ext3_mark_iloc_dirty(handle, inode, &iloc);
645 * ext3_xattr_set_handle()
647 * Create, replace or remove an extended attribute for this inode. Buffer
648 @@ -470,6 +959,104 @@
651 ext3_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,
652 + const char *name, const void *value, size_t value_len,
655 + struct ext3_xattr_entry entry;
656 + int err, where = 0, found = 0, total;
657 + int free1 = -1, free2 = -1;
660 + ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
661 + name_index, name, value, (long)value_len);
663 + if (IS_RDONLY(inode))
665 + if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
671 + name_len = strlen(name);
672 + if (name_len > 255 || value_len > inode->i_sb->s_blocksize)
674 + down_write(&EXT3_I(inode)->xattr_sem);
676 + /* try to find attribute in inode body */
677 + err = ext3_xattr_ibody_find(inode, name_index, name, &entry, &free1);
679 + /* found EA in inode */
682 + } else if (err == -ENOENT) {
683 + /* there is no such attribute in inode body */
684 + /* try to find attribute in dedicated block */
685 + err = ext3_xattr_block_find(inode, name_index, name,
687 + if (err != 0 && err != -ENOENT) {
688 + /* not found EA in block */
690 + } else if (err == 0) {
691 + /* found EA in block */
698 + /* check flags: may replace? may create ? */
699 + if (found && (flags & XATTR_CREATE)) {
702 + } else if (!found && (flags & XATTR_REPLACE)) {
707 + /* check if we have enough space to store attribute */
708 + total = EXT3_XATTR_LEN(strlen(name)) + value_len;
709 + if (free1 >= 0 && total > free1 && free2 >= 0 && total > free2) {
710 + /* have no enough space */
715 + /* time to remove attribute */
718 + /* EA is stored in inode body */
719 + ext3_xattr_ibody_set(handle, inode, name_index, name,
722 + /* EA is stored in separated block */
723 + ext3_xattr_block_set(handle, inode, name_index, name,
728 + /* try to store EA in inode body */
729 + err = ext3_xattr_ibody_set(handle, inode, name_index, name,
730 + value, value_len, flags);
732 + /* can't store EA in inode body */
733 + /* try to store in block */
734 + err = ext3_xattr_block_set(handle, inode, name_index,
735 + name, value, value_len, flags);
739 + up_write(&EXT3_I(inode)->xattr_sem);
744 + * ext3_xattr_block_set()
746 + * this routine add/remove/replace attribute in EA block
749 +ext3_xattr_block_set(handle_t *handle, struct inode *inode, int name_index,
750 const char *name, const void *value, size_t value_len,
753 @@ -492,22 +1078,7 @@
754 * towards the end of the block).
755 * end -- Points right after the block pointed to by header.
758 - ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
759 - name_index, name, value, (long)value_len);
761 - if (IS_RDONLY(inode))
763 - if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
769 name_len = strlen(name);
770 - if (name_len > 255 || value_len > sb->s_blocksize)
772 - down_write(&EXT3_I(inode)->xattr_sem);
773 if (EXT3_I(inode)->i_file_acl) {
774 /* The inode already has an extended attribute block. */
775 bh = sb_bread(sb, EXT3_I(inode)->i_file_acl);
778 if (!(bh && header == HDR(bh)))
780 - up_write(&EXT3_I(inode)->xattr_sem);
784 Index: linux-2.6.0/fs/ext3/xattr.h
785 ===================================================================
786 --- linux-2.6.0.orig/fs/ext3/xattr.h 2003-06-24 18:04:43.000000000 +0400
787 +++ linux-2.6.0/fs/ext3/xattr.h 2004-01-14 18:54:12.000000000 +0300
789 extern int ext3_xattr_get(struct inode *, int, const char *, void *, size_t);
790 extern int ext3_xattr_list(struct inode *, char *, size_t);
791 extern int ext3_xattr_set(struct inode *, int, const char *, const void *, size_t, int);
792 -extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *, const void *, size_t, int);
793 +extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *,const void *,size_t,int);
794 +extern int ext3_xattr_block_set(handle_t *, struct inode *, int, const char *,const void *,size_t,int);
796 extern void ext3_xattr_delete_inode(handle_t *, struct inode *);
797 extern void ext3_xattr_put_super(struct super_block *);
798 Index: linux-2.6.0/include/linux/ext3_fs.h
799 ===================================================================
800 --- linux-2.6.0.orig/include/linux/ext3_fs.h 2004-01-14 18:54:11.000000000 +0300
801 +++ linux-2.6.0/include/linux/ext3_fs.h 2004-01-14 18:54:12.000000000 +0300
803 __u32 m_i_reserved2[2];
805 } osd2; /* OS dependent 2 */
806 + __u16 i_extra_isize;
810 #define i_size_high i_dir_acl
812 extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
813 extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
814 extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
815 +int ext3_get_inode_loc(struct inode *inode, struct ext3_iloc *iloc, int in_mem);
817 extern void ext3_read_inode (struct inode *);
818 extern void ext3_write_inode (struct inode *, int);
819 Index: linux-2.6.0/include/linux/ext3_fs_i.h
820 ===================================================================
821 --- linux-2.6.0.orig/include/linux/ext3_fs_i.h 2003-12-30 08:32:44.000000000 +0300
822 +++ linux-2.6.0/include/linux/ext3_fs_i.h 2004-01-14 18:54:12.000000000 +0300
827 + /* on-disk additional length */
828 + __u16 i_extra_isize;
831 * truncate_sem is for serialising ext3_truncate() against
832 * ext3_getblock(). In the 2.4 ext2 design, great chunks of inode's
837 fs/ext3/xattr.c | 634 +++++++++++++++++++++++++++++++++++++++++++---
839 include/linux/ext3_fs.h | 2
840 include/linux/ext3_fs_i.h | 3
841 6 files changed, 623 insertions(+), 34 deletions(-)