Skip to content

Commit

Permalink
allow polling single-device md devices (DataDog#488)
Browse files Browse the repository at this point in the history
Linux is weird. LVM devices can present themselves as md devices with a
single underlying device. That device may be polled (but ones with
more than a single underlying device can't). Right now, if a
device is md, we opt out of polling entirely, even though polling is
allowed under that edge-case.

This commit changes the logic to disable polling only if an md device
has more than a single device underneath it.
  • Loading branch information
HippoBaro authored Dec 28, 2021
1 parent 5c483ee commit 16d9166
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glommio/src/sys/sysfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl BlockDevice {
}

pub(crate) fn is_md(major: usize, minor: usize) -> bool {
!block_property!(DEV_MAP, subcomponents, major, minor).is_empty()
block_property!(DEV_MAP, subcomponents, major, minor).len() > 1
}
}

Expand Down

0 comments on commit 16d9166

Please sign in to comment.