All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] zonefs: fix handling of explicit_open option on mount" failed to apply to 5.18-stable tree
@ 2022-06-13  7:36 gregkh
  2022-06-13  9:27 ` [PATCH] zonefs: fix handling of explicit_open option on mount Damien Le Moal
  2022-06-13  9:29 ` FAILED: patch "[PATCH] zonefs: fix handling of explicit_open option on mount" failed to apply to 5.18-stable tree Damien Le Moal
  0 siblings, 2 replies; 4+ messages in thread
From: gregkh @ 2022-06-13  7:36 UTC (permalink / raw)
  To: damien.lemoal, hch, johannes.thumshirn, stable; +Cc: stable


The patch below does not apply to the 5.18-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 <stable@vger.kernel.org>.

thanks,

greg k-h

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

From a2a513be7139b279f1b5b2cee59c6c4950c34346 Mon Sep 17 00:00:00 2001
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Date: Thu, 2 Jun 2022 23:16:57 +0900
Subject: [PATCH] zonefs: fix handling of explicit_open option on mount

Ignoring the explicit_open mount option on mount for devices that do not
have a limit on the number of open zones must be done after the mount
options are parsed and set in s_mount_opts. Move the check to ignore
the explicit_open option after the call to zonefs_parse_options() in
zonefs_fill_super().

Fixes: b5c00e975779 ("zonefs: open/close zone on file open/close")
Cc: <stable@vger.kernel.org>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
index bcb21aea990a..ecce84909ca1 100644
--- a/fs/zonefs/super.c
+++ b/fs/zonefs/super.c
@@ -1760,12 +1760,6 @@ static int zonefs_fill_super(struct super_block *sb, void *data, int silent)
 
 	atomic_set(&sbi->s_wro_seq_files, 0);
 	sbi->s_max_wro_seq_files = bdev_max_open_zones(sb->s_bdev);
-	if (!sbi->s_max_wro_seq_files &&
-	    sbi->s_mount_opts & ZONEFS_MNTOPT_EXPLICIT_OPEN) {
-		zonefs_info(sb, "No open zones limit. Ignoring explicit_open mount option\n");
-		sbi->s_mount_opts &= ~ZONEFS_MNTOPT_EXPLICIT_OPEN;
-	}
-
 	atomic_set(&sbi->s_active_seq_files, 0);
 	sbi->s_max_active_seq_files = bdev_max_active_zones(sb->s_bdev);
 
@@ -1790,6 +1784,12 @@ static int zonefs_fill_super(struct super_block *sb, void *data, int silent)
 	zonefs_info(sb, "Mounting %u zones",
 		    blkdev_nr_zones(sb->s_bdev->bd_disk));
 
+	if (!sbi->s_max_wro_seq_files &&
+	    sbi->s_mount_opts & ZONEFS_MNTOPT_EXPLICIT_OPEN) {
+		zonefs_info(sb, "No open zones limit. Ignoring explicit_open mount option\n");
+		sbi->s_mount_opts &= ~ZONEFS_MNTOPT_EXPLICIT_OPEN;
+	}
+
 	/* Create root directory inode */
 	ret = -ENOMEM;
 	inode = new_inode(sb);


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] zonefs: fix handling of explicit_open option on mount
  2022-06-13  7:36 FAILED: patch "[PATCH] zonefs: fix handling of explicit_open option on mount" failed to apply to 5.18-stable tree gregkh
@ 2022-06-13  9:27 ` Damien Le Moal
  2022-06-13  9:29 ` FAILED: patch "[PATCH] zonefs: fix handling of explicit_open option on mount" failed to apply to 5.18-stable tree Damien Le Moal
  1 sibling, 0 replies; 4+ messages in thread
From: Damien Le Moal @ 2022-06-13  9:27 UTC (permalink / raw)
  To: Greg Kroah-Hartman, stable

Commit a2a513be7139b279f1b5b2cee59c6c4950c34346 upstream.

Ignoring the explicit_open mount option on mount for devices that do not
have a limit on the number of open zones must be done after the mount
options are parsed and set in s_mount_opts. Move the check to ignore
the explicit_open option after the call to zonefs_parse_options() in
zonefs_fill_super().

Fixes: b5c00e975779 ("zonefs: open/close zone on file open/close")
Cc: <stable@vger.kernel.org>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/zonefs/super.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
index e20e7c841489..1c2ece961128 100644
--- a/fs/zonefs/super.c
+++ b/fs/zonefs/super.c
@@ -1690,11 +1690,6 @@ static int zonefs_fill_super(struct super_block *sb, void *data, int silent)
 	sbi->s_mount_opts = ZONEFS_MNTOPT_ERRORS_RO;
 	sbi->s_max_open_zones = bdev_max_open_zones(sb->s_bdev);
 	atomic_set(&sbi->s_open_zones, 0);
-	if (!sbi->s_max_open_zones &&
-	    sbi->s_mount_opts & ZONEFS_MNTOPT_EXPLICIT_OPEN) {
-		zonefs_info(sb, "No open zones limit. Ignoring explicit_open mount option\n");
-		sbi->s_mount_opts &= ~ZONEFS_MNTOPT_EXPLICIT_OPEN;
-	}
 
 	ret = zonefs_read_super(sb);
 	if (ret)
@@ -1713,6 +1708,12 @@ static int zonefs_fill_super(struct super_block *sb, void *data, int silent)
 	zonefs_info(sb, "Mounting %u zones",
 		    blkdev_nr_zones(sb->s_bdev->bd_disk));
 
+	if (!sbi->s_max_open_zones &&
+	    sbi->s_mount_opts & ZONEFS_MNTOPT_EXPLICIT_OPEN) {
+		zonefs_info(sb, "No open zones limit. Ignoring explicit_open mount option\n");
+		sbi->s_mount_opts &= ~ZONEFS_MNTOPT_EXPLICIT_OPEN;
+	}
+
 	/* Create root directory inode */
 	ret = -ENOMEM;
 	inode = new_inode(sb);
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: FAILED: patch "[PATCH] zonefs: fix handling of explicit_open option on mount" failed to apply to 5.18-stable tree
  2022-06-13  7:36 FAILED: patch "[PATCH] zonefs: fix handling of explicit_open option on mount" failed to apply to 5.18-stable tree gregkh
  2022-06-13  9:27 ` [PATCH] zonefs: fix handling of explicit_open option on mount Damien Le Moal
@ 2022-06-13  9:29 ` Damien Le Moal
  2022-06-13  9:46   ` Greg KH
  1 sibling, 1 reply; 4+ messages in thread
From: Damien Le Moal @ 2022-06-13  9:29 UTC (permalink / raw)
  To: gregkh, hch, johannes.thumshirn, stable

On 6/13/22 16:36, gregkh@linuxfoundation.org wrote:
> 
> The patch below does not apply to the 5.18-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 <stable@vger.kernel.org>.
> 
> thanks,
> 
> greg k-h

Hi Greg,

I sent you the fixed backported patch in reply to this email. The same
patch also applies as-is to 5.17, 5.15 and 5.10.

Thanks !

> 
> ------------------ original commit in Linus's tree ------------------
> 
> From a2a513be7139b279f1b5b2cee59c6c4950c34346 Mon Sep 17 00:00:00 2001
> From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> Date: Thu, 2 Jun 2022 23:16:57 +0900
> Subject: [PATCH] zonefs: fix handling of explicit_open option on mount
> 
> Ignoring the explicit_open mount option on mount for devices that do not
> have a limit on the number of open zones must be done after the mount
> options are parsed and set in s_mount_opts. Move the check to ignore
> the explicit_open option after the call to zonefs_parse_options() in
> zonefs_fill_super().
> 
> Fixes: b5c00e975779 ("zonefs: open/close zone on file open/close")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> 
> diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
> index bcb21aea990a..ecce84909ca1 100644
> --- a/fs/zonefs/super.c
> +++ b/fs/zonefs/super.c
> @@ -1760,12 +1760,6 @@ static int zonefs_fill_super(struct super_block *sb, void *data, int silent)
>  
>  	atomic_set(&sbi->s_wro_seq_files, 0);
>  	sbi->s_max_wro_seq_files = bdev_max_open_zones(sb->s_bdev);
> -	if (!sbi->s_max_wro_seq_files &&
> -	    sbi->s_mount_opts & ZONEFS_MNTOPT_EXPLICIT_OPEN) {
> -		zonefs_info(sb, "No open zones limit. Ignoring explicit_open mount option\n");
> -		sbi->s_mount_opts &= ~ZONEFS_MNTOPT_EXPLICIT_OPEN;
> -	}
> -
>  	atomic_set(&sbi->s_active_seq_files, 0);
>  	sbi->s_max_active_seq_files = bdev_max_active_zones(sb->s_bdev);
>  
> @@ -1790,6 +1784,12 @@ static int zonefs_fill_super(struct super_block *sb, void *data, int silent)
>  	zonefs_info(sb, "Mounting %u zones",
>  		    blkdev_nr_zones(sb->s_bdev->bd_disk));
>  
> +	if (!sbi->s_max_wro_seq_files &&
> +	    sbi->s_mount_opts & ZONEFS_MNTOPT_EXPLICIT_OPEN) {
> +		zonefs_info(sb, "No open zones limit. Ignoring explicit_open mount option\n");
> +		sbi->s_mount_opts &= ~ZONEFS_MNTOPT_EXPLICIT_OPEN;
> +	}
> +
>  	/* Create root directory inode */
>  	ret = -ENOMEM;
>  	inode = new_inode(sb);
> 


-- 
Damien Le Moal
Western Digital Research

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: FAILED: patch "[PATCH] zonefs: fix handling of explicit_open option on mount" failed to apply to 5.18-stable tree
  2022-06-13  9:29 ` FAILED: patch "[PATCH] zonefs: fix handling of explicit_open option on mount" failed to apply to 5.18-stable tree Damien Le Moal
@ 2022-06-13  9:46   ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2022-06-13  9:46 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: hch, johannes.thumshirn, stable

On Mon, Jun 13, 2022 at 06:29:13PM +0900, Damien Le Moal wrote:
> On 6/13/22 16:36, gregkh@linuxfoundation.org wrote:
> > 
> > The patch below does not apply to the 5.18-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 <stable@vger.kernel.org>.
> > 
> > thanks,
> > 
> > greg k-h
> 
> Hi Greg,
> 
> I sent you the fixed backported patch in reply to this email. The same
> patch also applies as-is to 5.17, 5.15 and 5.10.

Thanks, now queued up.

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-13  9:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-13  7:36 FAILED: patch "[PATCH] zonefs: fix handling of explicit_open option on mount" failed to apply to 5.18-stable tree gregkh
2022-06-13  9:27 ` [PATCH] zonefs: fix handling of explicit_open option on mount Damien Le Moal
2022-06-13  9:29 ` FAILED: patch "[PATCH] zonefs: fix handling of explicit_open option on mount" failed to apply to 5.18-stable tree Damien Le Moal
2022-06-13  9:46   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.