[Midnightbsd-cvs] src [9039] trunk/sys/geom/geom_disk.c: make bio delete support visible to upper layers.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Oct 1 05:55:20 EDT 2016
Revision: 9039
http://svnweb.midnightbsd.org/src/?rev=9039
Author: laffer1
Date: 2016-10-01 05:55:20 -0400 (Sat, 01 Oct 2016)
Log Message:
-----------
make bio delete support visible to upper layers.
Modified Paths:
--------------
trunk/sys/geom/geom_disk.c
Modified: trunk/sys/geom/geom_disk.c
===================================================================
--- trunk/sys/geom/geom_disk.c 2016-10-01 09:54:41 UTC (rev 9038)
+++ trunk/sys/geom/geom_disk.c 2016-10-01 09:55:20 UTC (rev 9039)
@@ -309,7 +309,7 @@
switch(bp->bio_cmd) {
case BIO_DELETE:
if (!(dp->d_flags & DISKFLAG_CANDELETE)) {
- error = 0;
+ error = EOPNOTSUPP;
break;
}
/* fall-through */
@@ -398,8 +398,8 @@
g_trace(G_T_BIO, "g_disk_flushcache(%s)",
bp->bio_to->name);
if (!(dp->d_flags & DISKFLAG_CANFLUSHCACHE)) {
- g_io_deliver(bp, ENODEV);
- return;
+ error = EOPNOTSUPP;
+ break;
}
bp2 = g_clone_bio(bp);
if (bp2 == NULL) {
More information about the Midnightbsd-cvs
mailing list