svn commit: r265649 - stable/9/sys/cam/ctl
Alexander Motin
mav at FreeBSD.org
Thu May 8 08:17:05 UTC 2014
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);
More information about the svn-src-stable-9
mailing list