Skip to content

Commit

Permalink
[XrdCl] Add XRD_USEPGWRTRD envar that enables in-fly error correction…
Browse files Browse the repository at this point in the history
… of corrupted pages.
  • Loading branch information
simonmichal authored and gganis committed Nov 23, 2021
1 parent bff9954 commit 3119972
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docs/man/xrdcp.1
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,11 @@ XRD_CPRETRYPOLICY
Copy job retry policy, either force or retry (default: force).
.RE

XRD_CPUSEPGWRTRD
.RS 5
Enable in-fly error correction of corrupted pages (default: 1).
.RE

.SH RETURN CODES
.RE
\fB50\fR : generic error (e.g. config, internal, data, OS, command line option)
Expand Down
6 changes: 3 additions & 3 deletions src/XrdCl/XrdClClassicCopyJob.cc
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ namespace
pMaxNbConn = val - 1; // account for the control stream

val = XrdCl::DefaultCpUsePgWrtRd;
XrdCl::DefaultEnv::GetEnv()->GetInt( "UsePgWrtRd", val );
XrdCl::DefaultEnv::GetEnv()->GetInt( "CpUsePgWrtRd", val );
pUsePgRead = !url->IsLocalFile() && ( val == 1 );
}

Expand Down Expand Up @@ -1229,7 +1229,7 @@ namespace
pChunkSize( chunkSize ), pDone( false )
{
int val = XrdCl::DefaultCpUsePgWrtRd;
XrdCl::DefaultEnv::GetEnv()->GetInt( "UsePgWrtRd", val );
XrdCl::DefaultEnv::GetEnv()->GetInt( "CpUsePgWrtRd", val );
pUsePgRead = !url->IsLocalFile() && ( val == 1 );
}

Expand Down Expand Up @@ -1691,7 +1691,7 @@ namespace
pParallel( parallelChunks ), pSize( -1 )
{
int val = XrdCl::DefaultCpUsePgWrtRd;
XrdCl::DefaultEnv::GetEnv()->GetInt( "UsePgWrtRd", val );
XrdCl::DefaultEnv::GetEnv()->GetInt( "CpUsePgWrtRd", val );
pUsePgWrt = !url.IsLocalFile() && ( val == 1 );
}

Expand Down
1 change: 1 addition & 0 deletions src/XrdCl/XrdClDefaultEnv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ namespace XrdCl
REGISTER_VAR_INT( varsInt, "RetryWrtAtLBLimit", DefaultRetryWrtAtLBLimit );
REGISTER_VAR_INT( varsInt, "XRateThreshold", DefaultXRateThreshold );
REGISTER_VAR_INT( varsInt, "CpRetry", DefaultCpRetry );
REGISTER_VAR_INT( varsInt, "CpUsePgWrtRd", DefaultCpUsePgWrtRd );

REGISTER_VAR_STR( varsStr, "ClientMonitor", DefaultClientMonitor );
REGISTER_VAR_STR( varsStr, "ClientMonitorParam", DefaultClientMonitorParam );
Expand Down

0 comments on commit 3119972

Please sign in to comment.