Trigger a media reversioning and cache invalidation
#include <sys/dcmd_blk.h> #define DCMD_BLK_FORCE_RELEARN __DION(_DCMD_BLK, 2) #define DCMD_FSYS_FORCE_RELEARN DCMD_BLK_FORCE_RELEARN
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device. |
dcmd | DCMD_BLK_FORCE_RELEARN or DCMD_FSYS_FORCE_RELEARN |
dev_data_ptr | NULL |
n_bytes | 0 |
dev_info_ptr | NULL |
These commands—which are identical—trigger a media reversioning and cache invalidation (for removable media). They're also used to sync-up a filesystem if utilities play with it behind its back.
In order to use these commands, your process needs to have the vfs/relearn (BLK_ABILITY_RELEARN) custom ability enabled. For more information, see procmgr_ability() and procmgr_ability_lookup() in the C Library Reference.
None.
None.
if ( devctl( fd, DCMD_BLK_FORCE_RELEARN, NULL, 0, NULL ) != EOK) { /* Error */ }
devctl() in the QNX Neutrino C Library Reference