mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Robert Schwebel <r.schwebel@pengutronix.de>
Subject: Re: [ptxdist] [PATCH] rc-once: make sure data makes it to the medium
Date: Mon, 10 Aug 2020 15:46:15 +0200	[thread overview]
Message-ID: <20200810134615.sipkuohxucftbcy2@pengutronix.de> (raw)
In-Reply-To: <20200810101713.247725-1-r.schwebel@pengutronix.de>


[-- Attachment #1.1: Type: text/plain, Size: 1397 bytes --]

On Mon, Aug 10, 2020 at 12:17:13PM +0200, Robert Schwebel wrote:
> We have seen that, if the first boot runs under a testsuite that powers
> the board off after rc-once is finished, data hasn't found its way to
> the medium. This has been observed to result in an empty ssh key.
> 
> Adding a sync helps.
> 
> Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> ---
>  projectroot/usr/lib/systemd/systemd-rc-once | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/projectroot/usr/lib/systemd/systemd-rc-once b/projectroot/usr/lib/systemd/systemd-rc-once
> index e14936e40..db3d84e3c 100644
> --- a/projectroot/usr/lib/systemd/systemd-rc-once
> +++ b/projectroot/usr/lib/systemd/systemd-rc-once
> @@ -21,6 +21,8 @@ start() {
>  }
>  
>  umount() {
> +	# make sure rc-once generated data makes it to the medium
> +	sync
>  	if ! mount_root_restore; then
>  		# remounting rw/ro during the second boot will flush anything
>  		# left in the filesystem journal

I would expect that the mount -o remount,ro that is done (sometimes) as
part of mount_root_restore should handle this just fine.

How is your use case? Are you muddying the waters of a bug somewhere
else here?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

  reply	other threads:[~2020-08-10 13:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10 10:17 Robert Schwebel
2020-08-10 13:46 ` Uwe Kleine-König [this message]
2020-08-10 13:59   ` Robert Schwebel
2020-08-10 16:03     ` Bruno Thomsen
2020-08-11 10:24       ` Ladislav Michl
2020-08-17  6:18 ` [ptxdist] [APPLIED] " Michael Olbrich

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=20200810134615.sipkuohxucftbcy2@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    --cc=r.schwebel@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox