OSDN Git Service

sheepdog: remove huge BSS object
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 23 May 2018 16:07:21 +0000 (18:07 +0200)
committerJeff Cody <jcody@redhat.com>
Tue, 5 Jun 2018 14:15:12 +0000 (10:15 -0400)
commit68acc99f143b60ec4faa2903065b187d4d3c4bf3
tree3ca2960edfd6412cd61ee0b7ff4be7de34a115d4
parent03b036cc0ca3362ff1aacd70315f5e53f4234f5c
sheepdog: remove huge BSS object

block/sheepdog.o has a 4M static variable that is 90% of QEMU's whole .bss
section.  Replace it with a heap-allocated block, and make it smaller too
since only the inode header is actually being used.

bss size goes down from 4464280 to 269976.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20180523160721.14018-3-pbonzini@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
block/sheepdog.c