Skip to contentSkip to conversation

nfs4 write delegation status

DISCUSSION David V. Cloud 3 participants 4 messages Jul 21, 2009 – Jul 23, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,
I was playing with nfs4 delegation, finding out that write delegations have never been granted. I am using Benny Halevy's git tree with latest pnfs-block-all branch. With rpcdebug, I found out that the write-delegation grant was rejected due to setlease failure with error code (-11, which is -EAGAIN). I finally figured out that this failure was caused by the following lines in generic_setlease function,

        if ((arg == F_WRLCK)
            && ((atomic_read(&dentry->d_count) > 1)
            || (atomic_read(&inode->i_count) > 1)))
            goto out;

In my nfsd, the i_count, and d_count turn out to be 2 (no conflicts actaully exist in my test case), so write-delegations always failed. I did find some similar posts on nfs4 related mail lists about this problem. One possible hack by Ajay could be found at
http://osdir.com/ml/linux.nfsv4/2006-08/msg00063.html

I am curious whether there is any progress in awarding write delegation in current linux nfs4 implementation (for example, any git branch with write delegation enabled I can pull?) Or, is write-delegation feature available in other systems like OpenSolaris?

Any suggestion if I would like to enable and test write delegation? I think some changes are needed to the setlease interface, right?

Thanks,
David

_______________________________________________
NFSv4 mailing list
[email protected]
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4

A message that is not in the archive (sent off-list or not yet received): fe2cbb740907211447t4dfcc0dara63bb96648599638-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#2 lore raw
Quoted 19 lines · David V. Cloud

Hi all,
I was playing with nfs4 delegation, finding out that write delegations have never been granted. I am using Benny Halevy's git tree with latest pnfs-block-all branch. With rpcdebug, I found out that the write-delegation grant was rejected due to setlease failure with error code (-11, which is -EAGAIN). I finally figured out that this failure was caused by the following lines in generic_setlease function,

        if ((arg == F_WRLCK)
            && ((atomic_read(&dentry->d_count) > 1)
            || (atomic_read(&inode->i_count) > 1)))
            goto out;

In my nfsd, the i_count, and d_count turn out to be 2 (no conflicts actaully exist in my test case), so write-delegations always failed. I did find some similar posts on nfs4 related mail lists about this problem. One possible hack by Ajay could be found at
http://osdir.com/ml/linux.nfsv4/2006-08/msg00063.html

Quoted 7 lines

I am curious whether there is any progress in awarding write delegation in current linux nfs4 implementation (for example, any git branch with write delegation enabled I can pull?) Or, is write-delegation feature available in other systems like OpenSolaris?

Any suggestion if I would like to enable and test write delegation? I think some changes are needed to the setlease interface, right?

I really don't want to enable write delegations until we figure out how to enforce them correctly against local (non-nfs) users of the exported filesystem as well. In addition to breaking delegations on read opens, that means breaking delegations or doing a cb_getattr on operations like stat.

--b.

#3 lore raw

Hello,

Quoted 5 lines

I really don't want to enable write delegations until we figure out how to enforce them correctly against local (non-nfs) users of the exported filesystem as well. In addition to breaking delegations on read opens, that means breaking delegations or doing a cb_getattr on operations like stat.

do you know whether there are local FS where the maintainers at least plan to incorporate delegations?

            -- Eric
#4 lore raw
Quoted 10 lines · Eric Veith

Hello,

Quoted 5 lines

I really don't want to enable write delegations until we figure out how to enforce them correctly against local (non-nfs) users of the exported filesystem as well. In addition to breaking delegations on read opens, that means breaking delegations or doing a cb_getattr on operations like stat.

do you know whether there are local FS where the maintainers at least plan to incorporate delegations?

Local filesystems don't need support from the filesystem itself; the only modifications necessary should be to the vfs.

We have patches that do that for read delegations:

http://git.linux-nfs.org/?p=bfields/linux-topics.git;a=shortlog;h=refs/heads/leases

but they still have a few problems. I hope to get them out for review soon.

Write delegations are more difficult. Distributed filesystems will also be harder.

--b.