svn commit: r251456 - stable/8/sys/geom
Steven Hartland
smh at FreeBSD.org
Thu Jun 6 09:23:22 UTC 2013
Author: smh
Date: Thu Jun 6 09:23:21 2013
New Revision: 251456
URL: http://svnweb.freebsd.org/changeset/base/251456
Log:
MFC r226737:
Allow upper layers to discover that BIO_DELETE / BIO_FLUSH is not supported.
Modified:
stable/8/sys/geom/geom_disk.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/geom/ (props changed)
Modified: stable/8/sys/geom/geom_disk.c
==============================================================================
--- stable/8/sys/geom/geom_disk.c Thu Jun 6 09:13:07 2013 (r251455)
+++ stable/8/sys/geom/geom_disk.c Thu Jun 6 09:23:21 2013 (r251456)
@@ -302,7 +302,7 @@ g_disk_start(struct bio *bp)
switch(bp->bio_cmd) {
case BIO_DELETE:
if (!(dp->d_flags & DISKFLAG_CANDELETE)) {
- error = 0;
+ error = EOPNOTSUPP;
break;
}
/* fall-through */
@@ -370,8 +370,8 @@ g_disk_start(struct bio *bp)
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 svn-src-stable
mailing list