Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 May 2014 08:17:05 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r265649 - stable/9/sys/cam/ctl
Message-ID:  <201405080817.s488H5fd081578@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu May  8 08:17:04 2014
New Revision: 265649
URL: http://svnweb.freebsd.org/changeset/base/265649

Log:
  MFC r258871:
  Properly report an error instead of panicing when user tries to create
  LUN backed by non-disk device, e.g. /dev/null.

Modified:
  stable/9/sys/cam/ctl/ctl_backend_block.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/9/sys/cam/ctl/ctl_backend_block.c
==============================================================================
--- stable/9/sys/cam/ctl/ctl_backend_block.c	Thu May  8 08:15:42 2014	(r265648)
+++ stable/9/sys/cam/ctl/ctl_backend_block.c	Thu May  8 08:17:04 2014	(r265649)
@@ -1518,6 +1518,7 @@ ctl_be_block_close(struct ctl_be_block_l
 			vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount);
 			break;
 		case CTL_BE_BLOCK_NONE:
+			break;
 		default:
 			panic("Unexpected backend type.");
 			break;
@@ -1537,6 +1538,7 @@ ctl_be_block_close(struct ctl_be_block_l
 			}
 			break;
 		case CTL_BE_BLOCK_NONE:
+			break;
 		default:
 			panic("Unexpected backend type.");
 			break;
@@ -1626,7 +1628,7 @@ ctl_be_block_open(struct ctl_be_block_so
 	} else {
 		error = EINVAL;
 		snprintf(req->error_str, sizeof(req->error_str),
-			 "%s is not a disk or file", be_lun->dev_path);
+			 "%s is not a disk or plain file", be_lun->dev_path);
 	}
 	VOP_UNLOCK(be_lun->vn, 0);
 	VFS_UNLOCK_GIANT(vfs_is_locked);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405080817.s488H5fd081578>