Module Name: src
Committed By: reinoud
Date: Sat Jan 22 18:02:18 UTC 2011
Modified Files:
src/sys/fs/udf: udf_subr.c
Log Message:
A not rewritable disc can be pseudo-overwritable. A pseudo-overwritable disc
can overwrite its logical volume integrity sequence so no need to make it
append-only for this class of discs.
To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/fs/udf/udf_subr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/fs/udf/udf_subr.c
diff -u src/sys/fs/udf/udf_subr.c:1.112 src/sys/fs/udf/udf_subr.c:1.113
--- src/sys/fs/udf/udf_subr.c:1.112 Sat Jan 22 14:51:43 2011
+++ src/sys/fs/udf/udf_subr.c Sat Jan 22 18:02:18 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.112 2011/01/22 14:51:43 reinoud Exp $ */
+/* $NetBSD: udf_subr.c,v 1.113 2011/01/22 18:02:18 reinoud Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.112 2011/01/22 14:51:43 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.113 2011/01/22 18:02:18 reinoud Exp $");
#endif /* not lint */
@@ -1460,7 +1460,6 @@
logvol_integrity = udf_rw32(ump->logvol_integrity->integrity_type);
if (logvol_integrity == UDF_INTEGRITY_CLOSED) {
if ((space < 3) && (lvflag & UDF_APPENDONLY_LVINT)) {
- /* don't allow this logvol to be opened */
/* TODO extent LVINT space if possible */
return EROFS;
}
@@ -2056,7 +2055,9 @@
ump->lvopen = UDF_WRITE_LVINT;
ump->lvclose = UDF_WRITE_LVINT;
if ((ump->discinfo.mmc_cur & MMC_CAP_REWRITABLE) == 0)
- ump->lvopen |= UDF_APPENDONLY_LVINT;
+ ump->lvopen |= UDF_APPENDONLY_LVINT;
+ if ((ump->discinfo.mmc_cur & MMC_CAP_PSEUDOOVERWRITE))
+ ump->lvopen &= ~UDF_APPENDONLY_LVINT;
}
/*