Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Unable to render {include} The included page could not be found.
Unable to render {include} The included page could not be found.

FSVol_CacheAssign()

void FSVol_CacheAssign (CPU_CHAR *name_vol,

FS_VOL_CACHE_API *p_cache_api,

void *p_cache_data,

CPU_INT32U size,

CPU_INT08U pct_mgmt,

CPU_INT08U pct_dir,

FS_FLAGS mode,

FS_ERR *p_err)

 

File

Called from

Code enabled by

fs_vol.c

Application

FS_CFG_CACHE_EN

Assign cache to a volume.

Arguments

name_vol

Volume name.

p_cache_api

Pointer to: (a) cache API to use; OR (b) NULL, if default cache API should be used.

p_cache_data

Pointer to cache data.

size

Size, in bytes, of cache buffer.

pct_mgmt

Percent of cache buffer dedicated to management sectors.

pct_dir

Percent of cache buffer dedicated to directory sectors.

mode

Cache mode

FS_VOL_CACHE_MODE_WR_THROUGH

FS_VOL_CACHE_MODE_WR_BACK

FS_VOL_CACHE_MODE_RD

p_err

Pointer to variable that will receive return error code from this function:

FS_ERR_NONE
Cache created.
FS_ERR_NAME_NULL
‘name_vol’ passed a NULL pointer.
FS_ERR_VOL_NOT_OPEN
Volume not open.
FS_ERR_NULL_PTR
‘p_cache_data’ passed a NULL pointer.
FS_ERR_CACHE_INVALID_MODE
Mode specified invalid
FS_ERR_CACHE_INVALID_SEC_TYPE
Sector type sepecified invalid.
FS_ERR_CACHE_TOO_SMALL
Size specified too small for cache.

Returned Value

None.

Notes/Warnings

None.

  • No labels