eeze mount operations will now only retry up to 3 times when they fail before emitting an error event
SVN revision: 74736
This commit is contained in:
parent
a0970878cc
commit
52c05aaa01
|
@ -114,3 +114,7 @@
|
||||||
2012-07-30 Mike Blumenkrantz
|
2012-07-30 Mike Blumenkrantz
|
||||||
|
|
||||||
* Add EEZE_DISK_MOUNTOPT_NODEV option for disabling device nodes on mount
|
* Add EEZE_DISK_MOUNTOPT_NODEV option for disabling device nodes on mount
|
||||||
|
|
||||||
|
2012-07-31 Mike Blumenkrantz
|
||||||
|
|
||||||
|
* Prevent mount operations from retrying infinitely on failure
|
||||||
|
|
|
@ -159,9 +159,17 @@ _eeze_disk_mount_result_handler(void *data __UNUSED__, int type __UNUSED__, Ecor
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
INF("Could not unmount disk, retrying");
|
if (disk->mount_fail_count++ < 3)
|
||||||
disk->mounter = ecore_exe_run(eina_strbuf_string_get(disk->unmount_cmd), disk);
|
{
|
||||||
eeze_events = eina_list_append(eeze_events, disk);
|
INF("Could not unmount disk, retrying");
|
||||||
|
disk->mounter = ecore_exe_run(eina_strbuf_string_get(disk->unmount_cmd), disk);
|
||||||
|
eeze_events = eina_list_append(eeze_events, disk);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
disk->mount_fail_count = 0;
|
||||||
|
_eeze_disk_mount_error_handler(disk, "Maximimum number of mount-related failures reached");
|
||||||
|
}
|
||||||
return ECORE_CALLBACK_RENEW;
|
return ECORE_CALLBACK_RENEW;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -184,12 +192,20 @@ _eeze_disk_mount_result_handler(void *data __UNUSED__, int type __UNUSED__, Ecor
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
INF("Could not eject disk, retrying");
|
if (disk->mount_fail_count++ < 3)
|
||||||
if (disk->mount_status & EEZE_DISK_UNMOUNTING)
|
{
|
||||||
disk->mounter = ecore_exe_run(eina_strbuf_string_get(disk->unmount_cmd), disk);
|
INF("Could not eject disk, retrying");
|
||||||
else
|
if (disk->mount_status & EEZE_DISK_UNMOUNTING)
|
||||||
disk->mounter = ecore_exe_run(eina_strbuf_string_get(disk->eject_cmd), disk);
|
disk->mounter = ecore_exe_run(eina_strbuf_string_get(disk->unmount_cmd), disk);
|
||||||
eeze_events = eina_list_append(eeze_events, disk);
|
else
|
||||||
|
disk->mounter = ecore_exe_run(eina_strbuf_string_get(disk->eject_cmd), disk);
|
||||||
|
eeze_events = eina_list_append(eeze_events, disk);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
disk->mount_fail_count = 0;
|
||||||
|
_eeze_disk_mount_error_handler(disk, "Maximimum number of mount-related failures reached");
|
||||||
|
}
|
||||||
return ECORE_CALLBACK_RENEW;
|
return ECORE_CALLBACK_RENEW;
|
||||||
}
|
}
|
||||||
return ECORE_CALLBACK_RENEW;
|
return ECORE_CALLBACK_RENEW;
|
||||||
|
|
|
@ -52,6 +52,7 @@ struct _Eeze_Disk
|
||||||
Eina_Bool mounted : 1;
|
Eina_Bool mounted : 1;
|
||||||
Ecore_Exe *mounter;
|
Ecore_Exe *mounter;
|
||||||
Ecore_Timer *mount_fail_delay;
|
Ecore_Timer *mount_fail_delay;
|
||||||
|
unsigned int mount_fail_count;
|
||||||
int fail_pol_check;
|
int fail_pol_check;
|
||||||
|
|
||||||
const char *syspath;
|
const char *syspath;
|
||||||
|
|
Loading…
Reference in New Issue