2 Index: linux-2.6.10/fs/ext3/inode.c
3 ===================================================================
4 --- linux-2.6.10.orig/fs/ext3/inode.c 2005-03-31 20:12:32.748192632 +0800
5 +++ linux-2.6.10/fs/ext3/inode.c 2005-03-31 20:12:35.433784360 +0800
7 * trying to determine the inode's location on-disk and no read need be
10 -static int ext3_get_inode_loc(struct inode *inode,
11 +int ext3_get_inode_loc(struct inode *inode,
12 struct ext3_iloc *iloc, int in_mem)
15 @@ -2484,6 +2484,11 @@
16 ei->i_data[block] = raw_inode->i_block[block];
17 INIT_LIST_HEAD(&ei->i_orphan);
19 + if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE)
20 + ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
22 + ei->i_extra_isize = 0;
24 if (S_ISREG(inode->i_mode)) {
25 inode->i_op = &ext3_file_inode_operations;
26 inode->i_fop = &ext3_file_operations;
28 } else for (block = 0; block < EXT3_N_BLOCKS; block++)
29 raw_inode->i_block[block] = ei->i_data[block];
31 + if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE)
32 + raw_inode->i_extra_isize = cpu_to_le16(ei->i_extra_isize);
34 BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
35 rc = ext3_journal_dirty_metadata(handle, bh);
37 Index: linux-2.6.10/fs/ext3/ialloc.c
38 ===================================================================
39 --- linux-2.6.10.orig/fs/ext3/ialloc.c 2005-03-31 20:12:28.734802760 +0800
40 +++ linux-2.6.10/fs/ext3/ialloc.c 2005-03-31 20:12:35.434784208 +0800
42 spin_unlock(&sbi->s_next_gen_lock);
44 ei->i_state = EXT3_STATE_NEW;
45 + if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) {
46 + ei->i_extra_isize = sizeof(__u16) /* i_extra_isize */
47 + + sizeof(__u16); /* i_pad1 */
49 + ei->i_extra_isize = 0;
52 if(DQUOT_ALLOC_INODE(inode)) {
53 Index: linux-2.6.10/fs/ext3/xattr.c
54 ===================================================================
55 --- linux-2.6.10.orig/fs/ext3/xattr.c 2005-03-31 19:44:53.846384040 +0800
56 +++ linux-2.6.10/fs/ext3/xattr.c 2005-03-31 20:13:25.376191960 +0800
63 - * Copy an extended attribute into the buffer
64 - * provided, or compute the buffer size required.
65 - * Buffer is NULL to compute the size of the buffer required.
66 + * ext3_xattr_block_get()
68 - * Returns a negative error number on failure, or the number of bytes
69 - * used / required on success.
70 + * routine looks for attribute in EA block and returns it's value and size
73 -ext3_xattr_get(struct inode *inode, int name_index, const char *name,
74 +ext3_xattr_block_get(struct inode *inode, int name_index, const char *name,
75 void *buffer, size_t buffer_size)
77 struct buffer_head *bh = NULL;
82 - down_read(&EXT3_I(inode)->xattr_sem);
84 if (!EXT3_I(inode)->i_file_acl)
90 - up_read(&EXT3_I(inode)->xattr_sem);
97 + * ext3_xattr_ibode_get()
99 - * Copy a list of attribute names into the buffer
100 + * routine looks for attribute in inode body and returns it's value and size
103 +ext3_xattr_ibody_get(struct inode *inode, int name_index, const char *name,
104 + void *buffer, size_t buffer_size)
106 + int size, name_len = strlen(name), storage_size;
107 + struct ext3_xattr_entry *last;
108 + struct ext3_inode *raw_inode;
109 + struct ext3_iloc iloc;
113 + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
116 + ret = ext3_get_inode_loc(inode, &iloc, 1);
119 + raw_inode = ext3_raw_inode(&iloc);
121 + storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
122 + EXT3_GOOD_OLD_INODE_SIZE -
123 + EXT3_I(inode)->i_extra_isize -
125 + start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
126 + EXT3_I(inode)->i_extra_isize;
127 + if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
131 + start += sizeof(__u32);
132 + end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
134 + last = (struct ext3_xattr_entry *) start;
135 + while (!IS_LAST_ENTRY(last)) {
136 + struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
137 + if (le32_to_cpu(last->e_value_size) > storage_size ||
138 + (char *) next >= end) {
139 + ext3_error(inode->i_sb, "ext3_xattr_ibody_get",
140 + "inode %ld", inode->i_ino);
144 + if (name_index == last->e_name_index &&
145 + name_len == last->e_name_len &&
146 + !memcmp(name, last->e_name, name_len))
151 + /* can't find EA */
156 + size = le32_to_cpu(last->e_value_size);
159 + if (buffer_size >= size) {
160 + memcpy(buffer, start + le16_to_cpu(last->e_value_offs),
173 + * Copy an extended attribute into the buffer
174 * provided, or compute the buffer size required.
175 * Buffer is NULL to compute the size of the buffer required.
178 * used / required on success.
181 -ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size)
182 +ext3_xattr_get(struct inode *inode, int name_index, const char *name,
183 + void *buffer, size_t buffer_size)
187 + down_read(&EXT3_I(inode)->xattr_sem);
189 + /* try to find attribute in inode body */
190 + err = ext3_xattr_ibody_get(inode, name_index, name,
191 + buffer, buffer_size);
193 + /* search was unsuccessful, try to find EA in dedicated block */
194 + err = ext3_xattr_block_get(inode, name_index, name,
195 + buffer, buffer_size);
196 + up_read(&EXT3_I(inode)->xattr_sem);
201 +/* ext3_xattr_ibody_list()
203 + * generate list of attributes stored in EA block
206 +ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size)
208 struct buffer_head *bh = NULL;
209 struct ext3_xattr_entry *entry;
211 ea_idebug(inode, "buffer=%p, buffer_size=%ld",
212 buffer, (long)buffer_size);
214 - down_read(&EXT3_I(inode)->xattr_sem);
216 if (!EXT3_I(inode)->i_file_acl)
221 ea_bdebug(bh, "b_count=%d, refcount=%d",
222 - atomic_read(&(bh->b_count)), le32_to_cpu(HDR(bh)->h_refcount));
223 + (int) atomic_read(&(bh->b_count)), (int) le32_to_cpu(HDR(bh)->h_refcount));
224 end = bh->b_data + bh->b_size;
225 if (HDR(bh)->h_magic != cpu_to_le32(EXT3_XATTR_MAGIC) ||
226 HDR(bh)->h_blocks != cpu_to_le32(1)) {
227 @@ -330,11 +419,149 @@
231 - up_read(&EXT3_I(inode)->xattr_sem);
236 +/* ext3_xattr_ibody_list()
238 + * generate list of attributes stored in inode body
241 +ext3_xattr_ibody_list(struct inode *inode, char *buffer, size_t buffer_size)
243 + struct ext3_xattr_entry *last;
244 + struct ext3_inode *raw_inode;
245 + char *start, *end, *buf;
246 + struct ext3_iloc iloc;
248 + size_t rest = buffer_size;
252 + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
255 + ret = ext3_get_inode_loc(inode, &iloc, 1);
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 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(inode, NULL, 0, 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 xattr_handler *handler;
305 + handler = ext3_xattr_handler(last->e_name_index);
307 + size_t size = handler->list(inode, buffer, rest,
328 + * ext3_xattr_list()
330 + * Copy a list of attribute names into the buffer
331 + * provided, or compute the buffer size required.
332 + * Buffer is NULL to compute the size of the buffer required.
334 + * Returns a negative error number on failure, or the number of bytes
335 + * used / required on success.
338 +ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size)
341 + int size = buffer_size;
343 + down_read(&EXT3_I(inode)->xattr_sem);
345 + /* get list of attributes stored in inode body */
346 + error = ext3_xattr_ibody_list(inode, buffer, buffer_size);
348 + /* some error occured while collecting
349 + * attributes in inode body */
355 + /* get list of attributes stored in dedicated block */
357 + buffer_size -= error;
358 + if (buffer_size <= 0) {
365 + error = ext3_xattr_block_list(inode, buffer, buffer_size);
367 + /* listing was successful, so we return len */
371 + up_read(&EXT3_I(inode)->xattr_sem);
372 + return error + size;
376 * If the EXT3_FEATURE_COMPAT_EXT_ATTR feature of this file system is
378 @@ -356,6 +583,279 @@
382 + * ext3_xattr_ibody_find()
384 + * search attribute and calculate free space in inode body
385 + * NOTE: free space includes space our attribute hold
388 +ext3_xattr_ibody_find(struct inode *inode, int name_index,
389 + const char *name, struct ext3_xattr_entry *rentry, int *free)
391 + struct ext3_xattr_entry *last;
392 + struct ext3_inode *raw_inode;
393 + int name_len = strlen(name);
394 + int err, storage_size;
395 + struct ext3_iloc iloc;
399 + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
402 + err = ext3_get_inode_loc(inode, &iloc, 1);
405 + raw_inode = ext3_raw_inode(&iloc);
407 + storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
408 + EXT3_GOOD_OLD_INODE_SIZE -
409 + EXT3_I(inode)->i_extra_isize -
411 + *free = storage_size - sizeof(__u32);
412 + start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
413 + EXT3_I(inode)->i_extra_isize;
414 + if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
418 + start += sizeof(__u32);
419 + end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
421 + last = (struct ext3_xattr_entry *) start;
422 + while (!IS_LAST_ENTRY(last)) {
423 + struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
424 + if (le32_to_cpu(last->e_value_size) > storage_size ||
425 + (char *) next >= end) {
426 + ext3_error(inode->i_sb, "ext3_xattr_ibody_find",
427 + "inode %ld", inode->i_ino);
432 + if (name_index == last->e_name_index &&
433 + name_len == last->e_name_len &&
434 + !memcmp(name, last->e_name, name_len)) {
435 + memcpy(rentry, last, sizeof(struct ext3_xattr_entry));
438 + *free -= EXT3_XATTR_LEN(last->e_name_len);
439 + *free -= le32_to_cpu(last->e_value_size);
449 + * ext3_xattr_block_find()
451 + * search attribute and calculate free space in EA block (if it allocated)
452 + * NOTE: free space includes space our attribute hold
455 +ext3_xattr_block_find(struct inode *inode, int name_index, const char *name,
456 + struct ext3_xattr_entry *rentry, int *free)
458 + struct buffer_head *bh = NULL;
459 + struct ext3_xattr_entry *entry;
461 + int name_len, error = -ENOENT;
463 + if (!EXT3_I(inode)->i_file_acl) {
464 + *free = inode->i_sb->s_blocksize -
465 + sizeof(struct ext3_xattr_header) -
469 + ea_idebug(inode, "reading block %d", EXT3_I(inode)->i_file_acl);
470 + bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl);
473 + ea_bdebug(bh, "b_count=%d, refcount=%d",
474 + atomic_read(&(bh->b_count)), le32_to_cpu(HDR(bh)->h_refcount));
475 + end = bh->b_data + bh->b_size;
476 + if (HDR(bh)->h_magic != cpu_to_le32(EXT3_XATTR_MAGIC) ||
477 + HDR(bh)->h_blocks != cpu_to_le32(1)) {
478 +bad_block: ext3_error(inode->i_sb, "ext3_xattr_get",
479 + "inode %ld: bad block %d", inode->i_ino,
480 + EXT3_I(inode)->i_file_acl);
484 + /* find named attribute */
485 + name_len = strlen(name);
486 + *free = bh->b_size - sizeof(__u32);
488 + entry = FIRST_ENTRY(bh);
489 + while (!IS_LAST_ENTRY(entry)) {
490 + struct ext3_xattr_entry *next =
491 + EXT3_XATTR_NEXT(entry);
492 + if ((char *)next >= end)
494 + if (name_index == entry->e_name_index &&
495 + name_len == entry->e_name_len &&
496 + memcmp(name, entry->e_name, name_len) == 0) {
497 + memcpy(rentry, entry, sizeof(struct ext3_xattr_entry));
500 + *free -= EXT3_XATTR_LEN(entry->e_name_len);
501 + *free -= le32_to_cpu(entry->e_value_size);
511 + * ext3_xattr_inode_set()
513 + * this routine add/remove/replace attribute in inode body
516 +ext3_xattr_ibody_set(handle_t *handle, struct inode *inode, int name_index,
517 + const char *name, const void *value, size_t value_len,
520 + struct ext3_xattr_entry *last, *next, *here = NULL;
521 + struct ext3_inode *raw_inode;
522 + int name_len = strlen(name);
523 + int esize = EXT3_XATTR_LEN(name_len);
524 + struct buffer_head *bh;
525 + int err, storage_size;
526 + struct ext3_iloc iloc;
527 + int free, min_offs;
530 + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
533 + err = ext3_get_inode_loc(inode, &iloc, 1);
536 + raw_inode = ext3_raw_inode(&iloc);
539 + storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
540 + EXT3_GOOD_OLD_INODE_SIZE -
541 + EXT3_I(inode)->i_extra_isize -
543 + start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
544 + EXT3_I(inode)->i_extra_isize;
545 + if ((*(__u32*) start) != EXT3_XATTR_MAGIC) {
546 + /* inode had no attributes before */
547 + *((__u32*) start) = cpu_to_le32(EXT3_XATTR_MAGIC);
549 + start += sizeof(__u32);
550 + end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
551 + min_offs = storage_size;
552 + free = storage_size - sizeof(__u32);
554 + last = (struct ext3_xattr_entry *) start;
555 + while (!IS_LAST_ENTRY(last)) {
556 + next = EXT3_XATTR_NEXT(last);
557 + if (le32_to_cpu(last->e_value_size) > storage_size ||
558 + (char *) next >= end) {
559 + ext3_error(inode->i_sb, "ext3_xattr_ibody_set",
560 + "inode %ld", inode->i_ino);
565 + if (last->e_value_size) {
566 + int offs = le16_to_cpu(last->e_value_offs);
567 + if (offs < min_offs)
570 + if (name_index == last->e_name_index &&
571 + name_len == last->e_name_len &&
572 + !memcmp(name, last->e_name, name_len))
575 + /* we calculate all but our attribute
576 + * because it will be removed before changing */
577 + free -= EXT3_XATTR_LEN(last->e_name_len);
578 + free -= le32_to_cpu(last->e_value_size);
583 + if (value && (esize + value_len > free)) {
588 + err = ext3_reserve_inode_write(handle, inode, &iloc);
595 + /* time to remove old value */
596 + struct ext3_xattr_entry *e;
597 + int size = le32_to_cpu(here->e_value_size);
598 + int border = le16_to_cpu(here->e_value_offs);
602 + memmove(start + min_offs + size, start + min_offs,
603 + border - min_offs);
605 + /* recalculate offsets */
606 + e = (struct ext3_xattr_entry *) start;
607 + while (!IS_LAST_ENTRY(e)) {
608 + struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(e);
609 + int offs = le16_to_cpu(e->e_value_offs);
612 + cpu_to_le16(offs + size);
618 + border = EXT3_XATTR_LEN(here->e_name_len);
619 + src = (char *) here + EXT3_XATTR_LEN(here->e_name_len);
620 + size = (char *) last - src;
621 + if ((char *) here + size > end)
622 + printk("ALERT at %s:%d: 0x%p + %d > 0x%p\n",
623 + __FILE__, __LINE__, here, size, end);
624 + memmove(here, src, size);
625 + last = (struct ext3_xattr_entry *) ((char *) last - border);
626 + *((__u32 *) last) = 0;
630 + int offs = min_offs - value_len;
631 + /* use last to create new entry */
632 + last->e_name_len = strlen(name);
633 + last->e_name_index = name_index;
634 + last->e_value_offs = cpu_to_le16(offs);
635 + last->e_value_size = cpu_to_le32(value_len);
636 + last->e_hash = last->e_value_block = 0;
637 + memset(last->e_name, 0, esize);
638 + memcpy(last->e_name, name, last->e_name_len);
639 + if (start + offs + value_len > end)
640 + printk("ALERT at %s:%d: 0x%p + %d + %d > 0x%p\n",
641 + __FILE__, __LINE__, start, offs,
643 + memcpy(start + offs, value, value_len);
644 + last = EXT3_XATTR_NEXT(last);
645 + *((__u32 *) last) = 0;
648 + ext3_mark_iloc_dirty(handle, inode, &iloc);
655 * ext3_xattr_set_handle()
657 * Create, replace or remove an extended attribute for this inode. Buffer
658 @@ -369,6 +869,104 @@
661 ext3_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,
662 + const char *name, const void *value, size_t value_len,
665 + struct ext3_xattr_entry entry;
666 + int err, where = 0, found = 0, total;
667 + int free1 = -1, free2 = -1;
670 + ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
671 + name_index, name, value, (long)value_len);
673 + if (IS_RDONLY(inode))
675 + if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
681 + name_len = strlen(name);
682 + if (name_len > 255 || value_len > inode->i_sb->s_blocksize)
684 + down_write(&EXT3_I(inode)->xattr_sem);
686 + /* try to find attribute in inode body */
687 + err = ext3_xattr_ibody_find(inode, name_index, name, &entry, &free1);
689 + /* found EA in inode */
692 + } else if (err == -ENOENT) {
693 + /* there is no such attribute in inode body */
694 + /* try to find attribute in dedicated block */
695 + err = ext3_xattr_block_find(inode, name_index, name,
697 + if (err != 0 && err != -ENOENT) {
698 + /* not found EA in block */
700 + } else if (err == 0) {
701 + /* found EA in block */
708 + /* check flags: may replace? may create ? */
709 + if (found && (flags & XATTR_CREATE)) {
712 + } else if (!found && (flags & XATTR_REPLACE)) {
717 + /* check if we have enough space to store attribute */
718 + total = EXT3_XATTR_LEN(strlen(name)) + value_len;
719 + if (free1 >= 0 && total > free1 && free2 >= 0 && total > free2) {
720 + /* have no enough space */
725 + /* time to remove attribute */
728 + /* EA is stored in inode body */
729 + ext3_xattr_ibody_set(handle, inode, name_index, name,
732 + /* EA is stored in separated block */
733 + ext3_xattr_block_set(handle, inode, name_index, name,
738 + /* try to store EA in inode body */
739 + err = ext3_xattr_ibody_set(handle, inode, name_index, name,
740 + value, value_len, flags);
742 + /* can't store EA in inode body */
743 + /* try to store in block */
744 + err = ext3_xattr_block_set(handle, inode, name_index,
745 + name, value, value_len, flags);
749 + up_write(&EXT3_I(inode)->xattr_sem);
754 + * ext3_xattr_block_set()
756 + * this routine add/remove/replace attribute in EA block
759 +ext3_xattr_block_set(handle_t *handle, struct inode *inode, int name_index,
760 const char *name, const void *value, size_t value_len,
764 * towards the end of the block).
765 * end -- Points right after the block pointed to by header.
768 - ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
769 - name_index, name, value, (long)value_len);
771 - if (IS_RDONLY(inode))
773 - if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
779 name_len = strlen(name);
780 - if (name_len > 255 || value_len > sb->s_blocksize)
782 - down_write(&EXT3_I(inode)->xattr_sem);
783 if (EXT3_I(inode)->i_file_acl) {
784 /* The inode already has an extended attribute block. */
785 bh = sb_bread(sb, EXT3_I(inode)->i_file_acl);
788 if (!(bh && header == HDR(bh)))
790 - up_write(&EXT3_I(inode)->xattr_sem);
794 Index: linux-2.6.10/fs/ext3/xattr.h
795 ===================================================================
796 --- linux-2.6.10.orig/fs/ext3/xattr.h 2004-12-25 05:35:28.000000000 +0800
797 +++ linux-2.6.10/fs/ext3/xattr.h 2005-03-31 20:12:35.438783600 +0800
799 extern int ext3_xattr_get(struct inode *, int, const char *, void *, size_t);
800 extern int ext3_xattr_list(struct inode *, char *, size_t);
801 extern int ext3_xattr_set(struct inode *, int, const char *, const void *, size_t, int);
802 -extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *, const void *, size_t, int);
803 +extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *,const void *,size_t,int);
804 +extern int ext3_xattr_block_set(handle_t *, struct inode *, int, const char *,const void *,size_t,int);
806 extern void ext3_xattr_delete_inode(handle_t *, struct inode *);
807 extern void ext3_xattr_put_super(struct super_block *);
808 Index: linux-2.6.10/include/linux/ext3_fs_i.h
809 ===================================================================
810 --- linux-2.6.10.orig/include/linux/ext3_fs_i.h 2005-03-31 20:12:27.759950960 +0800
811 +++ linux-2.6.10/include/linux/ext3_fs_i.h 2005-03-31 20:12:35.439783448 +0800
816 + /* on-disk additional length */
817 + __u16 i_extra_isize;
820 * truncate_sem is for serialising ext3_truncate() against
821 * ext3_getblock(). In the 2.4 ext2 design, great chunks of inode's
822 Index: linux-2.6.10/include/linux/ext3_fs.h
823 ===================================================================
824 --- linux-2.6.10.orig/include/linux/ext3_fs.h 2005-03-31 20:12:30.546527336 +0800
825 +++ linux-2.6.10/include/linux/ext3_fs.h 2005-03-31 20:12:35.440783296 +0800
827 __u32 m_i_reserved2[2];
829 } osd2; /* OS dependent 2 */
830 + __u16 i_extra_isize;
834 #define i_size_high i_dir_acl
836 extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
837 extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
839 +extern int ext3_get_inode_loc(struct inode *, struct ext3_iloc *, int);
840 extern void ext3_read_inode (struct inode *);
841 extern int ext3_write_inode (struct inode *, int);
842 extern int ext3_setattr (struct dentry *, struct iattr *);
847 fs/ext3/xattr.c | 646 +++++++++++++++++++++++++++++++++++++++++++---
849 include/linux/ext3_fs.h | 3
850 include/linux/ext3_fs_i.h | 3
851 6 files changed, 636 insertions(+), 34 deletions(-)