DCMD_BLK_FORCE_RELEARN, DCMD_FSYS_FORCE_RELEARN

Trigger a media reversioning and cache invalidation

Synopsis:

#include <sys/dcmd_blk.h>

#define DCMD_BLK_FORCE_RELEARN     __DION(_DCMD_BLK, 2)
#define DCMD_FSYS_FORCE_RELEARN    DCMD_BLK_FORCE_RELEARN

Arguments to devctl():

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

Description:

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.

Input:

None.

Output:

None.

Example:

if ( devctl( fd, DCMD_BLK_FORCE_RELEARN, NULL, 0, NULL ) != EOK)
{
   /* Error */
}

See also:

devctl() in the QNX Neutrino C Library Reference