Detect busy status of mdadm started ATARAID members (#75)

This stops GParted allowing overwrite operations (such as create
partition table or format with a whole device file system) being
performed on an ATARAID member while the array is actively using the
member.

Closes #75 - Errors with GPT on RAID 0 ATARAID array
This commit is contained in:
Mike Fleetwood 2019-11-17 19:16:41 +00:00 committed by Curtis Gedak
parent ef6794b7de
commit 6e990ea48a
2 changed files with 6 additions and 3 deletions

View File

@ -327,6 +327,7 @@ void Dialog_Partition_Info::Display_Info()
}
else if ( filesystem_ptn.filesystem == FS_LINUX_SWAP ||
filesystem_ptn.filesystem == FS_LINUX_SWRAID ||
filesystem_ptn.filesystem == FS_ATARAID ||
filesystem_ptn.filesystem == FS_LVM2_PV )
{
/* TO TRANSLATORS: Active
@ -360,7 +361,8 @@ void Dialog_Partition_Info::Display_Info()
str_temp = _("Not busy (There are no mounted logical partitions)") ;
}
else if ( filesystem_ptn.filesystem == FS_LINUX_SWAP ||
filesystem_ptn.filesystem == FS_LINUX_SWRAID )
filesystem_ptn.filesystem == FS_LINUX_SWRAID ||
filesystem_ptn.filesystem == FS_ATARAID )
{
/* TO TRANSLATORS: Not active
* means that this linux swap or linux software raid partition

View File

@ -1522,8 +1522,9 @@ bool GParted_Core::is_busy( FSType fstype, const Glib::ustring & path )
// unknown file system is mounted
busy = Mount_Info::is_dev_mounted( path );
//Custom checks for recognised but other not-supported file system types
busy |= ( fstype == FS_LINUX_SWRAID && SWRaid_Info::is_member_active( path ) );
// Custom checks for recognised but other not-supported file system types.
busy |= (fstype == FS_LINUX_SWRAID && SWRaid_Info::is_member_active(path));
busy |= (fstype == FS_ATARAID && SWRaid_Info::is_member_active(path));
}
return busy ;