[linux-cifs-client] Record locking

Thomas Uhl thomas.uhl at web.de
Sun Jun 13 18:24:43 GMT 2004


I did some tests on record locking. Here an exctract of my test program:

        ret = fcntl (fd, F_GETLK, &lock);
        if (ret < 0) {
                perror ("fcntl");
                exit (1);
        }

        if (lock.l_type != F_UNLCK) {
                printf ("lock.l_type: %d\n", lock.l_type);
                printf ("lock.l_whence: %d\n", lock.l_whence);
                printf ("lock.l_start: %d\n", lock.l_start);
                printf ("lock.l_len: %d\n", lock.l_len);
                printf ("lock.l_pid: %d\n", lock.l_pid);
        } else {
                printf ("File not locked\n");
        }

The lock.l_pid is not set correctly on a CIFS share, it works correctly on a NFS share and of course on a local disk.
l_pid is equivalent with the pid of the test program on a CIFS share. 

Yours
  Tom 
_______________________________________________________
WEB.DE Video-Mail - Sagen Sie mehr mit bewegten Bildern
Informationen unter: http://freemail.web.de/?mc=021199



More information about the linux-cifs-client mailing list