From 778839ccaec45b25a2018420b869c51a8bb5471a Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 24 Jun 2015 22:12:05 -0400 Subject: [PATCH] add patch set-lazytime-on-remount --- series | 1 + set-lazytime-on-remount | 28 ++++++++++++++++++++++++++++ timestamps | 15 ++++++++------- 3 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 set-lazytime-on-remount diff --git a/series b/series index 7216b5ec..1556f23b 100644 --- a/series +++ b/series @@ -60,6 +60,7 @@ make-online-defrag-error-reporting-consistent # causes generic/239 to fail with a 1k block size? only-call-ext4_truncate-when-size-le-isize +set-lazytime-on-remount ########################################## # unstable patches diff --git a/set-lazytime-on-remount b/set-lazytime-on-remount new file mode 100644 index 00000000..1dbbd0a7 --- /dev/null +++ b/set-lazytime-on-remount @@ -0,0 +1,28 @@ +ext4: set lazytime on remount if MS_LAZYTIME is set by mount + +Newer versions of mount parse the lazytime feature and pass it to the +mount system call via the flags field in the mount system call, +removing the lazytime string from the mount options list. So we need +to check for the presence of MS_LAZYTIME and set it in sb->s_flags in +order for this flag to be set on a remount. + +Signed-off-by: Theodore Ts'o +Cc: stable@vger.kernel.org +--- + fs/ext4/super.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/fs/ext4/super.c b/fs/ext4/super.c +index bd4df9d..90ec13f 100644 +--- a/fs/ext4/super.c ++++ b/fs/ext4/super.c +@@ -4971,6 +4971,9 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) + set_task_ioprio(sbi->s_journal->j_task, journal_ioprio); + } + ++ if (*flags & MS_LAZYTIME) ++ sb->s_flags |= MS_LAZYTIME; ++ + if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) { + if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) { + err = -EROFS; diff --git a/timestamps b/timestamps index c46f140e..9c802dfe 100755 --- a/timestamps +++ b/timestamps @@ -20,6 +20,9 @@ touch -d @1431969467 reorganize-fname-crypto touch -d @1431969527 clean-up-superblock-encryption-mode-fields touch -d @1431969587 crypto-use-slab-caches touch -d @1431969647 crypto-get-rid-of-ci_mode +touch -d @1432309683 fix-race-between-truncate-and-ext4_journalled_writepage +touch -d @1432309683 use-swap-in-mext_page_double_lock +touch -d @1432943306 use-swap-in-memswap touch -d @1433093494 crypto-shrink-ext4_crypto_ctx touch -d @1433093497 require-ctr-mode touch -d @1433093662 crypto-use-per-inode-tfm @@ -53,13 +56,10 @@ touch -d @1433829843 add-squelch-errors-support touch -d @1433829903 dump-in-use-buffers touch -d @1433829963 akpm-jbd2-locking-fix touch -d @1434167073 crypto-check-blocksize-eq-pagesize -touch -d @1434332382 fix-race-between-truncate-and-ext4_journalled_writepage touch -d @1434332502 stable-boundary-undo.patch touch -d @1434332562 add-fallocate-mode-blocking-for-debugging touch -d @1434332622 add-blkdiscard-ioctl touch -d @1434332682 block-dio-during-truncate -touch -d @1434335672 use-swap-in-memswap -touch -d @1434341049 use-swap-in-mext_page_double_lock touch -d @1434341882 use_GFP_NOFS_in_jbd2_cleanup_journal_tail touch -d @1434342046 recalculate-journal-credits-as-inode-depth-changes touch -d @1434342233 wait-for-existing-dio-workers-in-ext4_alloc_file_blocks @@ -70,11 +70,12 @@ touch -d @1434397558 jbd2-get-rid-of-open-coded-allocation-retry-loop touch -d @1434851057 speedup-jbd2_journal_dirty_metadata touch -d @1434855033 sync-before-invalidating-blockdev touch -d @1434864329 prevent-ext4_quota_write-from-failing -touch -d @1434864389 stable-boundary touch -d @1434935451 dont-retry-file-block-mapping-on-bigalloc-fs-with-non-extent-file touch -d @1434937025 minor-cleanup-of-ext4_da_reserve_space touch -d @1434937083 make-online-defrag-error-reporting-consistent -touch -d @1434940681 series touch -d @1434947486 only-call-ext4_truncate-when-size-le-isize -touch -d @1434947487 status -touch -d @1434947864 timestamps +touch -d @1434947546 stable-boundary +touch -d @1435071610 series +touch -d @1435071834 set-lazytime-on-remount +touch -d @1435071834 status +touch -d @1435198282 timestamps -- 2.11.4.GIT