All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 2/3] lib/tst_device.c: check for BTRFS_SUPER_MAGIC instead of device major of 0
Date: Wed, 12 Feb 2025 12:05:44 -0500	[thread overview]
Message-ID: <x49wmdvhz4n.fsf@segfault.usersys.redhat.com> (raw)
In-Reply-To: <20250211235232.GA1992438@pevik> (Petr Vorel's message of "Wed, 12 Feb 2025 00:52:32 +0100")

Hi, Petr,

Thanks a lot for the review.  I just have one question, below:

Petr Vorel <pvorel@suse.cz> writes:

>> @@ -595,8 +595,13 @@ void tst_find_backing_dev(const char *path, char *dev, size_t dev_size)
>>  	dev_minor = minor(buf.st_dev);
>>  	*dev = '\0';
>
>> -	if (dev_major == 0) {
>> +	if (statfs(path, &fsbuf) < 0)
>> +		tst_brkm(TWARN | TERRNO, NULL, "statfs() failed");
> Please use SAFE_STATFS() here.

SAFE_STATFS appears to be part of the new safe macros
(tst_safe_macros_inline.h), whereas tst_device.c includes the older
macros via #include "safe_macros.h".  How would you like me to proceed?
I could add a SAFE_STATFS to the old macros, or I could submit a prep
patch that converts tst_device to the new macros.  Or something else?

Thanks!
Jeff


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2025-02-12 17:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-11 21:42 [LTP] [PATCH v2 0/3] tst_device: add support for overlayfs Jeff Moyer
2025-02-11 21:42 ` [LTP] [PATCH v2 1/3] lib/tst_device.c: factor out btrfs-specific logic from tst_find_backing_dev Jeff Moyer
2025-02-11 23:52   ` Petr Vorel
2025-02-11 21:42 ` [LTP] [PATCH v2 2/3] lib/tst_device.c: check for BTRFS_SUPER_MAGIC instead of device major of 0 Jeff Moyer
2025-02-11 23:52   ` Petr Vorel
2025-02-12 17:05     ` Jeff Moyer [this message]
2025-02-12 20:10       ` Petr Vorel
2025-02-11 21:42 ` [LTP] [PATCH v2 3/3] tst_find_backing_dev(): add support for overlayfs Jeff Moyer
2025-02-12  0:19   ` 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=x49wmdvhz4n.fsf@segfault.usersys.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /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.