Re: [PATCH 1/2] NFSD: added FREE_STATEID operation

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

 



On 05/25/2011 11:05 AM, J. Bruce Fields wrote:
> On Fri, May 20, 2011 at 04:16:18PM -0400, Bryan Schumaker wrote:
>> On 05/20/2011 04:12 PM, bjschuma@xxxxxxxxxx wrote:
>>> From: Bryan Schumaker <bjschuma@xxxxxxxxxx>
>>> +static __be32
>>> +nfsd4_free_delegation_stateid(stateid_t *stateid)
>>> +{
>>> +	struct nfs4_delegation *dp = search_for_delegation(stateid);
>>> +	if (dp)
>>> +		return nfserr_locks_held;
>>> +	return nfserr_bad_stateid;
>>> +}
>>> +
>>> +static __be32
>>> +nfsd4_free_lock_stateid(stateid_t *stateid, struct nfs4_stateid *stp)
>>> +{
>>> +	if (check_for_locks(stp->st_file, stp->st_stateowner))
>>
>> I'm not sure if stateids are unique to (file, stateowner), but I'm not sure how else to check for locks at the moment.
> 
> Actually, looking... there's a one-to-one lockowner<->lockstateid
> correspondance.  Which is dumb.
> 
> The server's handling of lock state needs more serious help than I
> realized!
> 
> I think your patch is OK now, though.

Thanks for the reviews!

> 
> --b.
> --
> 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

--
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