setlease return code

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

 





On Tue, 13 Jun 2006, William A.(Andy) Adamson wrote:

> hi.
> 
> from man fcntl
> 
>      EACCES or EAGAIN
>               Operation  is  prohibited by locks held by other processes.  Or,
>               operation is prohibited because the file has been  memory-mapped
>               by another process.
> 
> a process with file open for writing is essentially holding a lock WRT 
> allowing a read lease, so i think EAGAIN is the appropriate error.
> 
> 

its not prohibited in this case by another process...

> again from man fcntl
> 
>       EINVAL For F_DUPFD, arg is negative or  is  greater  than  the  maximum
>               allowable  value.   For F_SETSIG, arg is not an allowable signal
>               number.
> 
> the arguments to the fcntl setlease call are correct, not invalid, so this is 
> the wrong error.
> 
> -->Andy


does EBADF make more sense then?

from the manpage:

    EBADF  
	fd is not an open file descriptor, or the  command  was  F_SETLK  or
        F_SETLKW  and  the  file descriptor open mode doesnâ??t match with the
        type of lock requested.


-Jason

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux