Skip to content
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

feat: add iscsi_reset_next_reconnect interface #429

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions include/iscsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,11 @@ EXTERN int iscsi_force_reconnect(struct iscsi_context *iscsi);
*/
EXTERN int iscsi_force_reconnect_sync(struct iscsi_context *iscsi);

/*
* Reset iscsi auto reconnect next_reconnect time to the current time.
*/
EXTERN void iscsi_reset_next_reconnect(struct iscsi_context *iscsi);

/*
* Asynchronous call to perform an ISCSI login.
*
Expand Down
6 changes: 6 additions & 0 deletions lib/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,3 +494,9 @@ int iscsi_force_reconnect(struct iscsi_context *iscsi)
{
return reconnect(iscsi, 1);
}

void iscsi_reset_next_reconnect(struct iscsi_context *iscsi)
{
ISCSI_LOG(iscsi, 1, "reset iscsi next_reconnect");
iscsi->next_reconnect = time(NULL);
}
1 change: 1 addition & 0 deletions lib/libiscsi.def
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ iscsi_extended_copy_task
iscsi_receive_copy_results_sync
iscsi_receive_copy_results_task
iscsi_reconnect
iscsi_reset_next_reconnect
iscsi_sanitize_sync
iscsi_sanitize_task
iscsi_sanitize_block_erase_sync
Expand Down
1 change: 1 addition & 0 deletions lib/libiscsi.syms.in
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ iscsi_reportluns_sync
iscsi_reportluns_task
iscsi_reserve6_sync
iscsi_reserve6_task
iscsi_reset_next_reconnect
iscsi_sanitize_block_erase_sync
iscsi_sanitize_block_erase_task
iscsi_sanitize_crypto_erase_sync
Expand Down
Loading