[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for
From: |
Christoph Hellwig |
Subject: |
Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations |
Date: |
Tue, 27 Mar 2012 11:08:13 +0200 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
On Mon, Mar 26, 2012 at 02:40:47PM -0500, Richard Laager wrote:
> On Sat, 2012-03-24 at 16:27 +0100, Christoph Hellwig wrote:
> > > has_discard = !fallocate(s->fd, FALLOC_FL_PUNCH_HOLE |
> > > FALLOC_FL_KEEP_SIZE,
> >
> > There is no point in using FALLOC_FL_KEEP_SIZE together with
> > FALLOC_FL_PUNCH_HOLE.
>
> It's *required*. From the man page [0], "The FALLOC_FL_PUNCH_HOLE flag
> must be ORed with FALLOC_FL_KEEP_SIZE in mode;"
>
> [0] http://man7.org/linux/man-pages/man2/fallocate.2.html
You're right - we check that it is set in common code before entering the
filesystem.
It's utterly pointless, but too late to change now - I should have reviewed
the patch to add it better.
- Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations, (continued)
- Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations, Richard Laager, 2012/03/26
- Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations, Christoph Hellwig, 2012/03/24
- Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations, Daniel P. Berrange, 2012/03/26
- Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations, Christoph Hellwig, 2012/03/26
- Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations, Richard Laager, 2012/03/14
- Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations, Paolo Bonzini, 2012/03/15
- Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations, Richard Laager, 2012/03/15
- Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations, Paolo Bonzini, 2012/03/16
- Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations, Christoph Hellwig, 2012/03/24
- Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations, Richard Laager, 2012/03/26
- Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations,
Christoph Hellwig <=
[Qemu-devel] [RFC PATCH 04/17] qed: implement bdrv_aio_discard, Paolo Bonzini, 2012/03/08
[Qemu-devel] [RFC PATCH 10/17] ide/scsi: add discard_zeroes_data property, Paolo Bonzini, 2012/03/08
[Qemu-devel] [RFC PATCH 09/17] ide: issue discard asynchronously but serialize the pieces, Paolo Bonzini, 2012/03/08
[Qemu-devel] [RFC PATCH 05/17] block: pass around qiov for write_zeroes operation, Paolo Bonzini, 2012/03/08
[Qemu-devel] [RFC PATCH 12/17] ide/scsi: turn on discard, Paolo Bonzini, 2012/03/08