All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Bence Csókás" <csokas.bence@prolan.hu>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	"Csókás, Michael Walle" <mwalle@kernel.org>,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>
Subject: Re: [PATCH v2] mtd: Verify written data in paranoid mode
Date: Mon, 12 May 2025 10:06:09 +0200	[thread overview]
Message-ID: <874ixqp826.fsf@bootlin.com> (raw)
In-Reply-To: <20250508183733.514124-3-csokas.bence@prolan.hu> ("Bence Csókás"'s message of "Thu, 8 May 2025 20:37:34 +0200")

Hello,

On 08/05/2025 at 20:37:34 +02, Bence Csókás <csokas.bence@prolan.hu> wrote:

> From: Csókás, Bence <csokas.bence@prolan.hu>
>
> Add MTD_PARANOID config option for verifying all written data to prevent
> silent bit errors being undetected, at the cost of some bandwidth overhead.
>
> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
> ---

...

> +int mtd_write_oob(struct mtd_info *mtd, loff_t to,
> +		  struct mtd_oob_ops *ops)
> +{
> +	int ret = _mtd_write_oob(mtd, to, ops);
> +
> +#if IS_ENABLED(CONFIG_MTD_PARANOID)
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = _mtd_verify(mtd, to, ops->retlen, ops->datbuf);
> +#endif // CONFIG_MTD_PARANOID
> +	return ret;
> +}

I'd prefer to extend mtd_write_oob() with a simple

    if (IS_ENABLED(CONFIG_MTD_PARANOID))
            mtd_verify();

It will also likely solve the kernel test robot report.

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Bence Csókás" <csokas.bence@prolan.hu>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	"Csókás, Michael Walle" <mwalle@kernel.org>,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>
Subject: Re: [PATCH v2] mtd: Verify written data in paranoid mode
Date: Mon, 12 May 2025 10:06:09 +0200	[thread overview]
Message-ID: <874ixqp826.fsf@bootlin.com> (raw)
In-Reply-To: <20250508183733.514124-3-csokas.bence@prolan.hu> ("Bence Csókás"'s message of "Thu, 8 May 2025 20:37:34 +0200")

Hello,

On 08/05/2025 at 20:37:34 +02, Bence Csókás <csokas.bence@prolan.hu> wrote:

> From: Csókás, Bence <csokas.bence@prolan.hu>
>
> Add MTD_PARANOID config option for verifying all written data to prevent
> silent bit errors being undetected, at the cost of some bandwidth overhead.
>
> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
> ---

...

> +int mtd_write_oob(struct mtd_info *mtd, loff_t to,
> +		  struct mtd_oob_ops *ops)
> +{
> +	int ret = _mtd_write_oob(mtd, to, ops);
> +
> +#if IS_ENABLED(CONFIG_MTD_PARANOID)
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = _mtd_verify(mtd, to, ops->retlen, ops->datbuf);
> +#endif // CONFIG_MTD_PARANOID
> +	return ret;
> +}

I'd prefer to extend mtd_write_oob() with a simple

    if (IS_ENABLED(CONFIG_MTD_PARANOID))
            mtd_verify();

It will also likely solve the kernel test robot report.

Thanks,
Miquèl

  parent reply	other threads:[~2025-05-12  8:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08 18:37 [PATCH v2] mtd: Verify written data in paranoid mode Bence Csókás
2025-05-08 18:37 ` Bence Csókás
2025-05-09  5:28 ` kernel test robot
2025-05-09  5:28   ` kernel test robot
2025-05-12  8:06 ` Miquel Raynal [this message]
2025-05-12  8:06   ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874ixqp826.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=csokas.bence@prolan.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mwalle@kernel.org \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.