Fix SD info64 : info.usedBytes calculation giving weird result by luc-github · Pull Request #8445 · esp8266/Arduino

When I manually factor things I think this change is mathematically the same as the existing code.

info.usedBytes = info.totalBytes - (_fs.vol()->freeClusterCount() * _fs.vol()->bytesPerCluster());
info.totalBytes =_fs.vol()->clusterCount() * info.blockSize;
info.blockSize = _fs.vol()->bytesPerCluster();

So,

info.usedBytes = (_fs.vol()->clusterCount() * _fs.vol()->bytesPerCluster()) - (_fs.vol()->freeClusterCount() * _fs.vol()->bytesPerCluster());

Factor out the bpc and you get

info.usedBytes = (_fs.vol()->clusterCount() - _fs.vol()->freeClusterCount() ) * _fs.vol()->bytesPerCluster();

which is the patch's rewrite, no?