Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Dec 2018 19:14:32 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342382 - head/sys/dev/nvdimm
Message-ID:  <201812231914.wBNJEWVh001405@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Dec 23 19:14:31 2018
New Revision: 342382
URL: https://svnweb.freebsd.org/changeset/base/342382

Log:
  nvdimm SPA geom: Update bio fields needed for devstat_end_transaction_bio().
  
  Reported by:	bde
  MFC after:	1 week
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/dev/nvdimm/nvdimm_spa.c

Modified: head/sys/dev/nvdimm/nvdimm_spa.c
==============================================================================
--- head/sys/dev/nvdimm/nvdimm_spa.c	Sun Dec 23 18:54:09 2018	(r342381)
+++ head/sys/dev/nvdimm/nvdimm_spa.c	Sun Dec 23 19:14:31 2018	(r342382)
@@ -337,8 +337,10 @@ nvdimm_spa_g_thread(void *arg)
 				auio.uio_td = curthread;
 				error = uiomove_fromphys(bp->bio_ma,
 				    bp->bio_ma_offset, bp->bio_length, &auio);
+				bp->bio_resid = auio.uio_resid;
 			} else {
 				nvdimm_spa_g_all_unmapped(spa, bp, bp->bio_cmd);
+				bp->bio_resid = bp->bio_length;
 				error = 0;
 			}
 		} else {
@@ -353,7 +355,9 @@ nvdimm_spa_g_thread(void *arg)
 			    UIO_WRITE;
 			auio.uio_td = curthread;
 			error = nvdimm_spa_uio(spa, &auio);
+			bp->bio_resid = auio.uio_resid;
 		}
+		bp->bio_bcount = bp->bio_length;
 		devstat_end_transaction_bio(spa->spa_g_devstat, bp);
 completed:
 		bp->bio_completed = bp->bio_length;



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