All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Andrew Murray <amurray@embedded-bits.co.uk>
Cc: Richard Weinberger <richard@nod.at>,
	linux-mtd@lists.infradead.org, dedekind1@gmail.com
Subject: Re: UBI_READWRITE constraint when opening volumes to rename
Date: Tue, 7 Oct 2014 11:49:41 -0300	[thread overview]
Message-ID: <20141007144940.GA13788@arch.hh.imgtec.org> (raw)
In-Reply-To: <CAPcvp5E=MgV0-f8q9SFuMCzCEt-WVQiEu4XGJXj2QLyf5L1ohw@mail.gmail.com>

On 07 Oct 03:31 PM, Andrew Murray wrote:
> Hello,
> 
> I'd like to be able to safely rename a UBI volume that contains a
> mounted UBIFS volume.
> 
> This allows for firmware upgrade via the following steps:
> 
> - ubimkvol rootfs_new
> - ubiupdatevol rootfs_new
> - ubirename rootfs rootfs_old rootfs_new rootfs
> - reboot
> - ubirmvol rootfs_old
> 
> Such an approach makes upgrade of a root filesystem simple as there is
> no need to unmount the root filesystem. I believe this question has
> been asked before on this mailing list
> (http://lists.infradead.org/pipermail/linux-mtd/2012-February/039743.html).
> 
> This process isn't possible at the moment as 'rename_volumes' opens
> the UBI volume with UBI_READWRITE. Unfortunately UBIFS always opens
> UBI with UBI_READWRITE regardless to if the user mounts as read-only.
> If 'rename_volumes' is changed to UBI_READONLY then the above process
> works.
> 

Maybe there's some way to tell UBIFS to pause any writes and switch
to read-only temporarily, while the rename takes place?

Does this make any sense?

> I understand that this patch
> https://patchwork.ozlabs.org/patch/339711/ recently changed the first
> open restraint in 'rename_volumes' from UBI_EXCLUSIVE to
> UBI_READWRITE. I'd like to understand if there are any risks in
> changing it to UBI_READONLY?
> 

-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

  reply	other threads:[~2014-10-07 14:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 14:31 UBI_READWRITE constraint when opening volumes to rename Andrew Murray
2014-10-07 14:49 ` Ezequiel Garcia [this message]
2014-10-09 10:25 ` Ezequiel Garcia
2014-10-09 11:03   ` Andrew Murray
2014-10-10 21:09     ` Richard Weinberger
2014-10-19 20:58       ` Andrew Murray
2014-10-20 11:10         ` Richard Weinberger
2014-10-20 11:40           ` Andrew Murray
2014-10-20 12:02           ` Artem Bityutskiy
2014-10-20 12:42             ` Richard Weinberger
2014-10-20 13:10               ` Artem Bityutskiy
2015-06-24 12:27               ` ir. Tjeerd Pinkert
2015-06-25  7:52                 ` Richard Weinberger
2015-06-25  9:28                   ` ir. Tjeerd Pinkert

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=20141007144940.GA13788@arch.hh.imgtec.org \
    --to=ezequiel.garcia@free-electrons.com \
    --cc=amurray@embedded-bits.co.uk \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /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.