summaryrefslogtreecommitdiff
path: root/src/mscp.c
AgeCommit message (Collapse)Author
2024-04-29default chunk size is filesize/(nr_conn*4) (Issue #20)Ryo Nakamura
and clean-up chunk_sz related parts.
2024-04-26change default minimum chunk size to 16MB (Issue #20)Ryo Nakamura
2024-04-26remove limitation that min/max chunk size must be a multiple of page sizeRyo Nakamura
Also mentioned by Issue #20.
2024-04-10add -L limit bitrate option (#14)Ryo Nakamura
2024-02-20checkpoint includes usernameRyo Nakamura
2024-02-18add -W and -R option for resume checkpointRyo Nakamura
2024-02-17ready to implement the main-sideRyo Nakamura
2024-02-17add checkpoint.c and .hRyo Nakamura
2024-02-11tiny fix on poolRyo Nakamura
2024-02-11little cleanupRyo Nakamura
2024-02-11change chunk_pool from list to poolRyo Nakamura
2024-02-11cleanup mscp_scan_thread related codesRyo Nakamura
2024-02-11change thread_list to thread_poolRyo Nakamura
2024-02-11change path_list to path_poolRyo Nakamura
2024-02-11add pool strcture and move src list to poolRyo Nakamura
2024-02-07cleanup error message handlingRyo Nakamura
The top-level funtion in a thread should print errors using priv_get_err(), while lower-level functions should set error messages using priv_set_err() except that error mesesages should be printed immediately, e.g., under walk_src_path().
2024-02-06add .clang-format from Linux kernel and format sourcesRyo Nakamura
The exception is that ColumnLimit is 90.
2024-02-06refactor error message-related functionsRyo Nakamura
split message print fuctions (mpr_*), strerrno, and mscp_get/set_error into print.c/h and strerrno.c/h. ToDo: revise usages of priv_set_errv and pr_* functions.
2024-02-06add -p option, preserving file timestampsRyo Nakamura
2024-02-05passing options via pointers in mscp_ssh_optsRyo Nakamura
We do not need static buf because we have already dropped python biding support.
2024-02-04do not passing msg_fp via mscp optsRyo Nakamura
instead, mpr_* functions print messages to stdout or stderr directly.
2024-01-18add SPDX-License-Identifier to source filesRyo Nakamura
2024-01-18don't allocate char[PATH_MAX] for each fileRyo Nakamura
This commit makes struct path allocation use strndup(). It reduices the memory footprint for struct path per file (issue #8).
2023-11-25add -I interval optionRyo Nakamura
-I INTERVAL option inserts sleep for interval (seconds) between SSH connection attempts (issue #7).
2023-11-01write total transferred bytes and number of filesRyo Nakamura
at the end of output when serverity is notice.
2023-11-01change msg: thread[%d] to thread:%dRyo Nakamura
2023-08-03use pseudo glob/globfree for remote-glob when muslRyo Nakamura
musllibc does not implement GLOB_ALTDIRFUNC, so do not call glob for remote sides when libc is musl. test_e2e.py skips test_glob_src_path when running on alpine.
2023-08-03add glob for source pathsRyo Nakamura
https://github.com/upa/mscp/issues/3
2023-08-03cleanup wrappers for file operationsRyo Nakamura
Previously wrapper functions for open(), opendir(), and stat(), etc, are implemneted in path.h, and now they are in fileops.h and fileops.c. This commit is a reparation for remote glob.
2023-05-07mscp: maintain mscp_thread structs in listRyo Nakamura
Instead of m->threads array, struct mscp_thread instanes are maintained in m->thread_list. This enables stable counter access via mscp_get_stats().
2023-03-25fix error handling when scan thread failed.Ryo Nakamura
set chunk pool to fill to invoke copy threads when scan failed.
2023-03-15add sem_create(), wrappign sem_init() for linux and sem_open() for macOSRyo Nakamura
2023-03-15macOS does not support sem_init. use sem_open insteadRyo Nakamura
2023-03-15add comment to mscp_scan(), why usleep(100)Ryo Nakamura
2023-03-15rename mscp_prepare to mscp_scanRyo Nakamura
2023-03-15set m->tid_prepare 0 to avoid duble joinRyo Nakamura
2023-03-15mscp: add -u max_startups option.Ryo Nakamura
pymscp also accepts keyword 'max_startups' (int).
2023-03-15fix: when msg_fd is 0, use STDOUT_FILENORyo Nakamura
2023-03-15do not fdopen(msg_fd) if msg_fd < 0Ryo Nakamura
2023-03-15introduce semaphore for concurrent connecting sshRyo Nakamura
instead of ssh_estab_queue (delay-based approach). MaxStartups in sshd_config limits number of conccurent incoming ssh connections. mscp_opts->max_startups adjusts this value.
2023-03-15cleanup message print functionsRyo Nakamura
2023-03-14rename ssh_connect_flag to ssh_estab_queueRyo Nakamura
2023-03-14implement ssh_connect_flagRyo Nakamura
Each copy thread establishes SSH/SFTP connection to remote host. A delay is inserted between SSH connecting to the remote.
2023-03-14cleanup mscp_prepare-related codeRyo Nakamura
2023-03-13mscp_prepare() scans source paths in a thread.Ryo Nakamura
This commit runs mscp_prepare() in a pthread. mscp copy threads run aysnchronously with mscp_prepare(). So, when mscp_prepare() has not finished yet (due to too many source files), we can start to copy files.
2023-03-13revise walk_src_path.Ryo Nakamura
In new walk_src_path, resolve dst path and resolve chunks are invoked when adding a path.
2023-03-12fix cleanupRyo Nakamura
2023-03-11move direction from mscp_opts to mscp_init argumentRyo Nakamura
2023-03-10fix uninitialized dst_path_is_dir boolRyo Nakamura
2023-03-04add doxygen for mscp.hRyo Nakamura