mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-12-04 07:23:33 +08:00
libext2fs: avoid forking a single thread in ext2fs_rw_bitmaps()
https://github.com/tytso/e2fsprogs/issues/67 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
a3f844da91
commit
d0b6b64f62
@ -563,7 +563,7 @@ errcode_t ext2fs_rw_bitmaps(ext2_filsys fs, int flags, int num_threads)
|
||||
if (ext2fs_has_feature_flex_bg(fs->super)) {
|
||||
average_group = (average_group / flexbg_size) * flexbg_size;
|
||||
}
|
||||
if (average_group == 0)
|
||||
if ((num_threads <= 1) || (average_group == 0))
|
||||
goto fallback;
|
||||
|
||||
io_channel_set_options(fs->io, "cache=off");
|
||||
|
Loading…
Reference in New Issue
Block a user