This moves the Rust sources out of rust_src/ and into the top level.
Running the bcachefs executable out of the development tree is now:
$ ./target/release/bcachefs command
or
$ cargo run --profile release -- command
instead of "./bcachefs command".
Building and installing is still:
$ make && make install
Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
this gets us back down to a single fd for opening block devices, which
means we can use O_EXCL.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
not needed with pwritev2(.., RWF_SYNC), and perhaps we can get down to
one fd and then use O_EXCL for block devices.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
If io_submit() returns -EAGAIN, that just means the io context is full
and we need to wait for completions - no need to die.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
A recent libbcachefs update accidentally committed a change that dropped
the O_DIRECT flag - we definitely didn't want to do that.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
We're reading device metadat in mostly sequential order - buffered IO
will be faster than O_DIRECT.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
In commit ba1dbafc1f I reverted 9942fc82d4, which was a workaround
for an upstream 32bit libaio bug. Oops.
Signed-off-by: Brett Holman <bholman.devel@gmail.com>
The existing cleanup code would silently cancel disk IO requests, if
somehow the calling code did not wait for completion. This code now
tracks requests and will bug if any are lost.
Signed-off-by: Justin Husted <sigstop@gmail.com>
The shutdown code in d79d57e and b20e160 had a race condition during
shutdown, due to not owning a reference on the associated task_struct
while the associated threads shut themselves down.
Patch over this by taking an appropriate reference.
Signed-off-by: Justin Husted <sigstop@gmail.com>