From: Nilay Shroff <nilay@linux.ibm.com>
To: John Garry <john.g.garry@oracle.com>,
shinichiro.kawasaki@wdc.com, linux-block@vger.kernel.org
Cc: hch@lst.de, linux-nvme@lists.infradead.org, dwagner@suse.de,
John Garry <john.garry@linux.dev>
Subject: Re: [PATCH v4] nvme/069: add a test for multipath cdev lifetime
Date: Fri, 17 Jul 2026 12:30:40 +0530 [thread overview]
Message-ID: <99842431-3ffa-412a-af57-e284888342a7@linux.ibm.com> (raw)
In-Reply-To: <ae3a2f44-b26d-4040-b9a4-cd6122dca29a@oracle.com>
On 7/16/26 10:06 PM, John Garry wrote:
> On 16/07/2026 16:16, Nilay Shroff wrote:
>>> + kill(getppid(), SIGUSR2);
>>> + count = 0;
>>> + for (;;) {
>>> + fd1 = open(argv[1], O_RDONLY);
>>> + usleep(500000);
>>> + if (fd1 < 0)
>>> + break;
>>
>> Does it make sense to check for errno set to ENODEV or ENOENT
>> before breaking out here?
>
> ehh, if the errno is not ENODEV or ENOENT, then how to handle? Would it to fail the test due to unexpected errno?
I think yes, something like below:
for (;;) {
fd1 = open(argv[1], O_RDONLY);
if (fd1 < 0) {
if (errno == EINTR)
continue;
if (errno == ENOENT || errno == ENODEV)
break;
perror("open");
return EINVAL;
}
close(fd1);
usleep(500000);
if (++count > 10) {
fprintf(stderr, "%s still present\n", argv[0]);
return EINVAL;
}
}
Thanks,
--Nilay
next prev parent reply other threads:[~2026-07-17 7:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 8:29 [PATCH v4] nvme/069: add a test for multipath cdev lifetime John Garry
2026-07-16 15:16 ` Nilay Shroff
2026-07-16 16:36 ` John Garry
2026-07-17 7:00 ` Nilay Shroff [this message]
2026-07-17 9:06 ` John Garry
2026-07-17 9:49 ` Nilay Shroff
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=99842431-3ffa-412a-af57-e284888342a7@linux.ibm.com \
--to=nilay@linux.ibm.com \
--cc=dwagner@suse.de \
--cc=hch@lst.de \
--cc=john.g.garry@oracle.com \
--cc=john.garry@linux.dev \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=shinichiro.kawasaki@wdc.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox