From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPx2b-0002Fw-8r for qemu-devel@nongnu.org; Thu, 22 Jan 2009 05:44:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPx2X-0002Dg-BH for qemu-devel@nongnu.org; Thu, 22 Jan 2009 05:44:02 -0500 Received: from [199.232.76.173] (port=37241 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPx2W-0002DY-US for qemu-devel@nongnu.org; Thu, 22 Jan 2009 05:44:01 -0500 Received: from mx2.redhat.com ([66.187.237.31]:58654) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPx2W-0000p9-Fj for qemu-devel@nongnu.org; Thu, 22 Jan 2009 05:44:00 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n0MAhxaL014796 for ; Thu, 22 Jan 2009 05:43:59 -0500 From: Uri Lublin Date: Thu, 22 Jan 2009 12:43:50 +0200 Message-Id: <1232621035-4951-1-git-send-email-uril@redhat.com> Subject: [Qemu-devel] [PATCH 0/5 v2] qcow2 info: show highest-allocation and num-free-bytes Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Uri Lublin Hello, The following 5 enhance "info blockstats" for qcow2 images (and other formats that implement bdrv_get_info), to show higest-allocated-offset and number-of-free-bytes (below the higest-allocated-offset) of the image. One of the main usage for this information is to know and act upon a case of end-of-storage-space. Instead of waiting for -ENOSPACE (which now may cause the VM to stop), one can define a threshold and extend the diskspace allocated for the image. This info is also good for management systems, so they can report the user disk space status. Also with highest_alloc and num_free_bytes, we can have a pretty good idea about how fragmented a qcow2 images is, and try to defragment it later. Patches 1,2,3, Provides information about the highest allocated byte (offset) Patch 4, Provides information about the number of free bytes below highest_alloc. Patch 5, Provides info about highest_alloc and num_free_bytes through qemu-img info Changes from v1: better description of use cases. Regards, Uri.