Skip to content

libct: intelrdt: improve directory cleanup logic#5155

Merged
rata merged 1 commit intoopencontainers:mainfrom
cyphar:intelrdt-improve-mkdir
Mar 6, 2026
Merged

libct: intelrdt: improve directory cleanup logic#5155
rata merged 1 commit intoopencontainers:mainfrom
cyphar:intelrdt-improve-mkdir

Conversation

@cyphar
Copy link
Member

@cyphar cyphar commented Mar 6, 2026

Follow-up to #3832.

It makes more sense to save whether we should cleanup the directory
after it gets created (to avoid error cases deleting a different
directory) as well as tying this check to the existing os.ErrExist
check rather than doing an extra stat(2).

Fixes: e2baa3a ("Intel RDT: update according to spec changes.")
Suggested-by: Akihiro Suda akihiro.suda.cz@hco.ntt.co.jp
Signed-off-by: Aleksa Sarai cyphar@cyphar.com

@cyphar cyphar added this to the 1.5.0 milestone Mar 6, 2026
@cyphar cyphar requested a review from AkihiroSuda March 6, 2026 09:42
It makes more sense to save whether we should cleanup the directory
after it gets created (to avoid error cases deleting a different
directory) as well as tying this check to the existing os.ErrExist
check rather than doing an extra stat(2).

Fixes: e2baa3a ("Intel RDT: update according to spec changes.")
Suggested-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Copy link
Member

@rata rata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! The logic now is simpler, I like that. But unsure it's correct, I think we need to handle an edge case differently.

Copy link
Member

@rata rata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rata rata merged commit 2db0c5e into opencontainers:main Mar 6, 2026
42 checks passed
@rata
Copy link
Member

rata commented Mar 6, 2026

@marquiz thanks for chiming in!

@cyphar cyphar deleted the intelrdt-improve-mkdir branch March 6, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants