Closed linuxsmiths closed 6 months ago
Causal first review looks mostly good. I will review properly tonight or tomorrow.
One small thing that failed to spot earlier is that we shouldn't assume that stderr is available. Can you change the LOG* functions to instead log to a file descriptor that the application sppecifies through rpc|nfs_set_log_fd() or something. Default to -1 to indicate "no logging".
Causal first review looks mostly good. I will review properly tonight or tomorrow.
One small thing that failed to spot earlier is that we shouldn't assume that stderr is available. Can you change the LOG* functions to instead log to a file descriptor that the application sppecifies through rpc|nfs_set_log_fd() or something. Default to -1 to indicate "no logging".
Since RPC_LOG() was logging to stderr I made LOG() (and earlier TLS_LOG) also log to that. In general I think logging needs more thought. How about we tackle that in a separate change. Since we are a library, it's best to use the logger provided by the user, f.e., user may want to add timestamp and/or some tag to the logs. Something like how gnutls does it - it asks for the logging functions and then calls them. f.e., gnutls_global_set_log_function(), gnutls_global_set_audit_log_function()
On Mon, 29 Apr 2024 at 16:48, linuxsmiths @.***> wrote:
Causal first review looks mostly good. I will review properly tonight or tomorrow.
One small thing that failed to spot earlier is that we shouldn't assume that stderr is available. Can you change the LOG* functions to instead log to a file descriptor that the application sppecifies through rpc|nfs_set_log_fd() or something. Default to -1 to indicate "no logging".
Since RPC_LOG() was logging to stderr I made LOG() (and earlier TLS_LOG) also log to that. In general I think logging needs more thought. How about we tackle that in a separate change. Since we are a library, it's best to use the logger provided by the user, f.e., user may want to add timestamp and/or some tag to the logs. Something like how gnutls does it - it asks for the logging functions and then calls them. f.e., gnutls_global_set_log_function(), gnutls_global_set_audit_log_function()
Agree. Lets handle logging as a separate issue.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Merged, thanks
This change adds the following resiliency to libnfs clients.
Testing done: Tested by blocking TCP usign iptables to induce retransmit and make sure data xfer is valid. Various stress runs while constantly killing/blocking connections.