Set the FSUSAGE_(READ|WRITE) flags only we managed to get something. Currently, it doesn't seem to work on ZFS.
This commit is contained in:
committed by
Robert Roth
parent
e2348c24a0
commit
c7f7e5a1c6
@@ -132,8 +132,10 @@ _glibtop_get_fsusage_read_write (glibtop *server, glibtop_fsusage *buf, const ch
|
|||||||
buf->read = sfs.f_syncreads + sfs.f_asyncreads;
|
buf->read = sfs.f_syncreads + sfs.f_asyncreads;
|
||||||
buf->write = sfs.f_syncwrites + sfs.f_asyncwrites;
|
buf->write = sfs.f_syncwrites + sfs.f_asyncwrites;
|
||||||
#endif
|
#endif
|
||||||
|
if (buf->read || buf->write) {
|
||||||
buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
|
buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_get_fsusage_s(glibtop *server, glibtop_fsusage *buf, const char *path)
|
glibtop_get_fsusage_s(glibtop *server, glibtop_fsusage *buf, const char *path)
|
||||||
|
Reference in New Issue
Block a user