On Sat, Aug 9, 2014 at 10:41 AM, David Vasek <[email protected]> wrote:
>
> I encountered the following issue on my FFS1 data filesystem. It didn't
> suffer any unclean shutdown since at least last fsck(8) run (yes, it is
> already clean), nonetheless fsck(8) reports incorrect link count of one of
> the directories. It didn't complain before and the filesystem never
> experienced any unclean shutdown when being written to.
>
> # /sbin/fsck -nf /dev/rsd5a
>
...

> ** Phase 4 - Check Reference Counts
> LINK COUNT DIR I=7362198  OWNER=1005 MODE=40755
> SIZE=19968 MTIME=Jul 23 16:47 2014  COUNT 574 SHOULD BE 572
> ADJUST? no
>
...

> # /bin/ls -ldi /mnt/photo/
> 7362198 drwxr-xr-x  574 1005  1005  19968 Jul 23 16:47 /mnt/photo
>
> The /mnt/photo/ directory (inode 7362198) currently lists 570
> subdirectories as fsck(8) suggests (572-2) and there shouldn't be any
> extraordinary hardlinks to that directory. I didn't delete any subdirectory
> from that directory.
>
> The filesystem is FFS1, the device is a regular 512 bytes/sector external
> USB hard drive. Write operation are usually done while this filesystem is
> mounted with -o softdep.
>
> The filesystem was handled by this snapshot:
> OpenBSD 5.3 (GENERIC.MP) #53: Fri Mar  1 09:34:37 MST 2013
>     [email protected]:/usr/src/sys/arch/i386/compile/GENERIC.MP
>
> I also verified filesystem integrity with recent ramdisk kernels, with the
> same result.
>
> Is there any explanation for the two additional links in the reference
> count? Should I be worried that I've lost two subdirectories somehow?
>

Maybe?  It could have been a bogus duplicated increment from some bug and
everything is fine, or it could have been a missing chain of other writes
and you lost stuff.  Without knowing exactly what bug you hit it's
impossible to say.  There have been ffs fixes since 5.3 that might be
involved, so you should certainly upgrade from that old (ahem, no longer
supported) release.


Philip Guenther

Reply via email to