Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 May 2015 15:23:54 +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-10@freebsd.org
Subject:   svn commit: r282862 - stable/10/sys/cam/ctl
Message-ID:  <201505131523.t4DFNstS040783@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed May 13 15:23:53 2015
New Revision: 282862
URL: https://svnweb.freebsd.org/changeset/base/282862

Log:
  MFC r282565: Handle EDQUOT backend storage errors same as ENOSPC.

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

Modified: stable/10/sys/cam/ctl/ctl_backend_block.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl_backend_block.c	Wed May 13 14:05:53 2015	(r282861)
+++ stable/10/sys/cam/ctl/ctl_backend_block.c	Wed May 13 15:23:53 2015	(r282862)
@@ -524,7 +524,7 @@ ctl_be_block_biodone(struct bio *bio)
 	if (beio->num_errors > 0) {
 		if (error == EOPNOTSUPP) {
 			ctl_set_invalid_opcode(&io->scsiio);
-		} else if (error == ENOSPC) {
+		} else if (error == ENOSPC || error == EDQUOT) {
 			ctl_set_space_alloc_fail(&io->scsiio);
 		} else if (beio->bio_cmd == BIO_FLUSH) {
 			/* XXX KDM is there is a better error here? */
@@ -741,7 +741,7 @@ ctl_be_block_dispatch_file(struct ctl_be
 		ctl_scsi_path_string(io, path_str, sizeof(path_str));
 		printf("%s%s command returned errno %d\n", path_str,
 		       (beio->bio_cmd == BIO_READ) ? "READ" : "WRITE", error);
-		if (error == ENOSPC) {
+		if (error == ENOSPC || error == EDQUOT) {
 			ctl_set_space_alloc_fail(&io->scsiio);
 		} else
 			ctl_set_medium_error(&io->scsiio);
@@ -898,7 +898,7 @@ ctl_be_block_dispatch_zvol(struct ctl_be
 	 * return the I/O to the user.
 	 */
 	if (error != 0) {
-		if (error == ENOSPC) {
+		if (error == ENOSPC || error == EDQUOT) {
 			ctl_set_space_alloc_fail(&io->scsiio);
 		} else
 			ctl_set_medium_error(&io->scsiio);



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