Subject: kern/10463: LFS: kernel code can mistakenly clear SEGSUM_ACTIVE bit it segment summary struct
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jevans@cray.com>
List: netbsd-bugs
Date: 06/27/2000 11:06:13
>Number: 10463
>Category: kern
>Synopsis: LFS: kernel code can mistakenly clear SEGSUM_ACTIVE bit it segment summary struct
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 27 11:07:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Jim Evans
>Release: 1.4.2
>Organization:
Cray
>Environment:
N/A
>Description:
lfs_segment.c:545-546. Code fails to convert lfs_nextseg from daddr
to segment number prior to using it to index into ifile structures.
Typically causes checkpoint flushes to mistakenly clear the active
segment's SEGSUM_ACTIVE bit.
Typically leads to some of the symptoms described in pr kern/8889
>How-To-Repeat:
Aggravated by small/busy LFS filesystems & small cleanerd sleep intervals.
>Fix:
510,511c510,511
< if (fs->lfs_curseg/fs->lfs_sepb==(ibno-fs->lfs_cleansz))
< ((SEGUSE *)(bp->b_data))[fs->lfs_curseg%fs->lfs_sepb].su_flags |= SEGUSE_ACTIVE;
---
> if (datosn(fs, fs->lfs_curseg)/fs->lfs_sepb==(ibno-fs->lfs_cleansz))
> ((SEGUSE *)(bp->b_data))[datosn(fs, fs->lfs_curseg)%fs->lfs_
>Release-Note:
>Audit-Trail:
>Unformatted: