DCMD_ETFS_INFO
Get information about an embedded transaction filesystem
Synopsis:
#include <sys/dcmd_mem.h>
#define DCMD_ETFS_INFO __DIOF(_DCMD_MEM, 105, struct etfs_info)
Arguments to devctl():
| Argument | Value |
|---|---|
| filedes | A file descriptor that you obtained by opening the device |
| dcmd | DCMD_ETFS_INFO |
| dev_data_ptr | A pointer to a struct etfs_info |
| n_bytes | sizeof(struct etfs_info) |
| dev_info_ptr | NULL |
Description:
This command gets information about the filesystem.
Input:
None.
Output:
A filled-in etfs_info structure, which is defined as:
struct etfs_info {
char name[16];
int numblks;
int clusters2blk;
int clustersize;
int erase_cnt;
int clean_cnt;
int spare_cnt;
int filthy_cnt;
int inactive_cnt;
int xtnts_cnt;
int cache_cnt;
int devread_cnt;
int devwrite_cnt;
int cacheread_cnt;
int mine_cnt;
int copy_cnt;
int defrag_cnt;
int eccerr_cnt;
int chkerr_cnt;
int deverr_cnt;
int files_cnt;
int open_cnt;
int badblks_cnt;
int blksize;
int expansion[15]; /* For future expansion */
} ;
The members include:
- name
- The name of the device, which usually encodes a part number or size.
- numblks
- The number of blocks on the device.
- clusters2blk
- The number of clusters to a block on the device.
- clustersize
- The size of a cluster. Typically 1 KB or 2 KB.
- erase_cnt
- The number of erases on the part (while running).
- clean_cnt
- The number of erased blocks immediately ready for writing.
- spare_cnt
- The number of spare blocks.
- filthy_cnt
- The number of free blocks that are waiting to be erased and made clean.
- inactive_cnt
- The number of clusters not being used but trapped.
- xtnts_cnt
- The number of cache buffers.
- cache_cnt
- The number of cluster cache buffers.
- devread_cnt
- The number of cluster reads from the device.
- devwrite_cnt
- The number of cluster writes to the device.
- cacheread_cnt
- The number of cluster reads from cache.
- mine_cnt
- The number of mining operations to recover dead space in a block. This is how inactive clusters create filthy blocks, which become clean after being erased.
- copy_cnt
- The number of block-copy operations. Copies occur two ways: the first way is a read in a block that has a soft ECC error, which is an indication that the block is getting weak. The block is copied to a new fresh block and the block with the ECC error is erased. In the second way, a block with a low erase count is forced into service by copying its data to a new block and erasing and putting this block into service.
- defrag_cnt
- The number of files defragmented.
- eccerr_cnt
- The number of CRC data errors that are corrected by ECC.
- chkerr_cnt
- The number of CRC data errors.
- deverr_cnt
- The number of hard device errors. This is bad and usually indicates a hardware problem.
- files_cnt
- The number of files.
- open_cnt
- The number of open files.
- badblks_cnt
- The number of blocks marked as bad and taken out of service.
- blksize
- The block size, in bytes.
See also:
devctl() in the QNX Neutrino C Library Reference
etfsctl, fs-etfs-ram in the Utilities Reference
Page updated:
