Paul Ripke writes:
>> #!/bin/sh
>>
>> dd if=/dev/zero of=VND bs=1m count=1
>> cat VND > VND.000
>> vnconfig vnd0 VND
>> cat VND > VND.001
>> newfs /dev/rvnd0a
>> cat VND > VND.002
>> vnconfig -u vnd0
>> cat VND > VND.003
>
> At least this DTRT:
>
> dd if=VND of=VND.004 iflag=direct
That (and th
On Sun, Oct 22, 2023 at 09:40:53AM -0400, Greg Troxel wrote:
> mlel...@serpens.de (Michael van Elst) writes:
>
> > g...@lexort.com (Greg Troxel) writes:
> >
> >>> vnd opens the backing file when the unit is created and closes
> >>> the backing file when the unit is destroyed. Then you can access
>
mlel...@serpens.de (Michael van Elst) writes:
> g...@lexort.com (Greg Troxel) writes:
>
>>> vnd opens the backing file when the unit is created and closes
>>> the backing file when the unit is destroyed. Then you can access
>>> the file again.
>
>>Is there a guarantee of cache consistency for writ
g...@lexort.com (Greg Troxel) writes:
>> vnd opens the backing file when the unit is created and closes
>> the backing file when the unit is destroyed. Then you can access
>> the file again.
>Is there a guarantee of cache consistency for writes before and reads
>after?
Before the unit is created
mlel...@serpens.de (Michael van Elst) writes:
> g...@lexort.com (Greg Troxel) writes:
>
>>I dimly knew this, but keep forgetting. Reading vndconfig(8), it does
>>not explain that the normal path leads to incorrect behavior (stale
>>reads from file cache even after closing the vnd, mtime).
>
> vnd
g...@lexort.com (Greg Troxel) writes:
>I dimly knew this, but keep forgetting. Reading vndconfig(8), it does
>not explain that the normal path leads to incorrect behavior (stale
>reads from file cache even after closing the vnd, mtime).
vnd opens the backing file when the unit is created and clo
mlel...@serpens.de (Michael van Elst) writes:
> vnd has an optimization where the backing file isn't touched, but
> the underlying device is accessed directly. Then file cache and
> device aren't in sync and a backup program reading the file might
> read stale data. vnd should probably update the
w...@netbsd.org (Thomas Klausner) writes:
>For a cgd in a file that I mount via vnd+cgd, the file system contents
>inside may change, but the actual file on the hard disk outside only
>has 'access' time changes. So "smart" backup programs that check
>timestamps to find out if they need to re-hash