[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/6] mirror: Skip writing zeroes when target is already zero
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [PATCH 3/6] mirror: Skip writing zeroes when target is already zero |
Date: |
Mon, 21 Apr 2025 09:15:33 +0300 |
User-agent: |
Mozilla Thunderbird |
On 17.04.25 00:51, Eric Blake wrote:
(a write zeroes that fails AND causes the disk to no longer read as
zero should not happen)
I don't know, is there such a contract? write-zeroes may fallback to write(),
which only state that:
An error return value while performing write() using direct I/O
does not mean the entire write has failed. Partial data may be
written and the data at the file offset on which the write() was
attempted should be considered inconsistent.
So, I used to think that on failed write nothing is guaranteed.
What do we lose if we just unset the bitmap before write-zeroes, and set it
again in case of success?
--
Best regards,
Vladimir