NetBSD Problem Report #45512

From  Sat Oct 22 22:45:58 2011
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id D5B1163D521
	for <>; Sat, 22 Oct 2011 22:45:57 +0000 (UTC)
Message-Id: <>
Date: Sat, 22 Oct 2011 22:45:57 +0000 (UTC)
Subject: net/aoe-vblade is unable to use block devices
X-Send-Pr-Version: www-1.0

>Number:         45512
>Category:       pkg
>Synopsis:       net/aoe-vblade is unable to use block devices
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 22 22:50:00 +0000 2011
>Originator:     Mihkel Ader
>Release:        NetBSD-current
NetBSD ubin 5.99.56 NetBSD 5.99.56 (MYGENERIC) #0: Thu Oct 20 19:07:41 UTC 2011  root@ubin:/usr/src/sys/arch/macppc/compile/MYGENERIC macppc

When trying to serve a block device using vblade(d), the disk size is reported as 0 and the AoE device cannot be used. Also, larger devices cause the disk size calculation to overflow.

The errors have also been reported to the aoetools-discuss mailing list
vblade 0 0 gem0 /dev/wd0c
There's a (de)referencing error in the freebsd.c file. The easiest fix is to write the ioctl call as "ioctl(fd, DIOCGDINFO, &lab)" instead of "ioctl(fd, DIOCGDINFO, lab)"

In the same file, we need a cast to prevent an overflow:
"size = (vlong)lab.d_secsize * lab.d_secperunit"

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.