aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/nvd
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2016-07-19 19:09:23 +0000
committerScott Long <scottl@FreeBSD.org>2016-07-19 19:09:23 +0000
commit49e20d2420925a967e78702fe743655badce9e3e (patch)
treec7dbce975b48733739498b7065e8603344fe92b9 /sys/dev/nvd
parentddda1a9c2f76e24c925075d4bd224e99d5dc5352 (diff)
downloadsrc-49e20d2420925a967e78702fe743655badce9e3e.tar.gz
src-49e20d2420925a967e78702fe743655badce9e3e.zip
Supporting flushing the dump before returning, and simplify/combine the
logic. Switch to a 5us delay since most NVME devices can easily do 200,000 iops. Submitted by: imp MFC after: 3 days Sponsored by: Netflix, Inc.
Notes
Notes: svn path=/head/; revision=303040
Diffstat (limited to 'sys/dev/nvd')
-rw-r--r--sys/dev/nvd/nvd.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/nvd/nvd.c b/sys/dev/nvd/nvd.c
index 89ac71c59a34..9cc63fdaad56 100644
--- a/sys/dev/nvd/nvd.c
+++ b/sys/dev/nvd/nvd.c
@@ -237,14 +237,7 @@ nvd_dump(void *arg, void *virt, vm_offset_t phys, off_t offset, size_t len)
dp = arg;
ndisk = dp->d_drv1;
- if (len > 0) {
- if ((error = nvme_ns_dump(ndisk->ns, virt, offset, len)) != 0)
- return (error);
- } else {
- /* XXX sync to stable storage */
- }
-
- return (0);
+ return (nvme_ns_dump(ndisk->ns, virt, offset, len));
}
static void