From f242fd47e030912ffb0da3febbff3c50d8c20dee Mon Sep 17 00:00:00 2001 From: Alex Aizman Date: Fri, 19 Jul 2024 15:02:27 -0400 Subject: [PATCH] follow-up Signed-off-by: Alex Aizman --- ais/target.go | 2 +- ais/tgtcp.go | 2 +- ais/tgtspace.go | 5 ++++- ais/tgttxn.go | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ais/target.go b/ais/target.go index 4f1b14c42e..880964cd32 100644 --- a/ais/target.go +++ b/ais/target.go @@ -1452,7 +1452,7 @@ func (t *target) blobdl(params *core.BlobParams, oa *cmn.ObjAttrs) (string, *xs. // cap cs := fs.Cap() if errCap := cs.Err(); errCap != nil { - cs = t.oos(nil) + cs = t.oos(cmn.GCO.Get()) if err := cs.Err(); err != nil { return "", nil, err } diff --git a/ais/tgtcp.go b/ais/tgtcp.go index 7f062dca76..6d435ff388 100644 --- a/ais/tgtcp.go +++ b/ais/tgtcp.go @@ -813,7 +813,7 @@ func (t *target) _postBMD(newBMD *bucketMD, tag string, rmbcks []*meta.Bck) { // since some buckets may have been destroyed cs := fs.Cap() if cs.Err() != nil { - _ = t.oos(nil) + _ = t.oos(cmn.GCO.Get()) } } diff --git a/ais/tgtspace.go b/ais/tgtspace.go index cb507ed552..1319a13401 100644 --- a/ais/tgtspace.go +++ b/ais/tgtspace.go @@ -37,7 +37,10 @@ var ( // triggers by an out-of-space condition or a suspicion of thereof -func (t *target) oos(config *cmn.Config) fs.CapStatus { return t.OOS(nil, config, nil) } +func (t *target) oos(config *cmn.Config) fs.CapStatus { + debug.Assert(config != nil) + return t.OOS(nil, config, nil) +} func (t *target) OOS(csRefreshed *fs.CapStatus, config *cmn.Config, tcdf *fs.TargetCDF) (cs fs.CapStatus) { var errCap error diff --git a/ais/tgttxn.go b/ais/tgttxn.go index 354ef0343a..c15d7b4aef 100644 --- a/ais/tgttxn.go +++ b/ais/tgttxn.go @@ -167,7 +167,7 @@ func (t *target) txnHandler(w http.ResponseWriter, r *http.Request) { t.transactions.find(c.uuid, ActCleanup) if cmn.IsErrCapExceeded(err) { - cs := t.oos(nil) + cs := t.oos(cmn.GCO.Get()) t.writeErrStatusf(w, r, http.StatusInsufficientStorage, "%s: %v", cs.String(), err) } else { t.writeErr(w, r, err)