NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/57134: st_size of stat on vnd raw partition sometimes is 0, causing newfs to fail
The following reply was made to PR kern/57134; it has been noted by GNATS.
From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/57134: st_size of stat on vnd raw partition sometimes is 0, causing newfs to fail
Date: Mon, 2 Jan 2023 06:20:54 -0000 (UTC)
hannken%mailbox.org@localhost ("J. Hannken-Illjes") writes:
> This assumption is wrong for this sequence:
>
> fd = open("/dev/rvnd0",)
> ioctl(fd, VNDIOCSET,)
> fstat(fd, &sbuf)
>
> as the partition size changes AFTER open.
Yes, sad behaviour of vnd that it uses an uninitialized unit to create
a real unit. Makes lots of things difficult and you should better
not rely on this detail.
Home |
Main Index |
Thread Index |
Old Index