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: Christoph Hellwig <hch@infradead.org>
Date: 2017-10-16 11:44:57

On Fri, Oct 06, 2017 at 02:31:20PM +0200, Ilya Dryomov wrote:
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help