Skip to content

Commit

Permalink
sbin/fsck_ffs: attemt to fix "CANNOT READ BLK: XXXXXXX"
Browse files Browse the repository at this point in the history
from mailing list: freebsd-current@freebsd.org
  • Loading branch information
rozhuk-im committed Jan 26, 2021
1 parent 1933081 commit 5e8bfa0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sbin/fsck_ffs/inode.c
Expand Up @@ -611,8 +611,9 @@ setinodebuf(int cg, ino_t inosused)
sizeof(struct ufs1_dinode) : sizeof(struct ufs2_dinode));
readpercg = inosused / fullcnt;
partialcnt = inosused % fullcnt;
partialsize = partialcnt * ((sblock.fs_magic == FS_UFS1_MAGIC) ?
sizeof(struct ufs1_dinode) : sizeof(struct ufs2_dinode));
partialsize = fragroundup(&sblock,
partialcnt * ((sblock.fs_magic == FS_UFS1_MAGIC) ?
sizeof(struct ufs1_dinode) : sizeof(struct ufs2_dinode)));
if (partialcnt != 0) {
readpercg++;
} else {
Expand Down

0 comments on commit 5e8bfa0

Please sign in to comment.