Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-04 Thread Richard W.M. Jones
On Thu, Sep 04, 2014 at 05:23:21PM +0200, Kevin Wolf wrote: > The definition of "besteffort" depends on what you want to achieve. It > is policy, and we generally try to keep policy out of qemu. I think qemu *should* have a policy of make it work and don't fail - first - and then offer a million k

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-04 Thread Kevin Wolf
Am 04.09.2014 um 15:43 hat Richard W.M. Jones geschrieben: > On Thu, Sep 04, 2014 at 03:17:51PM +0200, Kevin Wolf wrote: > > Am 04.09.2014 um 15:07 hat Richard W.M. Jones geschrieben: > > > On Thu, Sep 04, 2014 at 02:52:57PM +0200, Kevin Wolf wrote: > > > > Am 04.09.2014 um 14:45 hat Richard W.M. J

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-04 Thread Richard W.M. Jones
On Thu, Sep 04, 2014 at 03:17:51PM +0200, Kevin Wolf wrote: > Am 04.09.2014 um 15:07 hat Richard W.M. Jones geschrieben: > > On Thu, Sep 04, 2014 at 02:52:57PM +0200, Kevin Wolf wrote: > > > Am 04.09.2014 um 14:45 hat Richard W.M. Jones geschrieben: > > > > On Thu, Sep 04, 2014 at 02:35:22PM +0200,

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-04 Thread Kevin Wolf
Am 04.09.2014 um 15:07 hat Richard W.M. Jones geschrieben: > On Thu, Sep 04, 2014 at 02:52:57PM +0200, Kevin Wolf wrote: > > Am 04.09.2014 um 14:45 hat Richard W.M. Jones geschrieben: > > > On Thu, Sep 04, 2014 at 02:35:22PM +0200, Kevin Wolf wrote: > > > > Please change the code to always write ze

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-04 Thread Daniel P. Berrange
On Thu, Sep 04, 2014 at 02:07:14PM +0100, Richard W.M. Jones wrote: > On Thu, Sep 04, 2014 at 02:52:57PM +0200, Kevin Wolf wrote: > > Am 04.09.2014 um 14:45 hat Richard W.M. Jones geschrieben: > > > On Thu, Sep 04, 2014 at 02:35:22PM +0200, Kevin Wolf wrote: > > > > Please change the code to always

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-04 Thread Richard W.M. Jones
On Thu, Sep 04, 2014 at 02:52:57PM +0200, Kevin Wolf wrote: > Am 04.09.2014 um 14:45 hat Richard W.M. Jones geschrieben: > > On Thu, Sep 04, 2014 at 02:35:22PM +0200, Kevin Wolf wrote: > > > Please change the code to always write zeros for FULL, > > > > How is this useful for anyone? You don't kn

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-04 Thread Kevin Wolf
Am 04.09.2014 um 14:45 hat Richard W.M. Jones geschrieben: > On Thu, Sep 04, 2014 at 02:35:22PM +0200, Kevin Wolf wrote: > > Please change the code to always write zeros for FULL, > > How is this useful for anyone? You don't know if the underlying SAN > is going to detect these zeroes or combine

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-04 Thread Richard W.M. Jones
On Thu, Sep 04, 2014 at 02:35:22PM +0200, Kevin Wolf wrote: > Please change the code to always write zeros for FULL, How is this useful for anyone? You don't know if the underlying SAN is going to detect these zeroes or combine these blocks together. It's just slow for no reason. Rich. -- Rich

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-04 Thread Kevin Wolf
Am 29.08.2014 um 10:33 hat Hu Tao geschrieben: > This patch adds a new option preallocation for raw format, and implements > full preallocation. > > Signed-off-by: Hu Tao v12 was better, it wasn't doing only metadata preallocation when you told it to do full preallocation. > +if (prealloc =

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-04 Thread Hu Tao
On Fri, Aug 29, 2014 at 09:48:01AM +0100, Richard W.M. Jones wrote: > On Fri, Aug 29, 2014 at 04:33:12PM +0800, Hu Tao wrote: > > +if (prealloc == PREALLOC_MODE_FULL) { > > +/* posix_fallocate() doesn't set errno. */ > > +result = -posix_fallocate(fd, 0, total_size); > > +

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-02 Thread Hu Tao
On Tue, Sep 02, 2014 at 11:45:38PM +0200, Max Reitz wrote: > On 29.08.2014 10:33, Hu Tao wrote: > >This patch adds a new option preallocation for raw format, and implements > >full preallocation. > > > >Signed-off-by: Hu Tao > >--- > > block/raw-posix.c | 92 > > +

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-02 Thread Hu Tao
On Fri, Aug 29, 2014 at 09:48:01AM +0100, Richard W.M. Jones wrote: > On Fri, Aug 29, 2014 at 04:33:12PM +0800, Hu Tao wrote: > > +if (prealloc == PREALLOC_MODE_FULL) { > > +/* posix_fallocate() doesn't set errno. */ > > +result = -posix_fallocate(fd, 0, total_size); > > +

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-02 Thread Max Reitz
On 29.08.2014 10:33, Hu Tao wrote: This patch adds a new option preallocation for raw format, and implements full preallocation. Signed-off-by: Hu Tao --- block/raw-posix.c | 92 +++ qemu-doc.texi | 8 + qemu-img.texi | 8 +++

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-08-29 Thread Richard W.M. Jones
On Fri, Aug 29, 2014 at 04:33:12PM +0800, Hu Tao wrote: > +if (prealloc == PREALLOC_MODE_FULL) { > +/* posix_fallocate() doesn't set errno. */ > +result = -posix_fallocate(fd, 0, total_size); > +if (result != 0) { Is it better to test: result != ENOSYS && result != E

[Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-08-29 Thread Hu Tao
This patch adds a new option preallocation for raw format, and implements full preallocation. Signed-off-by: Hu Tao --- block/raw-posix.c | 92 +++ qemu-doc.texi | 8 + qemu-img.texi | 8 + 3 files changed, 88 insertions(+), 2