Skip to content

Commit

Permalink
add comment about ABI
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hagemeier <chagem@amazon.com>
  • Loading branch information
c-hagem committed Nov 12, 2024
1 parent 65c4e92 commit 8946e8c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mountpoint-s3/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use tracing::{debug, trace, Level};

use fuser::consts::FOPEN_DIRECT_IO;
//use fuser::consts::FOPEN_NOFLUSH;
const FUSE_FOPEN_NOFLUSH = 1 << 5; // c.f. https://github.com/torvalds/linux/blob/master/include/uapi/linux/fuse.h#L372

Check failure on line 13 in mountpoint-s3/src/fs.rs

View workflow job for this annotation

GitHub Actions / Formatting

missing type for `const` item

Check failure on line 13 in mountpoint-s3/src/fs.rs

View workflow job for this annotation

GitHub Actions / Tests (FUSE 3)

missing type for `const` item

Check failure on line 13 in mountpoint-s3/src/fs.rs

View workflow job for this annotation

GitHub Actions / Tests (FUSE 2)

missing type for `const` item

Check failure on line 13 in mountpoint-s3/src/fs.rs

View workflow job for this annotation

GitHub Actions / Check all targets

missing type for `const` item

Check failure on line 13 in mountpoint-s3/src/fs.rs

View workflow job for this annotation

GitHub Actions / Clippy

missing type for `const` item

Check failure on line 13 in mountpoint-s3/src/fs.rs

View workflow job for this annotation

GitHub Actions / Shuttle tests

missing type for `const` item

Check failure on line 13 in mountpoint-s3/src/fs.rs

View workflow job for this annotation

GitHub Actions / Tests (MacOS)

missing type for `const` item

Check failure on line 13 in mountpoint-s3/src/fs.rs

View workflow job for this annotation

GitHub Actions / Cargo benchmarks

missing type for `const` item
use fuser::{FileAttr, KernelConfig};
use mountpoint_s3_client::ObjectClient;

Expand Down Expand Up @@ -347,9 +348,9 @@ where
};
debug!(fh, ino, "new file handle created");
self.file_handles.write().await.insert(fh, Arc::new(handle));

let reply_flags = (if direct_io { FOPEN_DIRECT_IO } else { 0 }) | (if is_read_filehandle { 1 << 5 } else { 0 });
debug!("Set read file flags as {reply_flags}");
// TODO: Perform some check against ABI version here (?)
let mut reply_flags = (if direct_io { FOPEN_DIRECT_IO } else { 0 });

Check failure on line 352 in mountpoint-s3/src/fs.rs

View workflow job for this annotation

GitHub Actions / Clippy

unnecessary parentheses around assigned value
reply_flags |= (if is_read_filehandle { FUSE_FOPEN_NOFLUSH } else { 0 });

Check failure on line 353 in mountpoint-s3/src/fs.rs

View workflow job for this annotation

GitHub Actions / Clippy

unnecessary parentheses around assigned value
Ok(Opened { fh, flags: reply_flags })
}

Expand Down

0 comments on commit 8946e8c

Please sign in to comment.