mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-23 10:04:01 +08:00
tune2fs: only set the superblock as dirty if the default group is modified
Similar to commit 2eb3b20e80
, it speeds up `tunefs -g` command when
the group argument is identical.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Link: https://lore.kernel.org/r/20240718175204.1590917-1-gwendal@chromium.org
This commit is contained in:
parent
9448aedd93
commit
2c1e554316
@ -3381,9 +3381,13 @@ _("Warning: The journal is dirty. You may wish to replay the journal like:\n\n"
|
||||
printf(_("Setting error behavior to %d\n"), errors);
|
||||
}
|
||||
if (g_flag) {
|
||||
sb->s_def_resgid = resgid;
|
||||
ext2fs_mark_super_dirty(fs);
|
||||
printf(_("Setting reserved blocks gid to %lu\n"), resgid);
|
||||
if (sb->s_def_resgid != resgid) {
|
||||
sb->s_def_resgid = resgid;
|
||||
ext2fs_mark_super_dirty(fs);
|
||||
printf(_("Setting reserved blocks gid to %lu\n"), resgid);
|
||||
} else {
|
||||
printf(_("Reserved blocks gid already set to %lu\n"), resgid);
|
||||
}
|
||||
}
|
||||
if (i_flag) {
|
||||
if ((unsigned long long)interval >= (1ULL << 32)) {
|
||||
|
Loading…
Reference in New Issue
Block a user