All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Charles Manning <manningc2@actrix.gen.nz>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: UBIFS robustness questions
Date: Sat, 25 Jul 2009 00:39:36 +0100	[thread overview]
Message-ID: <20090724233936.GP27755@shareable.org> (raw)
In-Reply-To: <4A6986FC.6070006@nokia.com>

Adrian Hunter wrote:
> Sorry to drag this out but it seems like it can be done with symlinks

That's right.  It should be powerfail safe.
Don't forget to "rm -fr version1" at the end :-)

However, if you are looking to use this for atomic update of a
directory while there are programs still running which use the
directory, it won't work.

You can't delete the old directory, because programs might still be
inside it...

It's not even always safe to kill and restart the programs after
renaming the symlink, because they might read some files from the new
directory before they've finished reading other files from the old
directory.

Regarding powerfail safety, it means you might have to defer deleting
the old directory until some major system action, like the next reboot.

-- Jamie

  reply	other threads:[~2009-07-24 23:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-24  4:00 UBIFS robustness questions Charles Manning
2009-07-24  6:03 ` Artem Bityutskiy
2009-07-24  6:43 ` Adrian Hunter
2009-07-24  9:24   ` Adrian Hunter
2009-07-24 10:03     ` Adrian Hunter
2009-07-24 23:39       ` Jamie Lokier [this message]
2009-07-26  6:29         ` Adrian Hunter
2009-07-26 19:21           ` Jamie Lokier
2009-07-27  8:09             ` Adrian Hunter

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=20090724233936.GP27755@shareable.org \
    --to=jamie@shareable.org \
    --cc=adrian.hunter@nokia.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=manningc2@actrix.gen.nz \
    /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.