diff --git a/dune-project b/dune-project index fc9e3e404..0c35c7d2e 100644 --- a/dune-project +++ b/dune-project @@ -35,7 +35,7 @@ (alcotest (and (>= 1.7.0) :with-test)) (eio (= :version)) (mdx (and (>= 2.2.0) :with-test)) - (logs (>= 0.7.0)) + (logs (and (>= 0.7.0) :with-test)) (fmt (>= 0.8.9)) (cmdliner (and (>= 1.1.0) :with-test)) (uring (>= 0.7)))) diff --git a/eio_linux.opam b/eio_linux.opam index 94f2f56d9..8d43b86a5 100644 --- a/eio_linux.opam +++ b/eio_linux.opam @@ -13,7 +13,7 @@ depends: [ "alcotest" {>= "1.7.0" & with-test} "eio" {= version} "mdx" {>= "2.2.0" & with-test} - "logs" {>= "0.7.0"} + "logs" {>= "0.7.0" & with-test} "fmt" {>= "0.8.9"} "cmdliner" {>= "1.1.0" & with-test} "uring" {>= "0.7"} diff --git a/lib_eio_linux/dune b/lib_eio_linux/dune index 3f0ee4076..12b9921b4 100644 --- a/lib_eio_linux/dune +++ b/lib_eio_linux/dune @@ -11,7 +11,7 @@ (flags :standard -D_LARGEFILE64_SOURCE) (include_dirs ../lib_eio/unix/include) (names eio_stubs)) - (libraries eio eio.utils eio.unix uring logs fmt)) + (libraries eio eio.utils eio.unix uring fmt)) (rule (enabled_if diff --git a/lib_eio_linux/log.ml b/lib_eio_linux/log.ml deleted file mode 100644 index 8a4e83c88..000000000 --- a/lib_eio_linux/log.ml +++ /dev/null @@ -1,2 +0,0 @@ -let src = Logs.Src.create "eio_linux" ~doc:"Effect-based IO system for Linux/io-uring" -include (val Logs.src_log src : Logs.LOG) diff --git a/lib_eio_linux/sched.ml b/lib_eio_linux/sched.ml index a831a5d54..fd5836984 100644 --- a/lib_eio_linux/sched.ml +++ b/lib_eio_linux/sched.ml @@ -292,14 +292,11 @@ and handle_complete st ~runnable result = | Job_no_cancel k -> Suspended.continue k result | Cancel_job -> - begin match result with - | 0 (* Operation cancelled successfully *) - | -2 (* ENOENT - operation completed before cancel took effect *) - | -114 (* EALREADY - operation already in progress *) - -> () - | errno -> - Log.warn (fun f -> f "Cancel returned unexpected error: %s" (Unix.error_message (Uring.error_of_errno errno))) - end; + (* We don't care about the result of the cancel operation, and there's nowhere to send it. + The possibilities are: + 0 : Operation cancelled successfully + -2 : ENOENT - operation completed before cancel took effect + -114 : EALREADY - operation already in progress *) schedule st | Job_fn (k, f) -> Fiber_context.clear_cancel_fn k.fiber; @@ -552,7 +549,6 @@ let with_sched ?(fallback=no_fallback) config fn = | Ok () -> Some (Uring.Region.init ~block_size buf n_blocks) | Error `ENOMEM -> - Log.warn (fun f -> f "Failed to allocate %d byte fixed buffer" fixed_buf_len); None in let run_q = Lf_queue.create () in diff --git a/lib_eio_linux/tests/dune b/lib_eio_linux/tests/dune index 257245535..4634dd1ec 100644 --- a/lib_eio_linux/tests/dune +++ b/lib_eio_linux/tests/dune @@ -6,7 +6,7 @@ (= %{system} "linux_elf") ; Historically, Linux-x86_32 (= %{system} "elf"))) ; Historically, Linux-ppc64 (modules eurcp_lib) - (libraries eio_linux)) + (libraries eio_linux logs)) (executable (name eurcp) @@ -47,7 +47,7 @@ (= %{system} "linux_elf") ; Historically, Linux-x86_32 (= %{system} "elf"))) ; Historically, Linux-ppc64 (modules test) - (libraries alcotest eio_linux)) + (libraries alcotest eio_linux logs)) (mdx (package eio_linux)