aboutsummaryrefslogtreecommitdiff
path: root/tests/m_root_owner
AgeCommit message (Collapse)Author
2021-08-15tests: update mke2fs.conf to create 256 byte inodes by defaultTheodore Ts'o
The regression tests have their own private copy of mke2fs which is used when tests create file systems. Since we are now using 256 byte inodes by default, the tests should reflect this. While we're at it, modify the r_move_itable test so it actually tests moving the inode table. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2021-08-14mke2fs: warn about missing y2038 support when formatting fresh ext4 fsDarrick J. Wong
Filesystems with 128-byte inodes do not support timestamps beyond the year 2038. Since we're now less than 16.5 years away from that point, it's time to start warning users about this lack of support when they format an ext4 filesystem with small inodes. (Note that even for ext2 and ext3, we changed the default for non-small file systems in 2008 in commit commit b1631cce648e ("Create new filesystems with 256-byte inodes by default").) So change the mke2fs.conf file to specify 256-byte inodes even for small filesystems, and then add a warning to mke2fs itself if someone is trying to make us format a file system with 128-byte inodes. This can be suppressed by setting the boolean option warn_y2038_dates in the mke2fs.conf file to false, which we do in the case of GNU Hurd, since it only supports 128 byte inodes as of this writing. [ Patch reworked by tytso to only warn in the case of GNU Hurd, since the default for ext2/ext3 was changed for all but small file systems in 2008. ] Signed-off-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2020-01-26mke2fs: set overhead in super blockLi Dongyang
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>
2014-12-13dumpe2fs: reduce dumpe2fs output to 80 columns or lessDarrick J. Wong
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-05-04mke2fs: only print the low-level file system stats in verbose modeTheodore Ts'o
Also print the file system UUID if it is non-NULL. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-06-15mke2fs: don't set root dir UID/GID automaticallyAndreas Dilger
Don't change the root directory's UID/GID automatically just because mke2fs was run as a non-root user. This can be confusing for users, and is not flexible for non-root installation tools that need to create a filesystem with different ownership from the current user. Add the "-E root_owner[=uid:gid]" option to mke2fs so that the user and group can be explicitly specified for the root directory. If the "=uid:gid" argument is not specified, the current UID and GID are extracted from the running process, as was done in the past. Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Theodore Ts'o <tytso@mit.edu>