Module Name:    src
Committed By:   hannken
Date:           Thu Dec 21 15:50:33 UTC 2017

Modified Files:
        src/sys/dev: fss.c

Log Message:
Treat partial read from backing store as I/O error.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/dev/fss.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/fss.c
diff -u src/sys/dev/fss.c:1.100 src/sys/dev/fss.c:1.101
--- src/sys/dev/fss.c:1.100	Sun Dec 17 22:09:47 2017
+++ src/sys/dev/fss.c	Thu Dec 21 15:50:33 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.100 2017/12/17 22:09:47 pgoyette Exp $	*/
+/*	$NetBSD: fss.c,v 1.101 2017/12/21 15:50:33 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.100 2017/12/17 22:09:47 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.101 2017/12/21 15:50:33 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -980,6 +980,8 @@ restart:
 		todo -= len;
 	}
 	error = biowait(mbp);
+	if (error == 0 && mbp->b_resid != 0)
+		error = EIO;
 	putiobuf(mbp);
 
 	mutex_enter(&sc->sc_slock);
@@ -1204,6 +1206,8 @@ fss_bs_thread(void *arg)
 			bdev_strategy(nbp);
 
 			error = biowait(nbp);
+			if (error == 0 && nbp->b_resid != 0)
+				error = EIO;
 			if (error != 0) {
 				bp->b_resid = bp->b_bcount;
 				bp->b_error = nbp->b_error;

Reply via email to