Git Product home page Git Product logo

Comments (8)

sahlberg avatar sahlberg commented on August 12, 2024

from fuse-nfs.

julian-hj avatar julian-hj commented on August 12, 2024

That all makes sense. Thanks very much for the quick and thoughtful feedback. We will have a think about how we want to proceed.

from fuse-nfs.

sahlberg avatar sahlberg commented on August 12, 2024

from fuse-nfs.

julian-hj avatar julian-hj commented on August 12, 2024

Interesting....so, how does the server know what "this client" means? In our use case, we may have numerous fuse-nfs processes starting and stopping on the same host, potentially mounting the same nfs share with different options.

Also, I noticed in the packet trace that libnfs just sends "libnfs" as the client machine name in the credentials block. Could that result in the nfs server getting confused when different fuse processes go up and down?

Thanks!

from fuse-nfs.

sahlberg avatar sahlberg commented on August 12, 2024

Client that NSM is using should be the string that you provide in the nlm lock request as
NLM4_LOCKargs.lock.caller_name

The credentials block is part of the ONC-RPC header and should not affect (or even be visible) to the NLM layer, but it may be a good idea to change this from "libnfs" to something more descriptive.
If for no other reason making it easier to analyze and filter on network traces.

As few things really look at or depend on the cred->host field, having "libnfs" as the default might be ok-ish. Possibly this should be changed to something more descriptive such as libnfs- or something.
In your case you probably want to have something more specific to your use case and to easily distinguish between different instances of the fuse module. You can actually override and replace cred->host with whatever you want using the nfs_set_auth and libnfs_authunix_create calls.
Maybe fuse-nfs.c should use these functions and set the credentials explicitely to "fuse-nfs-" or something ?
Even better might be to be able to set the hostname string from the command line via the nfs url.
The NFS url already allow you to set uid and gid. Maybe just add an argument to also set the hostname.

from fuse-nfs.

sahlberg avatar sahlberg commented on August 12, 2024

FYI.
NFSv4 support in libnfs is coming along and should be reasonably complete and to the state where
one can use it for for example fuse-nfs. This is likely going to be ready towards the end of the year.

At that stage, when we can run libnfs in a NFSv4 mode, it should be fairly straightforward to do the plumbing to add locking as we no longer need to rely on NLM or NSM.

from fuse-nfs.

julian-hj avatar julian-hj commented on August 12, 2024

That's excellent to hear! NFSv4 and file locking have both been on our roadmap for a while. If we can add support for v4, then I think support for locking in v3 might be quite a bit less critical.

from fuse-nfs.

sahlberg avatar sahlberg commented on August 12, 2024

Libnfs has support for both lockf() and fcntl() locking now but only for nfs v4.

With this, it should be fairly straightforward to add locking support to fuse-nfs.

from fuse-nfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.