Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mimic: rbd: krbd: return -ETIMEDOUT in polling #27588

Merged
merged 1 commit into from May 6, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -193,12 +193,17 @@ static int wait_for_udev_add(struct udev_monitor *mon, const char *pool,
for (;;) {
struct pollfd fds[1];
struct udev_device *dev;
int r;

fds[0].fd = udev_monitor_get_fd(mon);
fds[0].events = POLLIN;
if (poll(fds, 1, POLL_TIMEOUT) < 0)
r = poll(fds, 1, POLL_TIMEOUT);
if (r < 0)
return -errno;

if (r == 0)
return -ETIMEDOUT;

dev = udev_monitor_receive_device(mon);
if (!dev)
continue;
@@ -489,12 +494,17 @@ static int wait_for_udev_remove(struct udev_monitor *mon, dev_t devno)
for (;;) {
struct pollfd fds[1];
struct udev_device *dev;
int r;

fds[0].fd = udev_monitor_get_fd(mon);
fds[0].events = POLLIN;
if (poll(fds, 1, POLL_TIMEOUT) < 0)
r = poll(fds, 1, POLL_TIMEOUT);
if (r < 0)
return -errno;

if (r == 0)
return -ETIMEDOUT;

dev = udev_monitor_receive_device(mon);
if (!dev)
continue;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.