HDFS-7496 introduced reference-counting the volume instances being used to prevent race condition when hot swapping a volume.
However, FsDatasetSpi#getVolumes() can still leak the volume instance without increasing its reference count. In this JIRA, we retire the FsDatasetSpi#getVolumes() and propose FsDatasetSpi#getVolumeRefs() and etc. method to access FsVolume. Thus it makes sure that the consumer of FsVolume always has correct reference count.