[OpenIndiana-discuss] zfs question - when can _rewriting_ a block of a file fail on out-of-space?
Richard L. Hamilton
rlhamil at smart.net
Sat Jun 2 05:45:05 UTC 2012
In a non-COW filesystem, one would expect that rewriting an already allocated block would never fail for out-of-space (ENOSPC).
But I would expect that it could on ZFS - definitely if there was a snapshot around, as it would create a divergence from that snapshot (because both blocks would be kept). Or if deduplication was in effect, and the new block contents were unique when the old contents hadn't been unique.
Could rewriting a block _ever_ fail with ENOSPC if there _wasn't_ a snapshot present, or is the replace old block with new somehow guaranteed to succeed, so as to avoid introducing unexpected semantics? (say maybe there's a reserved amount of free space just for rewrites to avoid that sort of problem, or some other magic)
I would think DBMS developers allowing databases to be stored on ZFS, as well as folks using mmap(), might particularly want to be aware of the cases in which an errno not anticipated from experience with other filesystems might arise.
More information about the OpenIndiana-discuss
mailing list