> > > > 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... sure it is. it's prohibited by the process holding the open(WRITE). EAGAIN says try again later because a lock is held - which it is. (actually process is a confusing word - should be 'lock owner'. it's only a process in the local case. in the NFSv4 or Samba case, it's a pointer to a struct describing a remote entity) > > > 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. no. there is nothing wrong with the input args. fd is an open file descriptor, and the mode of the setlease request matches the mode of the open. why is EAGAIN a problem? -->Andy > > > -Jason > - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html