Skip to content

Updating to most recent version of libnfs#18

Open
tryggvil wants to merge 5 commits intocholcombe973:masterfrom
NetAppLabs:master
Open

Updating to most recent version of libnfs#18
tryggvil wants to merge 5 commits intocholcombe973:masterfrom
NetAppLabs:master

Conversation

@tryggvil
Copy link

@tryggvil tryggvil commented Nov 1, 2024

  • Updating to most recent version of libnfs master
  • Updating nix crate
  • Changing Rc to Arc
  • Removing problematic redeclaration of nfs_url struct

Cargo.toml Outdated
libc = "~0.2"
libnfs-sys = "~0.2"
nix = "~0.25"
#libnfs-sys = "~0.2"
Copy link
Owner

@cholcombe973 cholcombe973 Nov 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to change this to the published version again. I'll push that change to crates.io shortly

#[derive(Clone)]
struct NfsPtr(*mut nfs_context);

unsafe impl Send for NfsPtr{}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think back when I first wrote this I tried to figure out if the nfs pointer is thread safe. Could you point me towards some code or docs?

Copy link
Author

@tryggvil tryggvil Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the implementation to enclose nfs_context within a Mutex to implement safe Send

@cholcombe973
Copy link
Owner

I found my old issue I opened with LibNFS: sahlberg/libnfs#266. It's not thread safe so we shouldn't impl Send/Sync

tryggvil and others added 3 commits November 6, 2024 16:40
... so that reads/writes happen in chunks where maximum chunk size comes from max
read/write size obtained via libnfs functions nfs_get_readmax/nfs_get_writemax,
respectively.
Now references our forked repo and its version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants