freebsd-skq/sys/fs
kib 0f85e0cb46 Improve handling of uiomove(9) errors for the NFS client.
Do not brelse() the buffer unconditionally with BIO_ERROR set if
uiomove() failed. The brelse() treats most buffers with BIO_ERROR as
B_INVAL, dropping their content.  Instead, if the write request
covered the whole buffer, remember the cached state and brelse() with
BIO_ERROR set only if the buffer was not cached previously.

Update the buffer dirtyoff/dirtyend based on the progress recorded by
uiomove() in passed struct uio, even in the presence of
error. Otherwise, usermode could see changed data in the backed pages,
but later the buffer is destroyed without write-back.

If uiomove() failed for IO_UNIT request, try to truncate the vnode
back to the pre-write state, and rewind the progress in passed uio
accordingly, following the FFS behaviour.

Reviewed by:	rmacklem (some time ago)
Tested by:	pho
MFC after:	1 month
2012-06-06 16:30:16 +00:00
..
cd9660 Remove unused thread argument to vrecycle(). 2012-04-23 14:10:34 +00:00
coda Replace the MNT_VNODE_FOREACH interface with MNT_VNODE_FOREACH_ALL. 2012-04-17 16:28:22 +00:00
deadfs Add function vop_rename_fail(9) that performs needed cleanup for locks 2010-04-02 14:03:01 +00:00
devfs Revert devfs part of r235911. I was unaware about old but unfinished 2012-05-24 18:19:23 +00:00
ext2fs Fix a couple of issues that appear to be inherited from the old 2012-05-16 15:53:38 +00:00
fdescfs Use NULL instead of 0 2012-03-13 10:04:13 +00:00
fifofs Update comment. 2012-03-11 15:58:27 +00:00
hpfs Use C99-style initialization for struct dirent in preparation for 2012-05-25 09:16:59 +00:00
msdosfs Remove unused thread argument to vrecycle(). 2012-04-23 14:10:34 +00:00
nandfs Catch a corner case where ssegs could be 0 and thus i would be 0 and 2012-05-28 16:33:58 +00:00
nfs A problem with the NFSv4 server was reported by Andrew Leonard 2012-05-17 21:52:17 +00:00
nfsclient Improve handling of uiomove(9) errors for the NFS client. 2012-06-06 16:30:16 +00:00
nfsserver Fix two cases in the new NFS server where a tsleep() is 2012-05-12 22:20:55 +00:00
ntfs Fix style and consistency: 2012-05-27 09:34:47 +00:00
nullfs Remove unused thread argument to vrecycle(). 2012-04-23 14:10:34 +00:00
nwfs Rename cache_lookup_times() to cache_lookup() and retire the old API and 2012-02-06 17:00:28 +00:00
portalfs Use NULL instead of 0 2012-03-13 10:04:13 +00:00
procfs Add procfs to jail-mountable filesystems. 2012-02-29 00:30:18 +00:00
pseudofs Apply inlined vn_vget_ino() algorithm for ".." lookup in pseudofs. 2012-03-05 11:38:02 +00:00
smbfs Remove unused thread argument to vrecycle(). 2012-04-23 14:10:34 +00:00
tmpfs Remove unused thread argument to vrecycle(). 2012-04-23 14:10:34 +00:00
udf Remove fifo.h. The only used function declaration from the header is 2012-03-11 12:19:58 +00:00
unionfs Skip directory entries with zero inode number during traversal. 2012-05-16 10:44:09 +00:00