- 
                Notifications
    
You must be signed in to change notification settings  - Fork 159
 
Open
Description
The U disk is formatted into multiple btrfs file system partitions. When the U disk is directly pulled out, only one btrfs file system partition can be unmounted.
The reason for this problem is:
When the U disk is pulled out, udisks_state_check_mounted_fs_entry() will unmount the first btrfs partition first. Then mounts_changed_event() is triggered. Causes the udisks_state_check_mounted_fs_entry function to be called and UDisksMountMonitor *monitor to be updated. The remaining btrfs partitions will enter the udisks_mount_monitor_parse_mountinfo() function when unmounted, namely:
if (major == 0)
        {
……
              if (stat (mount_source, &statbuf) != 0)
                {
                  udisks_warning ("Error statting %s: %m", mount_source);
                  continue;
                }
              if (!S_ISBLK (statbuf.st_mode))
                {
                  udisks_warning ("%s is not a block device", mount_source);
                  continue;
                }
              dev = statbuf.st_rdev;
            }
Since the U disk has been pulled out, "stat (mount_source, &statbuf)" cannot obtain the device file information, so an exception occurs.
Metadata
Metadata
Assignees
Labels
No labels