NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/59130 CVS commit: [netbsd-10] src/sys/dev/ata



The following reply was made to PR kern/59130; it has been noted by GNATS.

From: "Martin Husemann" <martin%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/59130 CVS commit: [netbsd-10] src/sys/dev/ata
Date: Wed, 7 May 2025 17:42:31 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Wed May  7 17:42:31 UTC 2025
 
 Modified Files:
 	src/sys/dev/ata [netbsd-10]: ata_raid_subr.c ld_ataraid.c
 
 Log Message:
 Pull up following revision(s) (requested by andvar in ticket #1100):
 
 	sys/dev/ata/ld_ataraid.c: revision 1.51
 	sys/dev/ata/ata_raid_subr.c: revision 1.5
 
 ataraid(4), ld(4): ensure RAID disk status is set before resolving vnode.
 
 Given a RAID array disk is missing (due to removal, failure, or a code bug),
 its configuration is skipped. This causes ld(4) attachment at ataraid(4) to
 fail because adi->adi_dev is NULL.
 
 The fix will treat disks without known status (ADI_S_ONLINE, ADI_S_SPARE,
 ADI_S_ASSIGNED) as if ata_raid_disk_vnode_find() returned NULL, more gracefully
 solving above situation and avoiding the crash.
 
 Additionally, replace vnode block device opening logic with vn_bdev_open()
 (vn_subr(9)). This function provides identical functionality while also
 incrementing vp->v_writecount, preventing a 'vp->v_writecount > 0` assertion
 failure on vn_close().
 
 More details are available in the tech-kern mailing list thread:
 the https://mail-index.netbsd.org/tech-kern/2025/03/10/msg030179.html thread
 and PR thread.
 Should fix PR kern/43986
 
 Also observed in PR kern/59130 (due to a different bug).
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.4.4.1 src/sys/dev/ata/ata_raid_subr.c
 cvs rdiff -u -r1.50 -r1.50.24.1 src/sys/dev/ata/ld_ataraid.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index