RFR: 8313674: java/nio/channels/FileChannel/BlockDeviceSize.java should test for more block devices [v2]

Inigo Mediavilla Saiz duke at openjdk.org
Wed May 1 20:10:56 UTC 2024


On Wed, 1 May 2024 16:22:16 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Inigo Mediavilla Saiz has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Replace getBlkPath method by Paths.get
>
> test/jdk/java/nio/channels/FileChannel/BlockDeviceSize.java line 43:
> 
>> 41: 
>> 42: public class BlockDeviceSize {
>> 43:     private static final List<String> BLK_FNAMES = List.of("/dev/sda1", "/dev/nvme0n1") ;
> 
> Is this list sufficient? Has any kind of survey been performed to determine whether anything else should be in the list?

The devices included are only the two most popular block devices in Linux. I'd tend to say that having those two should provide enough coverage, but I'm open to including others. 

For reference, this [link](https://github.com/brianmcgillion/udev/blob/master/rules/rules.d/60-persistent-storage.rules) gives an idea of the rules that udev uses to name devices. An example that I didn't consider and that appears in the udev rules is `/dev/mmcblk0`, a device that must be very popular in the raspberry pi community.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19021#discussion_r1586768905


More information about the nio-dev mailing list