Re: How does the client manage NFS3ERR_NOSPC ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2012-03-05 at 18:16 +0100, DENIEL Philippe wrote:
> Hi List,
> 
> I ran a stupid test (using the kernel's knfsd) : I filled up completely 
> a filesystem with a few big file. When it was 100% full (no free block 
> at all), I ran a dd on it.
> The dd said it could write 793 blocks of size 1mb  and failed on IO 
> error. At the end, I could see an empty file in the NFS exported tree.
> Question is :
>     - why did I get EIO and not ENOSPC ?

Did the server actually return NFS3ERR_NOSPC, or did it return something
else? If the server returns NFS3ERR_NOSPC, then I'd expect the client to
translate that as ENOSPC.

Note that if you were using soft mounts (boo! hiss!), then the client
may have timed out while the server was trying to find free space on the
filesystem. In that case, I'd indeed expect EIO.

>     - why did dd say "hey, I could write 793 blocks" when it wrote 
> nothing (and could not write anything).
> Do you have an idea on that ?

The client can't predict the state of the server.

It will fill up its cache, and then only find out about the ENOSPC error
when it tries to write out the data. That is the correct way to optimise
the client behaviour when we're dealing with what should be a very rare
condition.

Trond
-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux