From: "Michal Koutný" <mkoutny@suse.com>
To: netdev@vger.kernel.org
Cc: mkoutny@suse.com, mkubecek@suse.cz,
Davide Benini <davide.benini@suse.com>,
Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v2 1/2] ss: Tone down cgroup path resolution
Date: Fri, 21 Feb 2025 10:29:26 +0100 [thread overview]
Message-ID: <20250221092927.701552-2-mkoutny@suse.com> (raw)
In-Reply-To: <20250221092927.701552-1-mkoutny@suse.com>
Sockets and cgroups have different lifetimes (e.g. fd passing between
cgroups) so obtaining a cgroup id to a removed cgroup dir is not an
error. Furthermore, the message is printed for each such a socket (which
is redundant each such socket's cgroup is shown as 'unreachable').
Improve user experience by silencing these specific errors.
Signed-off-by: Michal Koutný <mkoutny@suse.com>
---
lib/fs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/fs.c b/lib/fs.c
index 622f28b3..6fe1d6db 100644
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -223,7 +223,8 @@ char *get_cgroup2_path(__u64 id, bool full)
fd = open_by_handle_at(mnt_fd, fhp, 0);
if (fd < 0) {
- fprintf(stderr, "Failed to open cgroup2 by ID\n");
+ if (errno != ESTALE)
+ fprintf(stderr, "Failed to open cgroup2 by ID\n");
goto out;
}
--
2.48.1
next prev parent reply other threads:[~2025-02-21 9:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 9:29 [PATCH v2 0/2] ss: Tone down cgroup path resolution Michal Koutný
2025-02-21 9:29 ` Michal Koutný [this message]
2025-02-21 9:29 ` [PATCH v2 2/2] README.devel: clarify patch rules Michal Koutný
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250221092927.701552-2-mkoutny@suse.com \
--to=mkoutny@suse.com \
--cc=davide.benini@suse.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.