:: Re: [DNG] vdev status update in dae…
トップ ページ
このメッセージを削除
このメッセージに返信
著者: aitor
日付:  
To: dng
題目: Re: [DNG] vdev status update in daedalus
Hi,

On 7/12/23 23:54, aitor wrote:
> There is a bug if the device is named as `sdf`. Partitions sdfN aren't listed by gvfs because, for some unknown reason,
> the file `properties` is missing in all the directories /dev/metadata/dev/sdfN. However, every device sdh, sdi... attached
> thereafter does appear in the list. The bug always occurs with the fifth attached device `sdf`.
>
> You can see the bug in the video linked below. On the left-hand edge of the video, thunar's volume manager. On the right,
> Didier's hopman that doesn't depend on gvfs/udisks. The latter lists the device sdf, but thunar does not. You can also see
> in the video the missing `properties` in /dev/metadata/dev/sdf*:
> http://packages.gnuinos.org/vdev/vdev_udisks.mkv
> As I announced some days ago, there is a vdev repo for devuan (recently updated):
>     debhttp://packages.gnuinos.org/vdev  daedalus main
> You can download the package `gnuinos-keyring` directly from packages.gnuinos.org. I recommend to test vdev with sysvinit.
> Runit requires some tweaks.
> Like final note, if you restore eudev you don't need to restore libeudev because libudev-compat should work for both vdev and eudev.

>
> Tested in a fresh install of devuan vanilla with sysvinit and xfce (netinst iso image). But, please..., be cautious :)


The origin of the bug was in the use of an asterisk in the regex `fd*` used in the helper `disk.sh` (line 57):

https://github.com/jcnelson/vdev/blob/master/vdevd/helpers/LINUX/disk.sh:

in order to skip inappropriate block devices.

The piece of code responsible for that is:

   # skip inappropriate block devices
   if [ -n "$(echo "$VDEV_PATH" | /bin/egrep "fd*|mtd*|nbd*|gnbd*|btibm*|dm-*|md*|zram*|mmcblk[0-9]*rpmb")" ]; then
      return 0
   fi

Indeed:

$ echo "sdf" | egrep "fd*"
sdf

Which syntax would you suggest for this purpose?

On the other hand, vdev packages have been updated including other bug fixes: I had to make a few changes in the code of the helper "stat_usb.c".
Depending on the disk type, udisksd didn't recognize some drive properties and therefore, the assertion G_DBUS_INTERFACE (interface_) failed.
As a result, such drives couldn't be powered off by udisksd. I addressed this issue renaming some variables from VDEV_USB_* to VDEV_*, except
for VDEV_USB_INTERFACES, VDEV_USB_INTERFACE_NUM, and VDEV_USB_DRIVER. The existence of VDEV_SERIAL is mandatory. Previously, it was called
VDEV_USB_SERIAL leading to a final ID_USB_SERIAL device property. But the property requested by dbus/udisksd was ID_SERIAL. Thus the glitch.

I think that all the known bugs related to gvfs and udisks2 have been entirely fixed so far. Hurray!

Cheers,

Aitor.