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 <[email protected]>
  • Loading branch information
c-hagem committed Nov 12, 2024
1 parent 65c4e92 commit ea7ce2e
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: u32 = 1 << 5; // c.f. https://github.com/torvalds/linux/blob/master/include/uapi/linux/fuse.h#L372
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 ea7ce2e

Please sign in to comment.