Skip to contentSkip to conversation

FAILED: patch "[PATCH] ext4: do not update s_last_mounted of a frozen fs" failed to apply to 4.17-stable tree

PATCH [email protected] 3 participants 11 messages Jun 21, 2018 – Jul 10, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.17-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From db6516a5e7ddb6dc72d167b920f2f272596ea22d Mon Sep 17 00:00:00 2001

From: Amir Goldstein <[email protected]>
Date: Sun, 13 May 2018 22:54:44 -0400
Subject: [PATCH] ext4: do not update s_last_mounted of a frozen fs

If fs is frozen after mount and before the first file open, the update of s_last_mounted bypasses freeze protection and prints out a WARNING splat:

$ mount /vdf
$ fsfreeze -f /vdf
$ cat /vdf/foo
[   31.578555] WARNING: CPU: 1 PID: 1415 at

fs/ext4/ext4_jbd2.c:53 ext4_journal_check_start+0x48/0x82

[   31.614016] Call Trace:
[   31.614997]  __ext4_journal_start_sb+0xe4/0x1a4
[   31.616771]  ? ext4_file_open+0xb6/0x189
[   31.618094]  ext4_file_open+0xb6/0x189

If fs is frozen, skip s_last_mounted update.

[backport hint: to apply to stable tree, need to apply also patches
vfs: add the sb_start_intwrite_trylock() helper
ext4: factor out helper ext4_sample_last_mounted()]

Fixes bc0b0d6d69ee ("ext4: update the s_last_mounted field in the superblock")
fs/ext4/file.c +9 -5
index c48ea76b63e4..7f8023340eb8 100644
@@ -393,7 +393,7 @@ static int ext4_sample_last_mounted(struct super_block *sb,
 	if (likely(sbi->s_mount_flags & EXT4_MF_MNTDIR_SAMPLED))
 		return 0;
 
-	if (sb_rdonly(sb))
+	if (sb_rdonly(sb) || !sb_start_intwrite_trylock(sb))
 		return 0;
 
 	sbi->s_mount_flags |= EXT4_MF_MNTDIR_SAMPLED;
@@ -407,21 +407,25 @@ static int ext4_sample_last_mounted(struct super_block *sb,
 	path.mnt = mnt;
 	path.dentry = mnt->mnt_root;
 	cp = d_path(&path, buf, sizeof(buf));
+	err = 0;
 	if (IS_ERR(cp))
-		return 0;
+		goto out;
 
 	handle = ext4_journal_start_sb(sb, EXT4_HT_MISC, 1);
+	err = PTR_ERR(handle);
 	if (IS_ERR(handle))
-		return PTR_ERR(handle);
+		goto out;
 	BUFFER_TRACE(sbi->s_sbh, "get_write_access");
 	err = ext4_journal_get_write_access(handle, sbi->s_sbh);
 	if (err)
-		goto out;
+		goto out_journal;
 	strlcpy(sbi->s_es->s_last_mounted, cp,
 		sizeof(sbi->s_es->s_last_mounted));
 	ext4_handle_dirty_super(handle, sb);
-out:
+out_journal:
 	ext4_journal_stop(handle);
+out:
+	sb_end_intwrite(sb);
 	return err;
 }
 
#1 lore raw
Quoted 2 lines · On Fri, Jun 22, 2018 at 12:15 AM, <[email protected]> wrote:

The patch below does not apply to the 4.17-stable tree.

There is a [backport hint] at the end of the commit message. Need to take the 2 prep commits.
Same for all stable branches.

Cheers,
Amir.

Quoted 87 lines

If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From db6516a5e7ddb6dc72d167b920f2f272596ea22d Mon Sep 17 00:00:00 2001
From: Amir Goldstein <[email protected]>
Date: Sun, 13 May 2018 22:54:44 -0400
Subject: [PATCH] ext4: do not update s_last_mounted of a frozen fs

If fs is frozen after mount and before the first file open, the update of s_last_mounted bypasses freeze protection and prints out a WARNING splat:

$ mount /vdf
$ fsfreeze -f /vdf
$ cat /vdf/foo
[   31.578555] WARNING: CPU: 1 PID: 1415 at

fs/ext4/ext4_jbd2.c:53 ext4_journal_check_start+0x48/0x82

[   31.614016] Call Trace:
[   31.614997]  __ext4_journal_start_sb+0xe4/0x1a4
[   31.616771]  ? ext4_file_open+0xb6/0x189
[   31.618094]  ext4_file_open+0xb6/0x189

If fs is frozen, skip s_last_mounted update.

[backport hint: to apply to stable tree, need to apply also patches
vfs: add the sb_start_intwrite_trylock() helper
ext4: factor out helper ext4_sample_last_mounted()]

Fixes bc0b0d6d69ee ("ext4: update the s_last_mounted field in the superblock")
fs/ext4/file.c +9 -5
index c48ea76b63e4..7f8023340eb8 100644
@@ -393,7 +393,7 @@ static int ext4_sample_last_mounted(struct super_block *sb,
        if (likely(sbi->s_mount_flags & EXT4_MF_MNTDIR_SAMPLED))
                return 0;
 
-       if (sb_rdonly(sb))
+       if (sb_rdonly(sb) || !sb_start_intwrite_trylock(sb))
                return 0;
 
        sbi->s_mount_flags |= EXT4_MF_MNTDIR_SAMPLED;
@@ -407,21 +407,25 @@ static int ext4_sample_last_mounted(struct super_block *sb,
        path.mnt = mnt;
        path.dentry = mnt->mnt_root;
        cp = d_path(&path, buf, sizeof(buf));
+       err = 0;
        if (IS_ERR(cp))
-               return 0;
+               goto out;
 
        handle = ext4_journal_start_sb(sb, EXT4_HT_MISC, 1);
+       err = PTR_ERR(handle);
        if (IS_ERR(handle))
-               return PTR_ERR(handle);
+               goto out;
        BUFFER_TRACE(sbi->s_sbh, "get_write_access");
        err = ext4_journal_get_write_access(handle, sbi->s_sbh);
        if (err)
-               goto out;
+               goto out_journal;
        strlcpy(sbi->s_es->s_last_mounted, cp,
                sizeof(sbi->s_es->s_last_mounted));
        ext4_handle_dirty_super(handle, sb);
-out:
+out_journal:
        ext4_journal_stop(handle);
+out:
+       sb_end_intwrite(sb);
        return err;
 }
 
author maintainer
#2 lore raw
Quoted 7 lines · Amir Goldstein
Quoted 2 lines · On Fri, Jun 22, 2018 at 12:15 AM, <[email protected]> wrote:

The patch below does not apply to the 4.17-stable tree.

There is a [backport hint] at the end of the commit message. Need to take the 2 prep commits.
Same for all stable branches.

Doh! Sorry about that, I'll go pay attention more and fix this up
myself.

greg k-h

author maintainer
#3 lore raw
In reply to Amir Goldstein
Quoted 47 lines · Amir Goldstein
Quoted 2 lines · On Fri, Jun 22, 2018 at 12:15 AM, <[email protected]> wrote:

The patch below does not apply to the 4.17-stable tree.

There is a [backport hint] at the end of the commit message. Need to take the 2 prep commits.
Same for all stable branches.

Cheers,
Amir.

Quoted 36 lines

If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From db6516a5e7ddb6dc72d167b920f2f272596ea22d Mon Sep 17 00:00:00 2001
From: Amir Goldstein <[email protected]>
Date: Sun, 13 May 2018 22:54:44 -0400
Subject: [PATCH] ext4: do not update s_last_mounted of a frozen fs

If fs is frozen after mount and before the first file open, the update of s_last_mounted bypasses freeze protection and prints out a WARNING splat:

$ mount /vdf
$ fsfreeze -f /vdf
$ cat /vdf/foo
[   31.578555] WARNING: CPU: 1 PID: 1415 at

fs/ext4/ext4_jbd2.c:53 ext4_journal_check_start+0x48/0x82

[   31.614016] Call Trace:
[   31.614997]  __ext4_journal_start_sb+0xe4/0x1a4
[   31.616771]  ? ext4_file_open+0xb6/0x189
[   31.618094]  ext4_file_open+0xb6/0x189

If fs is frozen, skip s_last_mounted update.

[backport hint: to apply to stable tree, need to apply also patches
vfs: add the sb_start_intwrite_trylock() helper
ext4: factor out helper ext4_sample_last_mounted()]

For "hints", can you provide the git commit id in the future so I don't have to dig them out myself?

thanks,

greg k-h

author maintainer
#4 lore raw
Quoted 43 lines · Greg KH
Quoted 42 lines · Amir Goldstein
Quoted 2 lines · On Fri, Jun 22, 2018 at 12:15 AM, <[email protected]> wrote:

The patch below does not apply to the 4.17-stable tree.

There is a [backport hint] at the end of the commit message. Need to take the 2 prep commits.
Same for all stable branches.

Cheers,
Amir.

Quoted 31 lines

If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From db6516a5e7ddb6dc72d167b920f2f272596ea22d Mon Sep 17 00:00:00 2001
From: Amir Goldstein <[email protected]>
Date: Sun, 13 May 2018 22:54:44 -0400
Subject: [PATCH] ext4: do not update s_last_mounted of a frozen fs

If fs is frozen after mount and before the first file open, the update of s_last_mounted bypasses freeze protection and prints out a WARNING splat:

$ mount /vdf
$ fsfreeze -f /vdf
$ cat /vdf/foo
[   31.578555] WARNING: CPU: 1 PID: 1415 at

fs/ext4/ext4_jbd2.c:53 ext4_journal_check_start+0x48/0x82

[   31.614016] Call Trace:
[   31.614997]  __ext4_journal_start_sb+0xe4/0x1a4
[   31.616771]  ? ext4_file_open+0xb6/0x189
[   31.618094]  ext4_file_open+0xb6/0x189
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

If fs is frozen, skip s_last_mounted update.

[backport hint: to apply to stable tree, need to apply also patches
vfs: add the sb_start_intwrite_trylock() helper
ext4: factor out helper ext4_sample_last_mounted()]

For "hints", can you provide the git commit id in the future so I don't have to dig them out myself?

And those backports don't apply properly :(

Can you please provide a series of patches backported to the stable trees you feel these should go to, so I can apply them?

thanks,

greg k-h

#5 lore raw
Quoted 44 lines · Greg KH
Quoted 43 lines · Greg KH
Quoted 42 lines · Amir Goldstein
Quoted 2 lines · On Fri, Jun 22, 2018 at 12:15 AM, <[email protected]> wrote:

The patch below does not apply to the 4.17-stable tree.

There is a [backport hint] at the end of the commit message. Need to take the 2 prep commits.
Same for all stable branches.

Cheers,
Amir.

Quoted 31 lines

If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From db6516a5e7ddb6dc72d167b920f2f272596ea22d Mon Sep 17 00:00:00 2001
From: Amir Goldstein <[email protected]>
Date: Sun, 13 May 2018 22:54:44 -0400
Subject: [PATCH] ext4: do not update s_last_mounted of a frozen fs

If fs is frozen after mount and before the first file open, the update of s_last_mounted bypasses freeze protection and prints out a WARNING splat:

$ mount /vdf
$ fsfreeze -f /vdf
$ cat /vdf/foo
[   31.578555] WARNING: CPU: 1 PID: 1415 at

fs/ext4/ext4_jbd2.c:53 ext4_journal_check_start+0x48/0x82

[   31.614016] Call Trace:
[   31.614997]  __ext4_journal_start_sb+0xe4/0x1a4
[   31.616771]  ? ext4_file_open+0xb6/0x189
[   31.618094]  ext4_file_open+0xb6/0x189
Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

If fs is frozen, skip s_last_mounted update.

[backport hint: to apply to stable tree, need to apply also patches
vfs: add the sb_start_intwrite_trylock() helper
ext4: factor out helper ext4_sample_last_mounted()]

For "hints", can you provide the git commit id in the future so I don't have to dig them out myself?

That would be chicken and egg.
I wrote the hint when I posted the series so there was no upstream commit id at the time. Maybe I should have written "need to apply the 2 previous patches" as a hint... or could have tried to push back on review comments to split the patches.

Quoted 5 lines

And those backports don't apply properly :(

Can you please provide a series of patches backported to the stable trees you feel these should go to, so I can apply them?

I can look into that sometime, but frankly, I don't feel strongly either way about applying those patches to stable.
If anybody from ext4 developers can find the time to look into that, I wouldn't object at all..

Thanks,
Amir.

#6 lore raw
Quoted 55 lines · Amir Goldstein
Quoted 44 lines · Greg KH
Quoted 43 lines · Greg KH
Quoted 42 lines · Amir Goldstein
Quoted 2 lines · On Fri, Jun 22, 2018 at 12:15 AM, <[email protected]> wrote:

The patch below does not apply to the 4.17-stable tree.

There is a [backport hint] at the end of the commit message. Need to take the 2 prep commits.
Same for all stable branches.

Cheers,
Amir.

Quoted 31 lines

If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From db6516a5e7ddb6dc72d167b920f2f272596ea22d Mon Sep 17 00:00:00 2001
From: Amir Goldstein <[email protected]>
Date: Sun, 13 May 2018 22:54:44 -0400
Subject: [PATCH] ext4: do not update s_last_mounted of a frozen fs

If fs is frozen after mount and before the first file open, the update of s_last_mounted bypasses freeze protection and prints out a WARNING splat:

$ mount /vdf
$ fsfreeze -f /vdf
$ cat /vdf/foo
[   31.578555] WARNING: CPU: 1 PID: 1415 at

fs/ext4/ext4_jbd2.c:53 ext4_journal_check_start+0x48/0x82

[   31.614016] Call Trace:
[   31.614997]  __ext4_journal_start_sb+0xe4/0x1a4
[   31.616771]  ? ext4_file_open+0xb6/0x189
[   31.618094]  ext4_file_open+0xb6/0x189
Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

If fs is frozen, skip s_last_mounted update.

[backport hint: to apply to stable tree, need to apply also patches
vfs: add the sb_start_intwrite_trylock() helper
ext4: factor out helper ext4_sample_last_mounted()]

For "hints", can you provide the git commit id in the future so I don't have to dig them out myself?

Quoted 12 lines

That would be chicken and egg.
I wrote the hint when I posted the series so there was no upstream commit id at the time. Maybe I should have written "need to apply the 2 previous patches" as a hint... or could have tried to push back on review comments to split the patches.

Quoted 5 lines

And those backports don't apply properly :(

Can you please provide a series of patches backported to the stable trees you feel these should go to, so I can apply them?

Greg,

The following upstream commit ids apply cleanly to current linux-4.17.y:
db6516a5e7dd ext4: do not update s_last_mounted of a frozen fs 833a950882d3 ext4: factor out helper ext4_sample_last_mounted() 0c8e3fe35db9 vfs: add the sb_start_intwrite_trylock() helper

I don't understand where in the process the problem was. If you have any conclusions I would love to know so process could be improved.

Thanks,
Amir.

reviewer
#9 lore raw
In reply to Amir Goldstein
Quoted 63 lines · Amir Goldstein
Quoted 44 lines · Greg KH
Quoted 43 lines · Greg KH
Quoted 42 lines · Amir Goldstein
Quoted 2 lines · On Fri, Jun 22, 2018 at 12:15 AM, <[email protected]> wrote:

The patch below does not apply to the 4.17-stable tree.

There is a [backport hint] at the end of the commit message. Need to take the 2 prep commits.
Same for all stable branches.

Cheers,
Amir.

Quoted 31 lines

If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From db6516a5e7ddb6dc72d167b920f2f272596ea22d Mon Sep 17 00:00:00 2001
From: Amir Goldstein <[email protected]>
Date: Sun, 13 May 2018 22:54:44 -0400
Subject: [PATCH] ext4: do not update s_last_mounted of a frozen fs

If fs is frozen after mount and before the first file open, the update of s_last_mounted bypasses freeze protection and prints out a WARNING splat:

$ mount /vdf
$ fsfreeze -f /vdf
$ cat /vdf/foo
[   31.578555] WARNING: CPU: 1 PID: 1415 at

fs/ext4/ext4_jbd2.c:53 ext4_journal_check_start+0x48/0x82

[   31.614016] Call Trace:
[   31.614997]  __ext4_journal_start_sb+0xe4/0x1a4
[   31.616771]  ? ext4_file_open+0xb6/0x189
[   31.618094]  ext4_file_open+0xb6/0x189
Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

If fs is frozen, skip s_last_mounted update.

[backport hint: to apply to stable tree, need to apply also patches
vfs: add the sb_start_intwrite_trylock() helper
ext4: factor out helper ext4_sample_last_mounted()]

For "hints", can you provide the git commit id in the future so I don't have to dig them out myself?

That would be chicken and egg.
I wrote the hint when I posted the series so there was no upstream commit id at the time. Maybe I should have written "need to apply the 2 previous patches" as a hint... or could have tried to push back on review comments to split the patches.

Quoted 2 lines

And those backports don't apply properly :(

Quoted 8 lines
Quoted 3 lines

Can you please provide a series of patches backported to the stable trees you feel these should go to, so I can apply them?

I can look into that sometime, but frankly, I don't feel strongly either way about applying those patches to stable.
If anybody from ext4 developers can find the time to look into that, I wouldn't object at all..

I will be probably eventually backporting these patches to SLE kernels so I can forward them to stable then as well. But since this is really more of an annoyance than a serious problem, it doesn't have high priority.

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
author maintainer
#7 lore raw
In reply to Amir Goldstein
Quoted 71 lines · Amir Goldstein
Quoted 55 lines · Amir Goldstein
Quoted 44 lines · Greg KH
Quoted 43 lines · Greg KH
Quoted 42 lines · Amir Goldstein
Quoted 2 lines · On Fri, Jun 22, 2018 at 12:15 AM, <[email protected]> wrote:

The patch below does not apply to the 4.17-stable tree.

There is a [backport hint] at the end of the commit message. Need to take the 2 prep commits.
Same for all stable branches.

Cheers,
Amir.

Quoted 31 lines

If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From db6516a5e7ddb6dc72d167b920f2f272596ea22d Mon Sep 17 00:00:00 2001
From: Amir Goldstein <[email protected]>
Date: Sun, 13 May 2018 22:54:44 -0400
Subject: [PATCH] ext4: do not update s_last_mounted of a frozen fs

If fs is frozen after mount and before the first file open, the update of s_last_mounted bypasses freeze protection and prints out a WARNING splat:

$ mount /vdf
$ fsfreeze -f /vdf
$ cat /vdf/foo
[   31.578555] WARNING: CPU: 1 PID: 1415 at

fs/ext4/ext4_jbd2.c:53 ext4_journal_check_start+0x48/0x82

[   31.614016] Call Trace:
[   31.614997]  __ext4_journal_start_sb+0xe4/0x1a4
[   31.616771]  ? ext4_file_open+0xb6/0x189
[   31.618094]  ext4_file_open+0xb6/0x189
Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

If fs is frozen, skip s_last_mounted update.

[backport hint: to apply to stable tree, need to apply also patches
vfs: add the sb_start_intwrite_trylock() helper
ext4: factor out helper ext4_sample_last_mounted()]

For "hints", can you provide the git commit id in the future so I don't have to dig them out myself?

Quoted 12 lines

That would be chicken and egg.
I wrote the hint when I posted the series so there was no upstream commit id at the time. Maybe I should have written "need to apply the 2 previous patches" as a hint... or could have tried to push back on review comments to split the patches.

Quoted 5 lines

And those backports don't apply properly :(

Can you please provide a series of patches backported to the stable trees you feel these should go to, so I can apply them?

Greg,

Quoted 8 lines

The following upstream commit ids apply cleanly to current linux-4.17.y:
db6516a5e7dd ext4: do not update s_last_mounted of a frozen fs 833a950882d3 ext4: factor out helper ext4_sample_last_mounted() 0c8e3fe35db9 vfs: add the sb_start_intwrite_trylock() helper

I don't understand where in the process the problem was. If you have any conclusions I would love to know so process could be improved.

Yes, for 4.17 they did apply cleanly, but your patch says it should be backported much further than that. Is that request incorrect?

thanks,

greg k-h

#8 lore raw
Quoted 77 lines · Greg KH
Quoted 76 lines · Amir Goldstein
Quoted 55 lines · Amir Goldstein
Quoted 44 lines · Greg KH
Quoted 43 lines · Greg KH
Quoted 42 lines · Amir Goldstein
Quoted 2 lines · On Fri, Jun 22, 2018 at 12:15 AM, <[email protected]> wrote:

The patch below does not apply to the 4.17-stable tree.

There is a [backport hint] at the end of the commit message. Need to take the 2 prep commits.
Same for all stable branches.

Cheers,
Amir.

Quoted 31 lines

If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From db6516a5e7ddb6dc72d167b920f2f272596ea22d Mon Sep 17 00:00:00 2001
From: Amir Goldstein <[email protected]>
Date: Sun, 13 May 2018 22:54:44 -0400
Subject: [PATCH] ext4: do not update s_last_mounted of a frozen fs

If fs is frozen after mount and before the first file open, the update of s_last_mounted bypasses freeze protection and prints out a WARNING splat:

$ mount /vdf
$ fsfreeze -f /vdf
$ cat /vdf/foo
[   31.578555] WARNING: CPU: 1 PID: 1415 at

fs/ext4/ext4_jbd2.c:53 ext4_journal_check_start+0x48/0x82

[   31.614016] Call Trace:
[   31.614997]  __ext4_journal_start_sb+0xe4/0x1a4
[   31.616771]  ? ext4_file_open+0xb6/0x189
[   31.618094]  ext4_file_open+0xb6/0x189
Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

If fs is frozen, skip s_last_mounted update.

[backport hint: to apply to stable tree, need to apply also patches
vfs: add the sb_start_intwrite_trylock() helper
ext4: factor out helper ext4_sample_last_mounted()]

For "hints", can you provide the git commit id in the future so I don't have to dig them out myself?

Quoted 12 lines

That would be chicken and egg.
I wrote the hint when I posted the series so there was no upstream commit id at the time. Maybe I should have written "need to apply the 2 previous patches" as a hint... or could have tried to push back on review comments to split the patches.

Quoted 5 lines

And those backports don't apply properly :(

Can you please provide a series of patches backported to the stable trees you feel these should go to, so I can apply them?

Greg,

The following upstream commit ids apply cleanly to current linux-4.17.y:
db6516a5e7dd ext4: do not update s_last_mounted of a frozen fs 833a950882d3 ext4: factor out helper ext4_sample_last_mounted() 0c8e3fe35db9 vfs: add the sb_start_intwrite_trylock() helper

Quoted 7 lines
Quoted 3 lines

I don't understand where in the process the problem was. If you have any conclusions I would love to know so process could be improved.

Yes, for 4.17 they did apply cleanly, but your patch says it should be backported much further than that. Is that request incorrect?

Well, that's just miscommunication then.
I did not intend to request inclusion to any specific stable kernel. The Fixes tag is informative - this is when bug was introduced. The hint was meant to help whoever is picking up this commit to stable kernel to know it has dependencies.
I agree with Jan that it is a rather corner issue that should be treated as nice to have in stable kernels.
Anyway, seems that Jan has already "volunteered" to backport the patches in some future time.

Thanks,
Amir.

author maintainer
#10 lore raw
In reply to Jan Kara
Quoted 68 lines · Jan Kara
Quoted 67 lines · Amir Goldstein
Quoted 44 lines · Greg KH
Quoted 43 lines · Greg KH
Quoted 42 lines · Amir Goldstein
Quoted 2 lines · On Fri, Jun 22, 2018 at 12:15 AM, <[email protected]> wrote:

The patch below does not apply to the 4.17-stable tree.

There is a [backport hint] at the end of the commit message. Need to take the 2 prep commits.
Same for all stable branches.

Cheers,
Amir.

Quoted 31 lines

If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From db6516a5e7ddb6dc72d167b920f2f272596ea22d Mon Sep 17 00:00:00 2001
From: Amir Goldstein <[email protected]>
Date: Sun, 13 May 2018 22:54:44 -0400
Subject: [PATCH] ext4: do not update s_last_mounted of a frozen fs

If fs is frozen after mount and before the first file open, the update of s_last_mounted bypasses freeze protection and prints out a WARNING splat:

$ mount /vdf
$ fsfreeze -f /vdf
$ cat /vdf/foo
[   31.578555] WARNING: CPU: 1 PID: 1415 at

fs/ext4/ext4_jbd2.c:53 ext4_journal_check_start+0x48/0x82

[   31.614016] Call Trace:
[   31.614997]  __ext4_journal_start_sb+0xe4/0x1a4
[   31.616771]  ? ext4_file_open+0xb6/0x189
[   31.618094]  ext4_file_open+0xb6/0x189
Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

If fs is frozen, skip s_last_mounted update.

[backport hint: to apply to stable tree, need to apply also patches
vfs: add the sb_start_intwrite_trylock() helper
ext4: factor out helper ext4_sample_last_mounted()]

For "hints", can you provide the git commit id in the future so I don't have to dig them out myself?

That would be chicken and egg.
I wrote the hint when I posted the series so there was no upstream commit id at the time. Maybe I should have written "need to apply the 2 previous patches" as a hint... or could have tried to push back on review comments to split the patches.

Quoted 5 lines

And those backports don't apply properly :(

Can you please provide a series of patches backported to the stable trees you feel these should go to, so I can apply them?

Quoted 8 lines
Quoted 4 lines

I can look into that sometime, but frankly, I don't feel strongly either way about applying those patches to stable.
If anybody from ext4 developers can find the time to look into that, I wouldn't object at all..

I will be probably eventually backporting these patches to SLE kernels so I can forward them to stable then as well. But since this is really more of an annoyance than a serious problem, it doesn't have high priority.

Ok, given that this really isn't a big deal, I'll leave it as-is and wait for backports to show up if you all happen to do them.

thanks,

greg k-h