Fwd: Questions on pynfs:st_lock.py:testLongPoll

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

 



Hi,

It looks like "testLongPoll" in st_lock.py is trying to test whether
lock is not prematurely reaped out before lease expires.

However, I don't understand that the following part of the code where
lockowner3 is trying to grab a lock is also part of the same Client
and owns the same ClientID.

So, after perforing that operation, lease on client will be renewed.
And thus, lease will never expire. Only when the loop completes, LOCK
will be unlocked by the first owner.

Also, the test does not consider that if NFS server is implementing
delayed return of DENIAL for conflicting locks.

Does this test assume certain NFS server implementation ? Also, what
if the lease is anyway going to be renewed for failed operation as
well for same client id ?

    # Poll for lock
    while timeleft:
        time.sleep(1)
        if badpoll:
            # Third owner tries to butt in and steal lock
            res3 = c.lock_file("owner3", fh3, stateid3,
                               type=WRITEW_LT, lockowner="lockowner3_LOCK22")
            if res3.status == NFS4_OK:
                t.pass_warn("Locking is not fair")
            check(res3, NFS4ERR_DENIED,
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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