qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Haozhong Zhang <haozhong.zhang@intel.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 0/3] hostmem-file: make option 'size' optional
Date: Mon, 7 Nov 2016 15:56:08 +0800	[thread overview]
Message-ID: <20161107075608.izcyrx6y6weyv3eu@hz-desktop> (raw)
In-Reply-To: <87a8db20c0.fsf@dusky.pond.sub.org>

On 11/07/16 08:52 +0100, Markus Armbruster wrote:
>Haozhong Zhang <haozhong.zhang@intel.com> writes:
>
>> This patch series is mostly the followup of patch 3 in
>> "[PATCH v2 0/3] Improve truncation behavior of memory-backend-file" [1][2].
>>
>> For certain usages of memory-backend-file, users simply want to use
>> the entire backend file (specified by the "mem-path" option). Therefore,
>> it's not necessary in such cases to specify the file size via the
>> "size" option. This patch series makes the "size" option of
>> memory-backend-file optional. In detail,
>>
>> 1. if the size of the backend file is not zero and the "size" option
>>    is not present, QEMU will use the file size as the "size" option;
>>
>> 2. if the backend file is a non-existing file, an empty file, or a
>>    directory, the "size" option is still needed;
>>
>> 3. the "size" option is also needed in cases that QEMU fails to the
>>    backend file size.
>
>"fails to the backend file size": are you missing a verb?
>

Yes, it should be "fails to _get_ the backend file size".

Thanks,
Haozhong

>> Patch 1 is not quite relevant. It adds missing comments on errors
>> of get_file_size() per Eduardo's suggestion.
>>
>> Patch 2 moves the file operations from file_ram_alloc() to
>> qemu_ram_alloc_from_file(), so that all checks on the file size and
>> the "size" option, and the related operations on ram block length can
>> be put in qemu_ram_alloc_from_file() and no duplication is needed.
>>
>> Patch 3 actually implements the logic to make the option "size" optional.
>>
>> [1] https://lists.nongnu.org/archive/html/qemu-devel/2016-10/msg06823.html
>> [2] https://lists.nongnu.org/archive/html/qemu-devel/2016-11/msg00251.html
>>
>> Haozhong Zhang (3):
>>   exec.c: add comment for errors of get_file_size()
>>   exec.c: move file operations to qemu_ram_alloc_from_file()
>>   hostmem-file: make option 'size' optional
>>
>>  backends/hostmem-file.c |  28 ++++--
>>  exec.c                  | 242 ++++++++++++++++++++++++++++++------------------
>>  2 files changed, 170 insertions(+), 100 deletions(-)

      reply	other threads:[~2016-11-07  7:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07  5:08 [Qemu-devel] [PATCH 0/3] hostmem-file: make option 'size' optional Haozhong Zhang
2016-11-07  5:08 ` [Qemu-devel] [PATCH 1/3] exec.c: add comment for errors of get_file_size() Haozhong Zhang
2016-11-07  5:08 ` [Qemu-devel] [PATCH 2/3] exec.c: move file operations to qemu_ram_alloc_from_file() Haozhong Zhang
2016-11-07  5:08 ` [Qemu-devel] [PATCH 3/3] hostmem-file: make option 'size' optional Haozhong Zhang
2016-11-07  7:52 ` [Qemu-devel] [PATCH 0/3] " Markus Armbruster
2016-11-07  7:56   ` Haozhong Zhang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161107075608.izcyrx6y6weyv3eu@hz-desktop \
    --to=haozhong.zhang@intel.com \
    --cc=armbru@redhat.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).