linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Richard Weinberger <richard@nod.at>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Mike Frysinger <vapier@gentoo.org>,
	Artem Bityutskiy <dedekind1@gmail.com>,
	Michael Opdenacker <michael.opdenacker@free-electrons.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
	Piergiorgio Beruto <piergiorgio.beruto@gmail.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH 1/1] ubi: Introduce block devices for UBI volumes
Date: Sun, 9 Feb 2014 00:37:58 +0100	[thread overview]
Message-ID: <20140208233758.GH22376@1wt.eu> (raw)
In-Reply-To: <52F6BCCD.5070302@nod.at>

On Sun, Feb 09, 2014 at 12:25:01AM +0100, Richard Weinberger wrote:
> Am 09.02.2014 00:15, schrieb Willy Tarreau:
> > On Sun, Feb 09, 2014 at 12:13:11AM +0100, Richard Weinberger wrote:
> >> Am 09.02.2014 00:01, schrieb Willy Tarreau:
> >>> On Sat, Feb 08, 2014 at 11:56:02PM +0100, Richard Weinberger wrote:
> >>>> Am 08.02.2014 23:51, schrieb Willy Tarreau:
> >>>>> On Sat, Feb 08, 2014 at 10:37:19PM +0100, Richard Weinberger wrote:
> >>>>>>> +config MTD_UBI_BLOCK_WRITE_SUPPORT
> >>>>>>> +       bool "Enable write support (DANGEROUS)"
> >>>>>>> +       default n
> >>>>>>> +       depends on MTD_UBI_BLOCK
> >>>>>>> +       select MTD_UBI_BLOCK_CACHED
> >>>>>>> +       help
> >>>>>>> +          This is a *very* dangerous feature. Using a regular block-oriented
> >>>>>>> +          filesystem might impact heavily on a flash device wear.
> >>>>>>> +          Use with extreme caution.
> >>>>>>> +
> >>>>>>> +          If in doubt, say "N".
> >>>>>>
> >>>>>> I really vote for dropping write support at all.
> >>>>>
> >>>>> Why ? When you put a read-only filesystem there such as squashfs, the
> >>>>> only writes you'll have will be updates, and write support will be the
> >>>>> only way to update the filesystem. So removing write support seriously
> >>>>> impacts the usefulness of the feature itself.
> >>>>
> >>>> So almost everyone has to enable MTD_UBI_BLOCK_WRITE_SUPPORT?
> >>>> I thought there is another way to fill the volume with data...
> >>>
> >>> I personally don't see the use of disabling write support on anything
> >>> unless the code is broken. Better emit a warning upon first write to
> >>> mention that there is limited or no wear leveling. But preventing all
> >>> reasonable users from using a useful feature just to save a few ignorant
> >>> from shooting themselves in the foot is non-sense in my opinion.
> >>
> >> As Piergiorgio wrote, one can use ubiupdatevol to update his squashfs.
> >> There is simply no use case for MTD_UBI_BLOCK_WRITE_SUPPORT.
> > 
> > I gave an example with ext2 for the config. It's a bit excessive to
> > quickly declare "there is simply no use case for $put_your_option_here",
> > it just means that *you* don't have this use case, which I perfectly
> > respect.
> 
> The mail with your ext2 use case arrived afterward I've sent that mail.

No problem.

> So you are using ext2 as config filesystem because you're facing issues with ubifs?

No, I've been using ext2 on x86-based hardware and compact flash for
something like 10 years with a great success (easy to mount, easy to
fix, easy to save, easy to occasionally add a backup copy or an extra
data file, etc). I contemplated ubifs on NAND devices as an alternative
when starting to play with ARM-based devices, and lost the reliability
and ability to fix. Switching back to the proven ext2 completely solved
the issues in the end. Ubifs is nice when you need a real read/write FS,
but most small devices do not need wear leveling or any of such nice
features. When you just write 1-10 times a year, other solutions are
fine enough. Using mtdblock directly is not reliable because of bad
blocks which come from time to time. If your FS happens to be located
on one of them, you're screwed. UBI solves such issues and ubiblock
provides a nice interface for this. I even thought about putting the
kernel on top of UBI so that it better resists NAND issues, but some
versions of u-boot do not seem to update it correctly.

In fact, my feeling is that ubiblock provides the same flexibility
with MTD as you have on new devices with eMMC. You have no wear
levelling, and so what ? You never know if your eMMC does it well
either. I even had a series of compactflash which died after a small
number of writes in the past, so that has existed and will always.

Also, all these low-level features on top of MTD are used by people
who try to build systems and who are expected to understand a little
bit some of the limits of the solutions they use. It's not the basic
joe user who will install ext4 on top of ubiblock on his NAND by
himself.

This I think it's a bad idea to artificially remove some features
if they're not broken.

Regards,
Willy

  reply	other threads:[~2014-02-08 23:37 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 20:38 [PATCH 0/1] ubi: Introduce block devices for UBI volumes Ezequiel Garcia
2014-01-29 20:38 ` [PATCH 1/1] " Ezequiel Garcia
2014-01-31 17:06   ` Willy Tarreau
2014-02-04 11:06     ` Ezequiel Garcia
2014-02-08 16:50       ` Ezequiel Garcia
2014-02-08 21:37   ` Richard Weinberger
2014-02-08 22:51     ` Willy Tarreau
2014-02-08 22:56       ` Richard Weinberger
2014-02-08 23:01         ` Willy Tarreau
2014-02-08 23:10           ` Piergiorgio Beruto
2014-02-08 23:13           ` Richard Weinberger
2014-02-08 23:15             ` Willy Tarreau
2014-02-08 23:25               ` Richard Weinberger
2014-02-08 23:37                 ` Willy Tarreau [this message]
2014-02-09  0:17                   ` Richard Weinberger
2014-02-09  7:51                     ` Willy Tarreau
2014-02-10  2:48                       ` Ezequiel Garcia
2014-02-10  7:35                         ` Artem Bityutskiy
2014-02-10  8:27                           ` Ezequiel Garcia
2014-02-10  8:46                             ` Willy Tarreau
2014-02-10 14:20                               ` Ezequiel Garcia
2014-02-10 14:41                                 ` Richard Weinberger
2014-02-10 14:50                                 ` Artem Bityutskiy
2014-02-10 14:52                                   ` Bityutskiy, Artem
2014-02-10 16:15                                     ` Willy Tarreau
2014-02-10 14:53                                   ` Bityutskiy, Artem
2014-02-10 18:48                                   ` Ezequiel Garcia
     [not found]                                     ` <a86d653a-9e3b-46dc-9ec8-94a9c1099bec@email.android.com>
2014-02-10 21:43                                       ` Willy Tarreau
2014-02-11  8:37                                         ` Geert Uytterhoeven
2014-02-11  9:05                                           ` Willy Tarreau
2014-02-11  9:35                                             ` Ezequiel Garcia
2014-02-11  9:43                                           ` Peter Korsgaard
2014-02-11 10:21                                             ` Geert Uytterhoeven
2014-02-10 22:37                                     ` Thomas Petazzoni
     [not found]                                       ` <de976336-3144-4f21-859b-d1a37fc3d811@email.android.com>
2014-02-10 22:46                                         ` Thomas Petazzoni
     [not found]                                           ` <a3fc06a8-c809-4687-9da4-015bd8dd29e8@email.android.com>
2014-02-10 23:01                                             ` Thomas Petazzoni
2014-02-10 23:19                                           ` Ezequiel Garcia
2014-02-10  8:50                             ` Artem Bityutskiy
2014-02-08 23:05         ` Piergiorgio Beruto
2014-02-08 23:13           ` Willy Tarreau
2014-02-10  8:42       ` Thomas Petazzoni
2014-02-10  8:51         ` Willy Tarreau
2014-02-10  1:29     ` Ezequiel Garcia
2014-02-10  7:53       ` Richard Weinberger
2014-02-10  8:12         ` Ezequiel Garcia
2014-02-10  8:24           ` Artem Bityutskiy
2014-02-10  8:37             ` Willy Tarreau
2014-02-10  8:50             ` Ezequiel Garcia
2014-02-09 22:56   ` Richard Weinberger
2014-02-10  2:36     ` Ezequiel Garcia

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=20140208233758.GH22376@1wt.eu \
    --to=w@1wt.eu \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michael.opdenacker@free-electrons.com \
    --cc=piergiorgio.beruto@gmail.com \
    --cc=richard@nod.at \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=vapier@gentoo.org \
    /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;
as well as URLs for NNTP newsgroup(s).