aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2012-09-13 10:24:21 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-09-13 10:24:21 -0400
commit4da4a56e4f83f52d71e2c5fa86fb1ad77be09753 (patch)
treee473a98e99d9647bfbf299d1f69f5d612b8cbe64 /fs
parent1c6bd7173d66b3dfdefcedb38cabc1fb03997509 (diff)
ext4: log a resize update to the console every 10 seconds
For very long online resizes, a periodic update to the console log is helpful for debugging and for progress reporting. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/resize.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 5932ab5ca53f..3c9367b9bebd 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1869,6 +1869,7 @@ int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count)
1869 ext4_group_t n_group; 1869 ext4_group_t n_group;
1870 ext4_fsblk_t o_blocks_count; 1870 ext4_fsblk_t o_blocks_count;
1871 ext4_fsblk_t n_blocks_count_retry = 0; 1871 ext4_fsblk_t n_blocks_count_retry = 0;
1872 unsigned long last_update_time = 0;
1872 int err = 0, flexbg_size = 1 << sbi->s_log_groups_per_flex; 1873 int err = 0, flexbg_size = 1 << sbi->s_log_groups_per_flex;
1873 int meta_bg; 1874 int meta_bg;
1874 1875
@@ -1977,6 +1978,13 @@ retry:
1977 */ 1978 */
1978 while (ext4_setup_next_flex_gd(sb, flex_gd, n_blocks_count, 1979 while (ext4_setup_next_flex_gd(sb, flex_gd, n_blocks_count,
1979 flexbg_size)) { 1980 flexbg_size)) {
1981 if (jiffies - last_update_time > HZ * 10) {
1982 if (last_update_time)
1983 ext4_msg(sb, KERN_INFO,
1984 "resized to %llu blocks",
1985 ext4_blocks_count(es));
1986 last_update_time = jiffies;
1987 }
1980 if (ext4_alloc_group_tables(sb, flex_gd, flexbg_size) != 0) 1988 if (ext4_alloc_group_tables(sb, flex_gd, flexbg_size) != 0)
1981 break; 1989 break;
1982 err = ext4_flex_group_add(sb, resize_inode, flex_gd); 1990 err = ext4_flex_group_add(sb, resize_inode, flex_gd);