New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/nfs: add test for concurrent file opening #716

Merged
merged 2 commits into from Jan 9, 2019
File filter...
Filter file types
Jump to file or symbol
Failed to load files and symbols.
+229 −75
Diff settings

Always

Just for now

Copy path View file
@@ -321,7 +321,7 @@ pub unsafe extern "C" fn file_write(
/// Close is invoked only after all the data is completely written. The
/// file is saved only when `close` is invoked.
///
/// If the file was opened in any of the read modes, returns the modified
/// If the file was opened in any of the write modes, returns the modified
/// file structure as a result. If the file was opened in the read mode,
/// returns the original file structure that was passed as an argument to
/// `file_open`.
@@ -350,7 +350,7 @@ pub unsafe extern "C" fn file_close(
}).into_box()
.into()
} else {
// The reader will be dropped automatically
// The reader will be dropped automatically.
o_cb(
user_data.0,
FFI_RESULT_OK,
Copy path View file
@@ -14,16 +14,16 @@ use self_encryption::SelfEncryptor;
use self_encryption_storage::SelfEncryptionStorage;
use utils::FutureExt;

/// Reader is used to read contents of a File. It can read in chunks if the
/// file happens to be very large.
/// `Reader` is used to read contents of a `File`. It can read in chunks if the `File` happens to be
/// very large.
#[allow(dead_code)]
pub struct Reader<C: Client> {
client: C,
self_encryptor: SelfEncryptor<SelfEncryptionStorage<C>>,
}

impl<C: Client> Reader<C> {
/// Create a new instance of Reader.
/// Create a new instance of `Reader`.
pub fn new(
client: C,
storage: SelfEncryptionStorage<C>,
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.