<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/ubifs-utils/Makemodule.am, branch v2.3.1</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2025-06-02T05:22:10+00:00</updated>
<entry>
<title>ubifs-utils: link libmissing.a in case execinfo.h isn't present</title>
<updated>2025-06-02T05:22:10+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@arm.com</email>
</author>
<published>2025-02-26T18:24:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=8a83b306db64d6f60186d4396b0b770163b85b6e'/>
<id>urn:sha1:8a83b306db64d6f60186d4396b0b770163b85b6e</id>
<content type='text'>
On musl execinfo.h doesn't exist, but ubifs-utils uses backtrace() when
reporting errors.  This results in build failures under musl.

Handily, libmissing.a already exists with a stub implementation of
backtrace().

Guard the execinfo.h include and if it isn't available instead include
libmissing.h, and link to libmissing.a to provide backtrace() if needed.

Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Reviewed-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: Support Address-Sanitizier debug</title>
<updated>2024-11-11T09:32:46+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T09:08:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=e17ffbfb1ab07f8d0d4b864a5f477e119843722d'/>
<id>urn:sha1:e17ffbfb1ab07f8d0d4b864a5f477e119843722d</id>
<content type='text'>
Add new option '--asan' for configuration to support dynamic
Address-Sanitizier debugging, which could detect kinds of invalid
memory accessing problems(eg. UAF, r/w OOB, etc.). Currently, only
ubifs-utils(mkfs.ubifs/fsck.ubifs) is supported.
Enable Address-Sanitizier debugging with configuration:
  ./configure --enable-asan

Notice: The Address-Sanitizier will stop the program and print
problems if memory problems are detected. Sometimes the memory
problems come from third libs(not mtd-utils), which could stuck
the testcases.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>fsck.ubifs: Check and create the lost+found</title>
<updated>2024-11-11T09:32:46+00:00</updated>
<author>
<name>Huang Xiaojia</name>
<email>huangxiaojia2@huawei.com</email>
</author>
<published>2024-11-11T09:08:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=fda7068da735d3e574bc46b70d3af62a5db8e908'/>
<id>urn:sha1:fda7068da735d3e574bc46b70d3af62a5db8e908</id>
<content type='text'>
This is the 16/18 step of fsck. Check whether the lost+found is existed,
create a new one if it is not found. This step makes sure that disconnected
file can be recovered under the lost+found.

Signed-off-by: Huang Xiaojia &lt;huangxiaojia2@huawei.com&gt;
Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>fsck.ubifs: Move common functions and data structures into check_space.c</title>
<updated>2024-11-11T09:32:46+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T09:08:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=47c1cfd5e8ec289597f7342f88e103811511f0a8'/>
<id>urn:sha1:47c1cfd5e8ec289597f7342f88e103811511f0a8</id>
<content type='text'>
This is a preparation for adding LPT checking support. Move some data
structures and functions into check_space.c, also factor out some common
functions in libubifs:
 1. Move 'lpts' from rebuild module, make it resuable for non-rebuild_fs
    modes.
 2. Move function 'get_free_leb' from rebuild_fs.c, it could be reused in
    building LPT.
 3. Move function 'build_lpt' from rebuild_fs.c, it could be reused in
    building LPT.
 4. Factor out lpt nodes freeing into a new function ubifs_free_lpt_nodes.
 5. Factor out nnode dirty marking implementations into a new function
    ubifs_make_nnode_dirty.
 5. Export the function of nnode number calculation, calc_nnode_num is
    renamed as ubifs_calc_nnode_num.
 6. Export the function of making pnode dirty, do_make_pnode_dirty is
    renamed as ubifs_make_pnode_dirty.
 7. Rename next_pnode_to_dirty to ubifs_find_next_pnode and export it.
 8. Export free_buds and expend its parameters.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>fsck.ubifs: Traverse TNC and construct files</title>
<updated>2024-11-11T09:32:46+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T09:08:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=0d1cc10378c2a8f800ff78d79c93b39485d6ca14'/>
<id>urn:sha1:0d1cc10378c2a8f800ff78d79c93b39485d6ca14</id>
<content type='text'>
This is the 6/18 step of fsck. Traverse TNC and construct files. There
could be following steps and possible errors:
 Step 1. Traverse TNC, check whether the leaf node is valid, remove invalid
 nodes, construct file for valid node and insert file into file tree.
  a. corrupted node searched from TNC: remove corresponding TNC branch for
     danger mode and normal mode with 'yes' answer, other modes will exit.
  b. corrupted index node read from TNC: danger mode with rebuild_fs and
     normal mode with 'yes' answer will turn to rebuild filesystem, other
     modes will exit.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>fsck.ubifs: Add rebuilding filesystem support</title>
<updated>2024-11-11T09:32:45+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T09:01:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=022cd74567186eb44478dc371d46427ecfb4380b'/>
<id>urn:sha1:022cd74567186eb44478dc371d46427ecfb4380b</id>
<content type='text'>
Add rebuilding filesystem support. This is the 1/12 step of rebuilding.
Collect files, valid inode nodes, deleted inode nodes, valid dentry
nodes and deleted dentry nodes in kinds of trees by scanning nodes from
flash. Corrupted nodes(eg. incorrect crc, bad inode size, bad dentry
name length, etc.) are dropped during scanning. Larger sqnum node is
picked when more than 1 nodes with same index.
In this step, trun node and data nodes are put into corresponding file,
inode/dentry nodes are put into four trees: valid_inos(nlink != 0),
del_inos(nlink is 0), valid_dents(inum != 0), del_dents(inum is 0).
Next step will process above four trees to deal deletion situations.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>fsck.ubifs: Add node parsing functions</title>
<updated>2024-11-11T09:32:45+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T09:01:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=40cc022371625b1c8ee98377daad368582b6ebfc'/>
<id>urn:sha1:40cc022371625b1c8ee98377daad368582b6ebfc</id>
<content type='text'>
Add parsing functions for each type of nodes, which will be used for
checking the validity of raw node data while reading from TNC or
scanning from UBIFS logical erase block.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>fsck.ubifs: Load filesystem information from UBI volume</title>
<updated>2024-11-11T09:32:45+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T09:01:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=fabde6440cac726bcd6cec36bbc9946b67be45da'/>
<id>urn:sha1:fabde6440cac726bcd6cec36bbc9946b67be45da</id>
<content type='text'>
Load filesystem information from UBI volume (Similar to UBIFS mounting
process), initialize kinds of buffers and read superblock. This is the
base step for both fsck and rebuild_fs. Subsequent pacthes will complete
this step by adding more steps(eg. read master, replay journal, etc.)
which are only used in fsck.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>fsck.ubifs: Add inconsistent problem handling asking function</title>
<updated>2024-11-11T09:32:45+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T09:01:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=e17ad291a8da970a4cf64a57796c30437d8c5fbd'/>
<id>urn:sha1:e17ad291a8da970a4cf64a57796c30437d8c5fbd</id>
<content type='text'>
There are four dimensions to define the type of inconsistent problems:
 1. fixable: Some inconsistent problems can't be fixed, for example
    corrupted superblock. Un-fixable problem will abort program.
 2. must fix: Some inconsistent problems can be ignored(eg. incorrect
    isize), but some are not(eg. corrupted TNC), which will affect the
    subsequent fsck steps.
 3. drop data: Some fixing methods will drop user data, which is
    unacceptable for safe mode. If it happens, fsck will be aborted.
 4. need rebuild: Some inconsistent problems depends on rebuilding
    filesystem to be fixed(eg. corrupted master node, corrupted TNC).
Define an asking function to handle above kinds of inconsistent problems.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>fsck.ubifs: Add fsck support</title>
<updated>2024-11-11T09:32:45+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T09:01:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=aa2b50294710caba39c6b01ce99f2f6993a42ed2'/>
<id>urn:sha1:aa2b50294710caba39c6b01ce99f2f6993a42ed2</id>
<content type='text'>
Add basic process code for fsck.ubifs. There are following modes for fsck:
 1. normal mode: Check the filesystem, ask user whether or not to fix
    the problem as long as inconsistent data is found during fs checking.
 2. safe mode: Check and safely repair the filesystem, if there are any
    data dropping operations needed by fixing, fsck will fail.
 3. danger mode: Answer 'yes' to all questions. There two sub modes:
    a) Check and repair the filesystem according to TNC, data dropping
       will be reported. If TNC/master/log is corrupted, fsck will fail.
    b) Check and forcedly repair the filesystem according to TNC, turns
       to rebuild filesystem if TNC/master/log is corrupted. Always make
       fsck succeed.
 4. check mode: Make no changes to the filesystem, only check the
    filesystem.
 5. rebuild mode: Scan entire UBI volume to find all nodes, and rebuild
    filesystem, always make fsck success.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
