Re: Does data checksumming remain for files with No_COW file attribute?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2016-09-24 14:11, Christoph Anton Mitterer wrote:
On Sat, 2016-09-24 at 12:43 +0000, Hugo Mills wrote:
   It's because you can't update the data and the checksum atomically
-- at some point in the writing process, they must be inconsistent.
This is considered a Bad Thing.

It's not worse at all than simply not cheksuming... in both cases you
have no guarantee whether the data is bogus or not, but in with csums,
you can at least tell - only at the little cost, of false positives
when the data was fully and correctly written, but the csums not.
Except that without checksums, you don't lose all the data in that block when torn write happens, with checksums without COW, you do. Also, IIUC, due to how BTRFS implements checksums, you have a bad block for the entire duration of the write, because the stored checksum is for the old block, not the current one. Whether or not that matters is of course usage dependent, but it's still worth noting. Personally, I'd rather be able to read the file and see that it's corrupted instead of getting -EIO trying to do so (I also would rather we had something other than -EIO to return when checksum verification fails, but that's a separate issue).
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux