summaryrefslogtreecommitdiff
path: root/e2fsck
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2001-07-07 22:27:40 -0400
committerTheodore Ts'o <tytso@mit.edu>2001-07-07 22:27:40 -0400
commitb5acdb6ae2a05212b1014a3dee7cbcf385446b3b (patch)
tree2f93e77cdd44c6f0ac9213e3d6440041c33b1be3 /e2fsck
parentf41e7e6961366f15eca8c05edbf5a35f4a9b3b65 (diff)
downloade2fsprogs-b5acdb6ae2a05212b1014a3dee7cbcf385446b3b.tar.gz
pass1.c (e2fsck_pass1): Defer inodes which have an extended attribute
block for later processing to avoid extra seeks across the disk. (process_inode_cmp): If there is no indirect block, sort by the extended attribute (i_file_acl) block.
Diffstat (limited to 'e2fsck')
-rw-r--r--e2fsck/pass1.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
index 1ef44200..11aaaecf 100644
--- a/e2fsck/pass1.c
+++ b/e2fsck/pass1.c
@@ -588,7 +588,8 @@ void e2fsck_pass1(e2fsck_t ctx)
ctx->fs_tind_count++;
if (inode.i_block[EXT2_IND_BLOCK] ||
inode.i_block[EXT2_DIND_BLOCK] ||
- inode.i_block[EXT2_TIND_BLOCK]) {
+ inode.i_block[EXT2_TIND_BLOCK] ||
+ inode.i_file_acl) {
inodes_to_process[process_inode_count].ino = ino;
inodes_to_process[process_inode_count].inode = inode;
process_inode_count++;
@@ -776,9 +777,13 @@ static EXT2_QSORT_TYPE process_inode_cmp(const void *a, const void *b)
(const struct process_inode_block *) a;
const struct process_inode_block *ib_b =
(const struct process_inode_block *) b;
-
- return (ib_a->inode.i_block[EXT2_IND_BLOCK] -
- ib_b->inode.i_block[EXT2_IND_BLOCK]);
+ int ret;
+
+ ret = (ib_a->inode.i_block[EXT2_IND_BLOCK] -
+ ib_b->inode.i_block[EXT2_IND_BLOCK]);
+ if (ret == 0)
+ ret = ib_a->inode.i_file_acl - ib_b->inode.i_file_acl;
+ return ret;
}
/*
@@ -979,6 +984,11 @@ static int check_ext_attr(e2fsck_t ctx, struct problem_context *pctx,
}
}
+#if 0
+ /* Debugging text */
+ printf("Inode %u has EA block %u\n", ino, blk);
+#endif
+
/* Have we seen this EA block before? */
if (ext2fs_fast_test_block_bitmap(ctx->block_ea_map, blk)) {
if (ea_refcount_decrement(ctx->refcount, blk, 0) == 0)