EC statvfs should return minimum total inodes in the disperse group in statfs output
ec_statvfs_combine(struct statvfs *dst, struct statvfs *src)
{
...
if (dst->f_files < src->f_files) {
dst->f_files = src->f_files;
}
if (dst->f_ffree > src->f_ffree) {
dst->f_ffree = src->f_ffree;
}
if (dst->f_favail > src->f_favail) {
dst->f_favail = src->f_favail;
}
...
In one disperse/ec group, max(available nodes) is taken as total inodes and min(free inodes) is taken as free inodes It makes more sense to do min in both cases as per my understanding. @xhernandez What do you think?
I think the correct solution is to consider it only for the bricks that are not undergoing heal, but one can create a situation where heals are happening on all the bricks, so in a steady state at least this should be min() for both total and free inodes.
ec_statvfs_combine(struct statvfs *dst, struct statvfs *src) { ... if (dst->f_files < src->f_files) { dst->f_files = src->f_files; } if (dst->f_ffree > src->f_ffree) { dst->f_ffree = src->f_ffree; } if (dst->f_favail > src->f_favail) { dst->f_favail = src->f_favail; } ...In one disperse/ec group, max(available nodes) is taken as total inodes and min(free inodes) is taken as free inodes It makes more sense to do min in both cases as per my understanding. @xhernandez What do you think?
Yes. It seems better.