Bull GNU/Linux NFSv4 project

NFSv4 and locks


Description


To test and stress NFSv4 locks, a new tool has been written. The locktests program creates a master program and slave programs. The master program opens a file and sets a lock on the whole file (fcntl). Then it tells the slaves processes to perform the same operation on the test file.

The slave processes try to perform one operation :


The operation can work or fail. This information is returned to the master program. It compares the result with the expected and predeterminated results of the test.

Slaves can be created as new processes (fork, default) or as threads (pthread_create, -T). Expected results are different for some tests.

Expected results


The expected results of test, depend on:


Here is a table of expected results.  Allowed  mean no error is returned by the operation. Denied mean an error (EAGAIN) is returned.

Master
 Slave type   Test operation   advisory locking     mandatory  locking  
 read lock    write lock    read lock    write lock  
thread  set a read lock  Allowed   Allowed   Allowed   Allowed 
set a write lock  Allowed   Allowed   Allowed   Allowed 
read  Allowed   Allowed   Allowed   Allowed 
write  Allowed   Allowed   Allowed   Allowed 
process  set a read lock  Allowed   Denied   Allowed   Denied 
set a write lock Denied Denied Denied Denied
read  Allowed   Allowed  Denied  Allowed 
write  Allowed   Allowed  Denied Denied


Effective results

Advisory locking (default)


Results over NFSv4 are correct. However, when using more than 50 concurents process or threads,

Mandatory locking (-omand)


Mounting with the -omand option does not seem to have any effect. The NFSv4 locking behaviour is the same with and without the -omand option.

Software configuration


kernel is 2.6.14-rc1-CITI_NFS4_ALL-2

Tests summary
This page is not displayed correctly? Please, use a browser written on this century

Page maintained by: Vincent ROQUETA
Accessed times since its creation.
 
Last update: 2005, October 20