diff --git a/share/man/man9/VOP_STRATEGY.9 b/share/man/man9/VOP_STRATEGY.9 index 709a929921b5..8c4fbace42a7 100644 --- a/share/man/man9/VOP_STRATEGY.9 +++ b/share/man/man9/VOP_STRATEGY.9 @@ -53,7 +53,9 @@ This call either reads or writes data from a file, depending on the value of .Pp The call may block. .Sh RETURN VALUES -Zero is returned on success, otherwise an error is returned. +Always zero. +Errors should be signalled by setting BIO_ERROR on b_ioflags field in struct buf, +and setting b_error to the appropriate errno value. .Sh SEE ALSO .\" .Xr buf 9 , .Xr vnode 9 diff --git a/sys/fs/hpfs/hpfs_vnops.c b/sys/fs/hpfs/hpfs_vnops.c index c5a2a06cf3e4..4ec6b1e618e6 100644 --- a/sys/fs/hpfs/hpfs_vnops.c +++ b/sys/fs/hpfs/hpfs_vnops.c @@ -661,7 +661,7 @@ hpfs_strategy(ap) bp->b_error = error; bp->b_ioflags |= BIO_ERROR; bufdone(bp); - return (error); + return (0); } if ((long)bp->b_blkno == -1) vfs_bio_clrbuf(bp); diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index ccbd0b12b6ac..9dc547f67606 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -1880,7 +1880,7 @@ msdosfs_strategy(ap) bp->b_error = error; bp->b_ioflags |= BIO_ERROR; bufdone(bp); - return (error); + return (0); } if ((long)bp->b_blkno == -1) vfs_bio_clrbuf(bp); diff --git a/sys/fs/ntfs/ntfs_vnops.c b/sys/fs/ntfs/ntfs_vnops.c index 76c3c64896f3..ee62a5c60d9c 100644 --- a/sys/fs/ntfs/ntfs_vnops.c +++ b/sys/fs/ntfs/ntfs_vnops.c @@ -339,7 +339,7 @@ ntfs_strategy(ap) } } bufdone(bp); - return (error); + return (0); } static int diff --git a/sys/fs/nwfs/nwfs_vnops.c b/sys/fs/nwfs/nwfs_vnops.c index 9dcd9aa1e042..ca0a887bd130 100644 --- a/sys/fs/nwfs/nwfs_vnops.c +++ b/sys/fs/nwfs/nwfs_vnops.c @@ -804,7 +804,7 @@ static int nwfs_strategy (ap) */ if ((bp->b_flags & B_ASYNC) == 0 ) error = nwfs_doio(ap->a_vp, bp, cr, td); - return (error); + return (0); } diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c index e34ebe2dbffa..9b1e76d345e2 100644 --- a/sys/fs/smbfs/smbfs_vnops.c +++ b/sys/fs/smbfs/smbfs_vnops.c @@ -864,7 +864,7 @@ smbfs_strategy (ap) if ((bp->b_flags & B_ASYNC) == 0 ) error = smbfs_doio(ap->a_vp, bp, cr, td); - return error; + return (0); } int diff --git a/sys/gnu/fs/ext2fs/ext2_vnops.c b/sys/gnu/fs/ext2fs/ext2_vnops.c index f81d5097df1f..1b5023cccd6e 100644 --- a/sys/gnu/fs/ext2fs/ext2_vnops.c +++ b/sys/gnu/fs/ext2fs/ext2_vnops.c @@ -1399,7 +1399,7 @@ ext2_strategy(ap) bp->b_error = error; bp->b_ioflags |= BIO_ERROR; bufdone(bp); - return (error); + return (0); } if ((long)bp->b_blkno == -1) vfs_bio_clrbuf(bp); diff --git a/sys/gnu/fs/reiserfs/reiserfs_vnops.c b/sys/gnu/fs/reiserfs/reiserfs_vnops.c index e6323ead671e..12fe40918ffc 100644 --- a/sys/gnu/fs/reiserfs/reiserfs_vnops.c +++ b/sys/gnu/fs/reiserfs/reiserfs_vnops.c @@ -350,8 +350,13 @@ reiserfs_strategy(struct vop_strategy_args /* { bp->b_ioflags |= BIO_ERROR; } + if (error) { + bp->b_ioflags |= BIO_ERROR; + bp->b_error = error; + } + bufdone(bp); - return (error); + return (0); } /* diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c b/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c index d0efcf29995b..6d8d4eb9866a 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c @@ -1136,7 +1136,7 @@ _xfs_strategy( bp->b_error = error; bp->b_ioflags |= BIO_ERROR; bufdone(bp); - return (error); + return (0); } if ((long)bp->b_blkno == -1) vfs_bio_clrbuf(bp); diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index e5047e9addbc..7b639e8b126a 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -2013,7 +2013,7 @@ ufs_strategy(ap) bp->b_error = error; bp->b_ioflags |= BIO_ERROR; bufdone(bp); - return (error); + return (0); } if ((long)bp->b_blkno == -1) vfs_bio_clrbuf(bp);