inject.f2fs8
Inject a linux f2fs file system
Usage
inject.f2fs [options]
device
Overview
inject.f2fs is used to modify metadata or data (directory entry) of f2fs file system image offline flexibly.
Options
-ddebug level [default:0]-
Specify the level of debugging options.
-
-V -
Print the version number and exit.
--mbmember name-
Specify the member name in a struct that is injected.
--valnew value-
New value to set if mb is a number.
--strnew string-
New string to set if mb is a string.
--idxslot index-
Specify which slot is injected if mb is an array.
--nidnid-
Specify which nid is injected.
--blkblkaddr-
Specify which blkaddr is injected.
--sb0 or 1 or 2-
Inject super block, its argument means which sb pack is injected, where 0 choses the current valid sb automatically. The available mb of sb are:
magic-
magic number.
s_stop_reason-
s_stop_reason array.
s_errors-
s_errors array.
feature-
features.
devs.path-
path in devs array.
--cp0 or 1 or 2-
Inject checkpoint, its argument means which cp pack is injected, where 0 choses the current valid cp automatically. The available mb of cp are:
checkpoint_ver-
checkpoint version.
ckpt_flags-
checkpoint flags.
cur_node_segno-
cur_node_segno array.
cur_node_blkoff-
cur_node_blkoff array.
cur_data_segno-
cur_data_segno array.
cur_data_blkoff-
cur_data_blkoff array.
next_blkaddr-
fsync dnodes.
alloc_type-
alloc_type array.
crc-
crc checksum.
elapsed_time-
elapsed mount time.
--nat0 or 1 or 2-
Inject nat entry specified by nid, its argument means which nat pack is injected, where 0 choses the current valid nat automatically. The available mb of nat are:
version-
nat entry version.
ino-
nat entry ino.
block_addr-
nat entry block_addr.
--sit0 or 1 or 2-
Inject sit entry specified by blk, its argument means which sit pack is injected, where 0 choses the current valid sit automatically. The available mb of sit are:
vblocks-
sit entry vblocks.
valid_map-
sit entry valid_map.
mtime-
sit entry mtime.
-
--ssa -
Inject summary block or summary entry specified by blk. The available mb of ssa are:
entry_type-
summary block footer entry_type.
check_sum-
summary block footer check_sum.
nid-
summary entry nid.
version-
summary entry version.
ofs_in_node-
summary entry ofs_in_node.
-
--node -
Inject node block specified by nid. The available mb of node are:
nid-
node footer nid.
ino-
node footer ino.
flag-
node footer flag.
cp_ver-
node footer cp_ver.
next_blkaddr-
node footer next_blkaddr.
i_mode-
inode i_mode.
i_advise-
inode i_advise.
i_inline-
inode i_inline.
i_links-
inode i_links.
i_size-
inode i_size.
i_blocks-
inode i_blocks.
i_xattr_nid-
inode i_xattr_nid.
i_ext.fofs-
inode i_ext.fofs.
i_ext.blk_addr-
inode i_ext.blk_addr.
i_ext.len-
inode i_ext.len.
i_extra_isize-
inode i_extra_isize.
i_inline_xattr_size-
inode i_inline_xattr_size.
i_inode_checksum-
inode i_inode_checksum.
i_compr_blocks-
inode i_compr_blocks.
i_addr-
inode i_addr array specified by idx.
i_nid-
inode i_nid array specified by idx.
addr-
{in}direct node nid/addr array specified by idx.
-
--dent -
Inject dentry block or dir entry specified by nid.
--dots1 or 2-
The option means the "." or ".." directory entry of nid is going to be injected.
- The available mb of dent are:
-
d_bitmap-
dentry block d_bitmap.
d_hash-
dentry hash.
d_ino-
dentry ino.
d_ftype-
dentry ftype.
filename-
dentry filename, and corresponding d_hash and namelen are updated implicitly.
-
--dry-run -
Do not really inject.