From: Pekka Enberg Subject: Re: [PATCH v3] kvm tools: Make raw block device work Date: Sun, 15 Apr 2012 19:01:25 +0300 (EEST) Message-ID: References: <1334274584-30640-1-git-send-email-asias.hejun@gmail.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Sasha Levin , Cyrill Gorcunov , Ingo Molnar , kvm@vger.kernel.org To: Asias He Return-path: Received: from mail-lb0-f174.google.com ([209.85.217.174]:36995 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754360Ab2DOQCF (ORCPT ); Sun, 15 Apr 2012 12:02:05 -0400 Received: by lbbgm6 with SMTP id gm6so3497579lbb.19 for ; Sun, 15 Apr 2012 09:02:03 -0700 (PDT) In-Reply-To: <1334274584-30640-1-git-send-email-asias.hejun@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 13 Apr 2012, 'Asias He wrote: > From: Asias He > > Previously, we use mmaped host root partition as guest's root > filesystem. As virtio-9p based root filesystem is supported, > mmaped host root partition approach is not used anymore. > > It is useful to use raw block device as guest's disk backend for some > user. e.g. bypass host's fs layer. > > This patch makes raw block device work as disk image, user can do > read/write on raw block device, by using DISK_IMAGE_REGULAR instead of > DISK_IMAGE_MMAP for block device > > Changes in v3: > - Add fclose. > > Changes in v2: > - Check whether the block device is mounted before use it. > > Signed-off-by: Asias He Applied, thanks!