From owner-freebsd-gnome@FreeBSD.ORG Tue Aug 25 18:30:15 2009 Return-Path: Delivered-To: gnome@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25F971065698 for ; Tue, 25 Aug 2009 18:30:15 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 194FF8FC30 for ; Tue, 25 Aug 2009 18:30:13 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id VAA09375 for ; Tue, 25 Aug 2009 21:30:12 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4A942DB4.8020408@icyb.net.ua> Date: Tue, 25 Aug 2009 21:30:12 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.22 (X11/20090724) MIME-Version: 1.0 To: gnome@FreeBSD.org X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: libvolume_id: narrow down ufs detection 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: Tue, 25 Aug 2009 18:30:15 -0000 I think that libvolume_id should compare fs size to provider size similarly to what geom_label does and for the same reasons. With geom providers stacked upon each other current libvolume_id may see the same fs on multiple volume-like devices. An example: o ad6s1a and ad10s1a comprise a geom_mirror named 'bootgm' o there is a UFS on bootgm and it is labeled as 'bootfs' Snippets from lshal output: ======================= udi = '/org/freedesktop/Hal/devices/volume_label_bootfs_0' block.device = '/dev/ad6s1a' (string) block.is_volume = true (bool) block.major = 0 (0x0) (int) block.minor = 92 (0x5c) (int) block.storage_device = '/org/freedesktop/Hal/devices/pci_8086_2922_storage_0' (string) info.capabilities = {'block', 'volume'} (string list) info.category = 'volume' (string) info.interfaces = {'org.freedesktop.Hal.Device.Volume'} (string list) info.parent = '/org/freedesktop/Hal/devices/volume_part2_size_6440361984_0' (string) info.product = 'bootfs' (string) info.subsystem = 'block' (string) info.udi = '/org/freedesktop/Hal/devices/volume_label_bootfs_0' (string) org.freedesktop.Hal.Device.Volume.method_argnames = {'mount_point fstype extra_options', 'extra_options', 'extra_options'} (string list) org.freedesktop.Hal.Device.Volume.method_execpaths = {'hal-storage-mount', 'hal-storage-unmount', 'hal-storage-eject'} (string list) org.freedesktop.Hal.Device.Volume.method_names = {'Mount', 'Unmount', 'Eject'} (string list) org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'} (string list) volume.block_size = 512 (0x200) (uint64) volume.fstype = 'ufs' (string) volume.fsusage = 'filesystem' (string) volume.fsversion = '2' (string) volume.ignore = false (bool) volume.is_disc = false (bool) volume.is_mounted = false (bool) volume.is_mounted_read_only = false (bool) volume.is_partition = false (bool) volume.label = 'bootfs' (string) volume.mount.valid_options = {'ro', 'noexec', 'noatime'} (string list) volume.mount_point = '' (string) volume.num_blocks = 4194304 (0x400000) (uint64) volume.size = 2147483648 (0x80000000) (uint64) volume.uuid = '' (string) =============================== udi = '/org/freedesktop/Hal/devices/volume_label_bootfs' block.device = '/dev/ufs/bootfs' (string) block.is_volume = true (bool) block.major = 0 (0x0) (int) block.minor = 112 (0x70) (int) block.storage_device = '/org/freedesktop/Hal/devices/pci_8086_2922_storage' (string) info.capabilities = {'block', 'volume'} (string list) info.category = 'volume' (string) info.interfaces = {'org.freedesktop.Hal.Device.Volume'} (string list) info.parent = '/org/freedesktop/Hal/devices/volume_size_2147483136' (string) info.product = 'bootfs' (string) info.subsystem = 'block' (string) info.udi = '/org/freedesktop/Hal/devices/volume_label_bootfs' (string) org.freedesktop.Hal.Device.Volume.method_argnames = {'mount_point fstype extra_options', 'extra_options', 'extra_options'} (string list) org.freedesktop.Hal.Device.Volume.method_execpaths = {'hal-storage-mount', 'hal-storage-unmount', 'hal-storage-eject'} (string list) org.freedesktop.Hal.Device.Volume.method_names = {'Mount', 'Unmount', 'Eject'} (string list) org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'} (string list) volume.block_size = 512 (0x200) (uint64) volume.fstype = 'ufs' (string) volume.fsusage = 'filesystem' (string) volume.fsversion = '2' (string) volume.ignore = false (bool) volume.is_disc = false (bool) volume.is_mounted = true (bool) volume.is_mounted_read_only = false (bool) volume.is_partition = false (bool) volume.label = 'bootfs' (string) volume.mount.valid_options = {'ro', 'noexec', 'noatime'} (string list) volume.mount_point = '/.bootdir' (string) volume.num_blocks = 4194303 (0x3fffff) (uint64) volume.size = 2147483136 (0x7ffffe00) (uint64) volume.uuid = '' (string) ============================= I think that UFS on the first volume should not be reported. -- Andriy Gapon