Subject: [nfsv4] FREE_STATEID & open files question

From: Saul Tamari <[email-masked]>
Date: Tue, 25 Jun 2013 07:28:05 -0400

Hi,

When I read 18.38.3 I see the following:
The FREE_STATEID operation is used to free a stateid that no longer
has any associated locks (including opens, byte-range locks ...)

My question is:
Does a client need to send a FREE_STATEID after closing a file with
the open file's stateid?
What about calling FREE_STATEID with byte-range-lock stateid after a
CLOSE was called?

My understanding is that after a CLOSE all stateid's are freed, am I
wrong about this?

Thanks,
Saul

---

From: "Myklebust, Trond" <[email-masked]>
Date: Tue, 25 Jun 2013 14:07:12 +0000

> My understanding is that after a CLOSE all stateid's are freed, am I

You are correct.

FREE_STATEID is only needed in recovery situations (when the server sets
the SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED,
SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED, SEQ4_STATUS_ADMIN_STATE_REVOKED,
or SEQ4_STATUS_RECALLABLE_STATE_REVOKED flags (see RFC5661 section 8.3,
section 8.4.3, section 8.5 and section 18.46.3).

FREE_STATEID is also used in those situations where RELEASE_LOCKOWNER
would be used in minor version 0 (see RFC5661 section 8.2.4).

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
[email-masked]
www.netapp.com