diff options
author | Roland McGrath <roland@gnu.org> | 2002-10-08 23:10:09 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-10-08 23:10:09 +0000 |
commit | 73b011e7bc07c57b140f3851a452b33d209dfddc (patch) | |
tree | 773165fc78742386f0ac979b7f3b822cd688076c /ext2fs | |
parent | 25bb7089abd2256734497a7250915ff8694e39f2 (diff) |
2002-10-08 Roland McGrath <roland@frob.com>
* ext2fs.h (struct disknode): New member `info_i_translator'.
* inode.c (diskfs_set_translator): Update NP->dn->info_i_translator.
* ialloc.c (diskfs_alloc_node): Clear a nonzero translator block in
the on-disk inode just as we do for data blocks.
Diffstat (limited to 'ext2fs')
-rw-r--r-- | ext2fs/ext2fs.h | 3 | ||||
-rw-r--r-- | ext2fs/ialloc.c | 5 | ||||
-rw-r--r-- | ext2fs/inode.c | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h index 8e73ae0a..cae9d47f 100644 --- a/ext2fs/ext2fs.h +++ b/ext2fs/ext2fs.h @@ -1,6 +1,6 @@ /* Common definitions for the ext2 filesystem translator - Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1999, 2002 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -160,6 +160,7 @@ struct disknode /* Random extra info used by the ext2 routines. */ struct ext2_inode_info info; + uint32_t info_i_translator; /* That struct from Linux source lacks this. */ /* This file's pager. */ struct pager *pager; diff --git a/ext2fs/ialloc.c b/ext2fs/ialloc.c index 27a227fe..22d911b5 100644 --- a/ext2fs/ialloc.c +++ b/ext2fs/ialloc.c @@ -301,6 +301,11 @@ diskfs_alloc_node (struct node *dir, mode_t mode, struct node **node) np->dn->info.i_data[block] = 0; np->dn_set_ctime = 1; } + if (np->dn->info_i_translator != 0) + { + np->dn->info_i_translator = 0; + np->dn_set_ctime = 1; + } st->st_mode &= ~S_IPTRANS; if (np->allocsize) { diff --git a/ext2fs/inode.c b/ext2fs/inode.c index 98279e85..b6185855 100644 --- a/ext2fs/inode.c +++ b/ext2fs/inode.c @@ -295,6 +295,7 @@ read_node (struct node *np) EXT2_N_BLOCKS * sizeof info->i_data[0]); st->st_rdev = 0; } + dn->info_i_translator = di->i_translator; diskfs_end_catch_exception (); @@ -666,6 +667,7 @@ diskfs_set_translator (struct node *np, const char *name, unsigned namelen, } di->i_translator = blkno; + np->dn->info_i_translator = blkno; record_global_poke (di); np->dn_stat.st_blocks += 1 << log2_stat_blocks_per_fs_block; @@ -675,6 +677,7 @@ diskfs_set_translator (struct node *np, const char *name, unsigned namelen, { /* Clear block for translator going away. */ di->i_translator = 0; + np->dn->info_i_translator = 0; record_global_poke (di); ext2_free_blocks (blkno, 1); |