Description
It would be possible to implement the fallocate(FALLOC_FL_ZERO_RANGE) option for Lustre. This would need the OST thread performing the operation to get PW extent locks (and possibly the PW lock on the MDT for DOM files) in order to ensure the client cache is flushed, since it is modifying the file's data.
For ldiskfs this would be passed down to the ldiskfs fallocate() call. I'm not sure whether ZFS supports zeroing blocks or not, but it could also be mapped to FALLOC_FL_PUNCH_HOLE on ZFS to provide functionally equivalent behavior (due to COW needing to allocate new blocks anyway).
.