From: Petr Vorel <pvorel@suse.cz>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4]: tst_find_backing_dev(): add support for overlayfs
Date: Thu, 6 Mar 2025 19:06:31 +0100 [thread overview]
Message-ID: <20250306180631.GA214761@pevik> (raw)
In-Reply-To: <x491pvczdfd.fsf@segfault.usersys.redhat.com>
Hi Jeff, Cyril,
> Add checks for overlayfs in tst_find_backing_dev. As with btrfs, only
> a single device is checked (the upper one) and returned from
> tst_find_backing_dev().
> The implementation uses both /proc/self/mountinfo and /proc/self/mounts.
> The former is used to map a device to a mountpoint, and the latter is
> used to get the file system options for the mountpoint. All of the
> information is present in mountinfo, but the file format is more complex,
> and there are no glibc helpers for parsing it.
> The '#define _GNU_SOURCE' was added for the use of the strchrnul(3)
> function.
> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
> ---
> v4: Address review comments from Petr:
> - s/unsigned/unsigned int/
> - string formatting
> - code simplification: remove else block
> - use SAFE_STAT
> Address review comments from Cyril:
> - s/PATH_MAX/4096
> - string formatting fixes
> - use strcmp() instead of strncmp() to prevent false matching
> - don't re-implement strndup
LGTM. I leave where overlay_mount_from_dev() should be called up to Cyril.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-03-06 18:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 21:36 [LTP] [PATCH v4]: tst_find_backing_dev(): add support for overlayfs Jeff Moyer
2025-03-06 18:06 ` Petr Vorel [this message]
2025-03-18 12:15 ` Cyril Hrubis
2025-03-18 20:51 ` Petr Vorel
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=20250306180631.GA214761@pevik \
--to=pvorel@suse.cz \
--cc=jmoyer@redhat.com \
--cc=ltp@lists.linux.it \
/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.