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: "J. Hannken-Illjes" <hannken%mailbox.org@localhost>
To: NetBSD GNATS <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: Sun, 1 Jan 2023 19:50:12 +0100

 > On 1. Jan 2023, at 19:45, Michael van Elst <mlelstv%serpens.de@localhost> wrote:
 > 
 > The disk or partition size is defined by the disklabel, and that
 > isn't expected to change while the device is open. That is probably
 > also the reason to fetch the size on open, only then does the device
 > know about the label.
 
 This assumption is wrong for this sequence:
 
 fd = open("/dev/rvnd0",)
 ioctl(fd, VNDIOCSET,)
 fstat(fd, &sbuf)
 
 as the partition size changes AFTER open.
 
 --
 J. Hannken-Illjes - hannken%mailbox.org@localhost
 


Home | Main Index | Thread Index | Old Index