Skip to content

Commit

Permalink
Update nix dependency from 0.27.1 to 0.29.0 (#1003)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Carl Jones <[email protected]>
  • Loading branch information
dannycjones authored Sep 6, 2024
1 parent 813f95d commit 6d49885
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 12 deletions.
26 changes: 22 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mountpoint-s3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ lazy_static = "1.4.0"
libc = "0.2.126"
linked-hash-map = "0.5.6"
metrics = "0.22.1"
nix = { version = "0.27.1", default-features = false, features = ["fs", "process", "signal", "user"] }
nix = { version = "0.29.0", default-features = false, features = ["fs", "process", "signal", "user"] }
owo-colors = { version = "4.0.0", features = ["supports-colors"] }
regex = "1.7.1"
serde = { version = "1.0.190", features = ["derive"] }
Expand Down
12 changes: 5 additions & 7 deletions mountpoint-s3/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::fs::File;
use std::io::{Read, Write};
use std::num::NonZeroUsize;
use std::os::fd::AsRawFd;
use std::os::unix::prelude::FromRawFd;
use std::path::{Path, PathBuf};
use std::time::Duration;

Expand Down Expand Up @@ -497,10 +496,9 @@ where
let session = mount(args, client_builder);

// close unused file descriptor, we only write from this end.
nix::unistd::close(read_fd).context("Failed to close unused file descriptor")?;
drop(read_fd);

// SAFETY: `write_fd` is a valid file descriptor.
let mut pipe_file = unsafe { File::from_raw_fd(write_fd) };
let mut pipe_file = File::from(write_fd);

let status_success = [b'0'];
let status_failure = [b'1'];
Expand Down Expand Up @@ -536,11 +534,11 @@ where
let args = CliArgs::parse();

init_logging(args.logging_config()).context("failed to initialize logging")?;

// close unused file descriptor, we only read from this end.
nix::unistd::close(write_fd).context("Failed to close unused file descriptor")?;
drop(write_fd);

// SAFETY: `read_fd` is a valid file descriptor.
let mut pipe_file = unsafe { File::from_raw_fd(read_fd) };
let mut pipe_file = File::from(read_fd);

let (sender, receiver) = std::sync::mpsc::channel();

Expand Down

1 comment on commit 6d49885

@github-actions
Copy link

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 6d49885 Previous: 813f95d Ratio
sequential_read_four_threads_direct_io 1620.32294921875 MiB/s 5869.25625 MiB/s 3.62

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.