summaryrefslogtreecommitdiffstats
path: root/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2007-04-21 12:02:57 +0000
committerpjd <pjd@FreeBSD.org>2007-04-21 12:02:57 +0000
commit24d44898020531c24ba8914b294876e52f304e4f (patch)
tree932d85fefa7fcb86834f441607b2a4438d5b0c0f /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
parente60ce7e12076f27ac5471441a6940e2254378506 (diff)
downloadFreeBSD-src-24d44898020531c24ba8914b294876e52f304e4f.zip
FreeBSD-src-24d44898020531c24ba8914b294876e52f304e4f.tar.gz
MFp4:
@118370 Correct typo. @118371 Integrate changes from vendor. @118491 Show backtrace on unexpected code paths. @118494 Integrate changes from vendor. @118504 Fix sendfile(2). I had two ways of fixing it: 1. Fixing sendfile(2) itself to use VOP_GETPAGES() instead of hacking around with vn_rdwr(UIO_NOCOPY), which was suggested by ups. 2. Modify ZFS behaviour to handle this special case. Although 1 is more correct, I've choosen 2, because hack from 1 have a side-effect of beeing faster - it reads ahead MAXBSIZE bytes instead of reading page by page. This is not easy to implement with VOP_GETPAGES(), at least not for me in this very moment. Reported by: Andrey V. Elsukov <bu7cher@yandex.ru> @118525 Reorganize the code to reduce diff. @118526 This code path is expected. It is simply when file is opened with O_FSYNC flag. Reported by: kris Reported by: Michal Suszko <dry@dry.pl>
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
index 0fceb8d..d15f6e2 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
@@ -931,7 +931,7 @@ vdev_validate(vdev_t *vd)
for (c = 0; c < vd->vdev_children; c++)
if (vdev_validate(vd->vdev_child[c]) != 0)
- return (-1);
+ return (EBADF);
/*
* If the device has already failed, or was marked offline, don't do
@@ -974,7 +974,7 @@ vdev_validate(vdev_t *vd)
if (spa->spa_load_state == SPA_LOAD_OPEN &&
state != POOL_STATE_ACTIVE)
- return (-1);
+ return (EBADF);
}
/*
OpenPOWER on IntegriCloud