public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Anton Mikanovich <amikan@ilbers.de>, isar-users@googlegroups.com
Subject: Re: [PATCH] rootfs: Use separate mounts lock file
Date: Thu, 8 Jul 2021 19:37:11 +0200	[thread overview]
Message-ID: <f56b5d45-7bdf-2548-5544-abf691985add@siemens.com> (raw)
In-Reply-To: <20210708152251.220337-1-amikan@ilbers.de>

On 08.07.21 17:22, Anton Mikanovich wrote:
> MOUNTS_LOCKFILE value inside rootfs.bbclass is overwritten by later
> inherited buildchroot.bbclass. We need to use other value name.
> 
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
>  meta/classes/rootfs.bbclass | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
> index 50d6408..6ce2cf9 100644
> --- a/meta/classes/rootfs.bbclass
> +++ b/meta/classes/rootfs.bbclass
> @@ -26,7 +26,7 @@ export LANG = "C"
>  export LANGUAGE = "C"
>  export LC_ALL = "C"
>  
> -MOUNT_LOCKFILE = "${ROOTFSDIR}.lock"
> +IMAGE_MOUNT_LOCKFILE = "${ROOTFSDIR}.lock"
>  
>  rootfs_do_mounts[weight] = "3"
>  rootfs_do_mounts() {
> @@ -70,7 +70,7 @@ rootfs_do_mounts() {
>                  mount --bind '${REPO_BASE_DIR}' '${ROOTFSDIR}/base-apt'
>          fi
>  
> -        ) 9>'${MOUNT_LOCKFILE}'
> +        ) 9>'${IMAGE_MOUNT_LOCKFILE}'
>  EOSUDO
>  }
>  
> @@ -103,7 +103,7 @@ rootfs_undo_mounts() {
>              umount -R ${ROOTFSDIR}/proc
>          mountpoint -q '${ROOTFSDIR}/dev' && \
>              umount -R ${ROOTFSDIR}/dev
> -        ) 9>'${MOUNT_LOCKFILE}'
> +        ) 9>'${IMAGE_MOUNT_LOCKFILE}'
>  EOSUDO
>  }
>  
> 

Definitely a good catch, but I'm still wrapping my head around it. We
either have really separated rootfs'es here so that separated lock files
are fine, or we rather want rootfs_do_mounts to be locked against
buildchroot_do_mounts as well. At least conceptually, even if they well
never run in parallel in practice. In that case, MOUNT_LOCKFILE in
rootfs.bbclass should be made a weak assignment, to clarify that
buildchroot.bbclass will win, irrespective of any ordering.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

  reply	other threads:[~2021-07-08 17:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08 15:22 Anton Mikanovich
2021-07-08 17:37 ` Jan Kiszka [this message]
2021-07-09 12:43   ` Anton Mikanovich
2021-07-26 14:44   ` Anton Mikanovich
2021-07-26 15:46     ` Baurzhan Ismagulov
2021-07-26 16:01       ` Jan Kiszka
2021-08-18 10:26 ` Anton Mikanovich

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=f56b5d45-7bdf-2548-5544-abf691985add@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=amikan@ilbers.de \
    --cc=isar-users@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox