mirror of https://github.com/vitalif/e2fsprogs
Fix up extended attribute handling in e2image, resize2fs, and in
debugfs's icheck command.bitmap-optimize
parent
eb16f861e9
commit
ed909bbe20
|
@ -1,3 +1,8 @@
|
|||
2002-08-16 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* icheck.c (do_icheck): Check to see if the block is listed as
|
||||
part of the extended attribute block.
|
||||
|
||||
2002-07-21 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* htree.c (do_htree_dump): Fix a bug where we were not cleanly
|
||||
|
|
|
@ -41,7 +41,7 @@ static int icheck_proc(ext2_filsys fs,
|
|||
e2_blkcnt_t i;
|
||||
|
||||
for (i=0; i < bw->num_blocks; i++) {
|
||||
if (bw->barray[i].blk == *block_nr) {
|
||||
if (!bw->barray[i].ino && bw->barray[i].blk == *block_nr) {
|
||||
bw->barray[i].ino = bw->inode;
|
||||
bw->blocks_left--;
|
||||
}
|
||||
|
@ -108,6 +108,13 @@ void do_icheck(int argc, char **argv)
|
|||
while (ino) {
|
||||
if (!inode.i_links_count)
|
||||
goto next;
|
||||
|
||||
if (inode.i_file_acl) {
|
||||
icheck_proc(fs, &inode.i_file_acl, 0, 0, 0, &bw);
|
||||
if (bw.blocks_left == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ext2fs_inode_has_valid_blocks(&inode))
|
||||
goto next;
|
||||
/*
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2002-08-16 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* e2image.c (write_raw_image_file): Check for an extended
|
||||
attribute block before checking for has_valid_blocks.
|
||||
|
||||
2002-07-21 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* fsck.8.in: Document new fsck exit code, FSCK_CANCELED.
|
||||
|
|
|
@ -395,8 +395,13 @@ static void write_raw_image_file(ext2_filsys fs, int fd)
|
|||
}
|
||||
if (ino == 0)
|
||||
break;
|
||||
if (!inode.i_links_count ||
|
||||
!ext2fs_inode_has_valid_blocks(&inode))
|
||||
if (!inode.i_links_count)
|
||||
continue;
|
||||
if (inode.i_file_acl) {
|
||||
ext2fs_mark_block_bitmap(meta_block_map,
|
||||
inode.i_file_acl);
|
||||
}
|
||||
if (!ext2fs_inode_has_valid_blocks(&inode))
|
||||
continue;
|
||||
|
||||
stashed_ino = ino;
|
||||
|
@ -423,10 +428,6 @@ static void write_raw_image_file(ext2_filsys fs, int fd)
|
|||
exit(1);
|
||||
}
|
||||
}
|
||||
if (inode.i_file_acl) {
|
||||
ext2fs_mark_block_bitmap(meta_block_map,
|
||||
inode.i_file_acl);
|
||||
}
|
||||
}
|
||||
}
|
||||
use_inode_shortcuts(fs, 0);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2002-08-16 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* resize2fs.c (inode_scan_and_fix): Add code to move the extended
|
||||
attribute block.
|
||||
|
||||
2002-07-26 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* resize2fs.c (block_mover): If there are no blocks to move,
|
||||
|
|
|
@ -998,6 +998,17 @@ static errcode_t inode_scan_and_fix(ext2_resize_t rfs)
|
|||
pb.is_dir = LINUX_S_ISDIR(inode.i_mode);
|
||||
pb.changed = 0;
|
||||
|
||||
if (inode.i_file.acl && rfs->bmap) {
|
||||
new_block = ext2fs_extent_translate(pb->rfs->bmap,
|
||||
inode.i_file_acl);
|
||||
if (new_block) {
|
||||
inode.i_file_acl = new_block;
|
||||
retval = ext2fs_write_inode(rfs->old_fs,
|
||||
ino, &inode);
|
||||
if (retval) goto errout;
|
||||
}
|
||||
}
|
||||
|
||||
if (ext2fs_inode_has_valid_blocks(&inode) &&
|
||||
(rfs->bmap || pb.is_dir)) {
|
||||
pb.ino = ino;
|
||||
|
|
Loading…
Reference in New Issue