[OpenAFS-devel] Re: progress... sortof...

Nickolai Zeldovich kolya@MIT.EDU
Wed, 28 Apr 2004 18:38:34 -0700


On Wed, 2004-04-28 at 20:28 -0500, Neulinger, Nathan wrote:
> Yup. You beat me to the response... adding a
> 
> else if ( code == 0 )
> {
> 	break;
> }
> 
> definately fixed the problem... Want a diff, or can you handle the 3
> liner? :)

So actually I think the right thing to do is:

	if (code == 0) {
		code = EIO;
		break;
	}

because otherwise, this function will return 0, and the caller
(afs_UFSRead, afs_UFSWrite) will assume that it successfully read all
the data it wanted to read.

The question is, what's going on with your machine that's causing it to
do short reads all the time?  Is your cache corrupted, or running out of
space?  Can you put debug statements to see what cache file is causing
the problem, and which vnode it corresponds to?  Does clearing your AFS
cache fix the problem?

-- kolya