From owner-freebsd-gnome@FreeBSD.ORG Thu Mar 13 13:59:41 2008 Return-Path: Delivered-To: freebsd-gnome@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 762901065677 for ; Thu, 13 Mar 2008 13:59:41 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from creme-brulee.marcuscom.com (marcuscom-pt.tunnel.tserv1.fmt.ipv6.he.net [IPv6:2001:470:1f00:ffff::1279]) by mx1.freebsd.org (Postfix) with ESMTP id 36F4B8FC39 for ; Thu, 13 Mar 2008 13:59:41 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from [IPv6:2001:470:1f00:2464::4] (shumai.marcuscom.com [IPv6:2001:470:1f00:2464::4]) by creme-brulee.marcuscom.com (8.14.2/8.14.2) with ESMTP id m2DE0uRW020597; Thu, 13 Mar 2008 10:00:58 -0400 (EDT) (envelope-from marcus@FreeBSD.org) From: Joe Marcus Clarke To: Andriy Gapon In-Reply-To: <47C7DC22.2080404@icyb.net.ua> References: <47C71B42.1010402@icyb.net.ua> <47C71C53.8030809@freebsd.org> <47C71D6F.3040701@icyb.net.ua> <47C71FEC.2000404@freebsd.org> <47C7DC22.2080404@icyb.net.ua> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-9ai7tgT7bU7bnwxdGAWr" Organization: FreeBSD, Inc. Date: Thu, 13 Mar 2008 09:59:45 -0400 Message-Id: <1205416785.14168.5.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 FreeBSD GNOME Team Port X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,MIME_QP_LONG_LINE, NO_RELAYS autolearn=no version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on creme-brulee.marcuscom.com Cc: freebsd-gnome@FreeBSD.org Subject: Re: hal vs. fat32 formatted dvd-ram X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 13:59:41 -0000 --=-9ai7tgT7bU7bnwxdGAWr Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2008-02-29 at 12:19 +0200, Andriy Gapon wrote: > on 28/02/2008 22:56 Joe Marcus Clarke said the following: > > Andriy Gapon wrote: > >> on 28/02/2008 22:40 Joe Marcus Clarke said the following: > >>> Andriy Gapon wrote: > >>>> Using a path described in the following PR I formatted complete DVD-= RAM > >>>> disk with FAT32: > >>>> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D121182 > >>>> > >>>> Now when I insert the disk hald tastes it for a very long time (much > >>>> longer that I've seen ever before) and in the end it can not detect = the > >>>> filesystem. > >>>> > >>>> lshal shows this "volume.disk" device, but nothing under it: > >>>> udi =3D '/org/freedesktop/Hal/devices/storage_model_DVDRAM_GSA_4163B= _block' > >>>> block.storage_device =3D > >>>> '/org/freedesktop/Hal/devices/storage_model_DVDRAM_GSA_4163B' (stri= ng) > >>>> info.product =3D 'Block Device' (string) > >>>> info.udi =3D > >>>> '/org/freedesktop/Hal/devices/storage_model_DVDRAM_GSA_4163B_block' > >>>> (string) > >>>> block.is_volume =3D false (bool) > >>>> volume.disc.capacity =3D 4580769792 (0x111090000) (uint64) > >>>> volume.disc.type =3D 'dvd_ram' (string) > >>>> volume.disc.is_rewritable =3D true (bool) > >>>> volume.disc.is_blank =3D false (bool) > >>>> volume.disc.is_appendable =3D false (bool) > >>>> volume.disc.is_videodvd =3D false (bool) > >>>> volume.disc.is_svcd =3D false (bool) > >>>> volume.disc.is_vcd =3D false (bool) > >>>> volume.disc.has_data =3D true (bool) > >>>> volume.disc.has_audio =3D false (bool) > >>>> block.minor =3D 94 (0x5e) (int) > >>>> block.major =3D 0 (0x0) (int) > >>>> block.device =3D '/dev/cd1' (string) > >>>> info.category =3D 'volume.disc' (string) > >>>> info.bus =3D 'block' (string) > >>>> info.capabilities =3D {'block', 'volume', 'volume.disc'} (string l= ist) > >>>> info.parent =3D > >>>> '/org/freedesktop/Hal/devices/storage_model_DVDRAM_GSA_4163B' (stri= ng) > >>>> > >>>> And: > >>>> $ file -s /dev/cd1 > >>>> /dev/cd1: x86 boot sector, code offset 0x58, OEM-ID "BSD 4.4", > >>>> Bytes/sector 2048, sectors/cluster 2, heads 255, sectors 2236704 > >>>> (volumes > 32 MB) , FAT (32 bit), sectors/FAT 2181, Backup boot sect= or > >>>> 2, serial number 0x7fbf1210, label: "SHUTTLE32 " > >>>> > >>>> I can provide any additional required debugging info. > >>> HAL will wait 60 seconds before it times out the volume probe helper.= =20 > >>> If it takes longer for the probe to determine the file system, then t= he=20 > >>> detection will fail. You can increase this in hald/freebsd/hf-volume= .c=20 > >>> by increasing the PROBE_VOLUME_TIMEOUT multiplier. The=20 > >>> HAL_HELPER_TIMEOUT is 10 seconds. > >> Thank you! I'll try that. But I actually still wonder what could take = so > >> long to recognize FAT32 fs. For example, cd9660 and udf on the same > >> media are recognized very fast, and fat32 on usb stick stick is > >> recognized very fast too. > >> So it seems that there might be something unexpected for hal in this > >> combo (dvd-ram+fat32). Maybe it's block size (2048), maybe something e= lse. > >=20 > > The way FreeBSD works, one cannot read from raw media using any block=20 > > size. You must use the actual block size on the media. With UDF and=20 > > ISO9660, this is not a problem. This might fail for FAT32 on DVD media= .=20 > > If you find that the probe runs to completion, and still doesn't=20 > > detect the correct file system, you can dig around in the libvolume_id=20 > > code and try to fix this problem. >=20 > I've tracked it down, it's not in libvolume_id, it's after it. > probe-volume.c: > if (has_data) > hf_probe_volume_advanced_disc_detect(fd); >=20 > hf_probe_volume_advanced_disc_detect essentially reads a disk sector by > sector starting at certain offset and searching for ISO FS specific magic= . > This definitely works for CD9660. > This perhaps/probably works for UDF. > This doesn't work for FAT32, the search goes on till the end of media > (which is a lot). > I think it is a mistake to assume that any CD/DVD media with data must > carry ISO FS. Especially DVD-RAM media. > I think that we should check vid->type (which should be available at the > moment) and call hf_probe_volume_advanced_disc_detect only for specific > filesystems. Does this work for you? That is, if the check above is changed to: if (has_data && vid && (! strcmp(vid->type, "iso9660") || ! strcmp(vid->type, "udf"))) Do you get your FAT volume properly probed as well as existing ISO CDs and UDF DVDs? Joe >=20 >=20 --=20 Joe Marcus Clarke FreeBSD GNOME Team :: gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome --=-9ai7tgT7bU7bnwxdGAWr Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEABECAAYFAkfZM1AACgkQb2iPiv4Uz4f7cACggGFVWudlOfkcSYAgAhdRSOpB uhgAoJ1Ov21U5ZyHAryGvl75Y8Xg6LoZ =wb6D -----END PGP SIGNATURE----- --=-9ai7tgT7bU7bnwxdGAWr--