Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/raidframe If there is a FS_RAID partition on a disk,...
details: https://anonhg.NetBSD.org/src/rev/9e6e0fd0a30f
branches: trunk
changeset: 1023172:9e6e0fd0a30f
user: oster <oster%NetBSD.org@localhost>
date: Sat Aug 28 16:00:52 2021 +0000
description:
If there is a FS_RAID partition on a disk, then we shouldn't look at
the raw partition. In particular, we now need to account for the case
where an existing FS_RAID partition is now open because it is in use.
If that is the case, we don't look at the raw partition.
Addresses PR kern/56369.
diffstat:
sys/dev/raidframe/rf_netbsdkintf.c | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r 2fb2bd6e1b3d -r 9e6e0fd0a30f sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c Sat Aug 28 15:36:54 2021 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c Sat Aug 28 16:00:52 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.399 2021/08/07 16:19:15 thorpej Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.400 2021/08/28 16:00:52 oster Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.399 2021/08/07 16:19:15 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.400 2021/08/28 16:00:52 oster Exp $");
#ifdef _KERNEL_OPT
#include "opt_raid_autoconfig.h"
@@ -3040,7 +3040,19 @@
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_OPEN(vp, FREAD, NOCRED);
if (error) {
- /* Whatever... */
+ /* Not quite a 'whatever'. In
+ * this situation we know
+ * there is a FS_RAID
+ * partition, but we can't
+ * open it. The most likely
+ * reason is that the
+ * partition is already in
+ * use by another RAID set.
+ * So note that we've already
+ * found a partition on this
+ * disk so we don't attempt
+ * to use the raw disk later. */
+ rf_part_found = 1;
vput(vp);
continue;
}
Home |
Main Index |
Thread Index |
Old Index