From: Robin Dong <[email protected]> In disk mode, we don't need to calculate vnode info when current sheep is a pure gateway.
Signed-off-by: Robin Dong <[email protected]> --- sheep/md.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sheep/md.c b/sheep/md.c index e213ff6..694ec69 100644 --- a/sheep/md.c +++ b/sheep/md.c @@ -766,6 +766,10 @@ void update_node_disks(void) if (!sys) return; + /* Don't need to calculate vnodes for pure gateway */ + if (sys->this_node.nr_vnodes == 0) + return; + memset(sys->this_node.disks, 0, sizeof(struct disk_info) * DISK_MAX); sd_read_lock(&md.lock); rb_for_each_entry(disk, &md.root, rb) { -- 1.7.12.4 -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
