Replicable file-system corruption due to fsck/ufs

Warner Losh imp at bsdimp.com
Thu Apr 11 04:51:45 UTC 2019


On Wed, Apr 10, 2019 at 10:46 PM <jamie at catflap.dyslexicfish.net> wrote:

> Peter Holm <peter at holm.cc> wrote:
>
> > I see this even with a single truncate on HEAD.
> >
> > $ ./truncate10.sh
> > 96 -rw-r--r--  1 root  wheel  1073741824 11 apr. 06:33 test
> > ** /dev/md10a
> > ** Last Mounted on /mnt
> > ** Phase 1 - Check Blocks and Sizes
> > INODE 3: FILE SIZE 1073741824 BEYOND END OF ALLOCATED FILE, SIZE SHOULD
> BE 268435456
> > ADJUST? yes
>
> Thanks.. I should have tested that myself.. doh! I was trying to closer
> replicate
> my real file that triggered the problem which contained a number of sparse
> areas.
>
> And thanks for adding Kirk to the discussion. I wanted to first be sure it
> wasn't
> just me :-)
>

I believe that this was added recently to detect corruption that happens
when a file is being appended when the system crashes.

Warner


More information about the freebsd-stable mailing list