[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH for-3.0] file-posix: Fix write_zero
From: |
Nir Soffer |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices |
Date: |
Thu, 26 Jul 2018 19:54:19 +0300 |
On Thu, Jul 26, 2018 at 7:41 PM Kevin Wolf <address@hidden> wrote:
...
> > > +#ifdef CONFIG_FALLOCATE_PUNCH_HOLE
> > > + ret = do_fallocate(s->fd, FALLOC_FL_PUNCH_HOLE |
> FALLOC_FL_KEEP_SIZE,
> > > + aiocb->aio_offset, aiocb->aio_nbytes);
> > > + if (ret != -ENOTSUP) {
> > >
> >
> > This fails with ENODEV on RHEL 7.5 when fd is a block device.
> >
> > The manual says:
> >
> > ENODEV fd does not refer to a regular file or a directory. (If fd
> > is a pipe or FIFO, a different error results.)
>
> do_fallocate() is a wrapper around fallocate() that handles EINTR and
> translates a few errno values (including ENODEV) into a -ENOTSUP return
> code.
>
I missed that, so this looks correct.
Nir
- Re: [Qemu-devel] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices, (continued)
- Re: [Qemu-devel] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices, Kevin Wolf, 2018/07/26
- Re: [Qemu-devel] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices, Eric Blake, 2018/07/26
- Re: [Qemu-devel] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices, Nir Soffer, 2018/07/26
- Re: [Qemu-devel] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices, Kevin Wolf, 2018/07/26
- Re: [Qemu-devel] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices, Nir Soffer, 2018/07/26
- Re: [Qemu-devel] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices, Eric Blake, 2018/07/26
- Re: [Qemu-devel] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices, Kevin Wolf, 2018/07/26
- Re: [Qemu-devel] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices, Eric Blake, 2018/07/26
Re: [Qemu-devel] [Qemu-block] [PATCH for-3.0] file-posix: Fix write_zeroes with unmap on block devices, Nir Soffer, 2018/07/26