aboutsummaryrefslogtreecommitdiffstats
path: root/tests/m_minrootdir
Commit message (Collapse)AuthorAgeFilesLines
* mke2fs: set overhead in super blockLi Dongyang2020-01-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If overhead is not recorded in the super block, it is calculated during mount in kernel, for bigalloc file systems it takes O(groups**2) in time. For a 1PB device with 32K cluster size it takes ~12 mins to mount, with most of the time spent on figuring out overhead. While we can not improve the overhead algorithm in kernel due to the nature of bigalloc, we can work out the overhead during mke2fs and set it in the super block, avoiding calculating it every time when it mounts. Overhead is s_first_data_block plus internal journal blocks plus the block and inode bitmaps, inode table, super block backups and group descriptor blocks for every group. This patch introduces ext2fs_count_used_clusters(), which calculates the clusters used in the block bitmap for the given range. When bad blocks are involved, it gets tricky because the blocks counted as overhead and the bad blocks can end up in the same allocation cluster. In this case we will unmark the bad blocks from the block bitmap, convert to cluster bitmap and get the overhead, then mark the bad blocks back in the cluster bitmap. Reset the overhead to zero when resizing, we can not simply count the used blocks as overhead like we do when mke2fs. The overhead can be calculated by kernel side during mount. Signed-off-by: Li Dongyang <dongyangli@ddn.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* tests: don't run sed multiple times on test outputAndreas Dilger2018-06-221-4/+4
| | | | | | | | | | | | Don't call sed multiple times on the output, and avoid the use of temporary files, or if possible. It would be convenient to use "sed -i" to only update the output file once, but this is not portable to all platforms. [ Fixed a few test regression failures --tytso ] Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* tests: clean up $DEBUGFS_EXE usage in scriptsAndreas Dilger2018-06-221-6/+5
| | | | | | | | | | | | | | | | Instead of putting the entire test script under an implicit "if test -x $DEBUGFS_EXE" conditional (sometimes indenting the code, and sometimes not), rather check for the reverse and exit the test script early if $DEBUGFS_EXE is missing. In some places, tests were running $DEBUGFS_EXE directly, when they should be running $DEBUGFS (which will run with Fortify, or other options). [ Fixed up missing exit statement in f_detect_junk. --tytso ] Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Add project quota supportLi Xi2016-03-061-6/+6
| | | | | | | | | | | | This patch adds project quota support. An new quota type PRJQUOTA(2) is added. EXT4_PRJ_QUOTA_INO(11) is reserved for project quota inode. The super block reservers an field s_prj_quota_inum for saving project quota inode. And each inode adds an internal field i_projid for saving its project ID. Signed-off-by: Li Xi <lixi@ddn.com> Signed-off-by: Wang Shilong <wshilong@ddn.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* mke2fs: add simple tests and re-alphabetize mke2fs manpage optionsDarrick J. Wong2015-05-053-0/+302
Add some simple tests for mke2fs -d (create image from dir) and make the manpage options appear in alphabetic order. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>