freebsd-nq/sys/fs
Konstantin Belousov bfb68a9e43 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
deadfs
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
fifofs
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
portalfs
procfs
pseudofs
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
unionfs Skip directory entries with zero inode number during traversal. 2012-05-16 10:44:09 +00:00