When running with journaled soft updates, some updated inodes were not
having their check hashes recomputed which resulted in spurious inode check-hash errors when the system came back up after a crash. Reported by: Alan Somers Sponsored by: Netflix
This commit is contained in:
parent
2444018f7d
commit
3bd88193c6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=350186
@ -431,17 +431,28 @@ ino_dirty(ino_t ino)
|
||||
struct iblkhd *hd;
|
||||
struct suj_cg *sc;
|
||||
ufs2_daddr_t blk;
|
||||
int off;
|
||||
|
||||
blk = ino_to_fsba(fs, ino);
|
||||
sc = cg_lookup(ino_to_cg(fs, ino));
|
||||
iblk = sc->sc_lastiblk;
|
||||
if (iblk && iblk->ib_blk == blk) {
|
||||
if (fs->fs_magic == FS_UFS2_MAGIC) {
|
||||
off = ino_to_fsbo(fs, ino);
|
||||
ffs_update_dinode_ckhash(fs,
|
||||
&((struct ufs2_dinode *)iblk->ib_buf)[off]);
|
||||
}
|
||||
iblk->ib_dirty = 1;
|
||||
return;
|
||||
}
|
||||
hd = &sc->sc_iblkhash[SUJ_HASH(fragstoblks(fs, blk))];
|
||||
LIST_FOREACH(iblk, hd, ib_next) {
|
||||
if (iblk->ib_blk == blk) {
|
||||
if (fs->fs_magic == FS_UFS2_MAGIC) {
|
||||
off = ino_to_fsbo(fs, ino);
|
||||
ffs_update_dinode_ckhash(fs,
|
||||
&((struct ufs2_dinode *)iblk->ib_buf)[off]);
|
||||
}
|
||||
iblk->ib_dirty = 1;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user