Thread (11 messages) 11 messages, 2 authors, 2017-10-16

Re: [PATCH v2 2/2] block: cope with WRITE ZEROES failing in blkdev_issue_zeroout()

From: Ilya Dryomov <idryomov@gmail.com>
Date: 2017-10-16 14:03:05

On Mon, Oct 16, 2017 at 1:44 PM, Christoph Hellwig [off-list ref] wrote:
On Fri, Oct 06, 2017 at 02:31:20PM +0200, Ilya Dryomov wrote:
quoted
This would unconditionally overwrite any WRITE ZEROS error.  If we get
e.g. -EIO, and manual zeroing is not allowed, I don't think we want to
return -EOPNOTSUPP?

Returning -EOPNOTSUPP to mean "can't zero using either method" doesn't
make sense to me, because manual zeroing is always supported, just not
always allowed.
Then thow the throw bdev_write_zeroes_sectors check back in:

        if (ret && try_write_zeroes) {
                if (!(flags & BLKDEV_ZERO_NOFALLBACK))
                        try_write_zeroes = false;
                        goto retry;
                }
                if (!bdev_write_zeroes_sectors(bdev))
                        ret = -EOPNOTSUPP;
        }

The important bit is that the structure in the current patch where the
bdev_write_zeroes_sectors check is on the same level as the method
selection is extremely confusing.
I see.  An updated version should be in your inbox.

Thanks,

                Ilya
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help