Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Poselenov <sposelenov@emcraft.com>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: UBIFS: file data corruption during the power cut-off test
Date: Thu, 6 Jun 2019 21:08:03 +0300	[thread overview]
Message-ID: <20190606210803.481cbc5d@sergmir.emcraft.com> (raw)
In-Reply-To: <CAFLxGvx4iqpU8pq8CPwah9M+Qa2YkpXEiSmndeVy2mLadNQn_g@mail.gmail.com>

Hello Richard,


On Thu, 6 Jun 2019 16:55:27 +0200 Richard Weinberger <richard.weinberger@gmail.com> wrote:

> On Thu, Jun 6, 2019 at 11:10 AM Sergei Poselenov <sposelenov@emcraft.com> wrote:
> >
> > Hello,
> >
> > We have an embedded system based on i.MX 6ULL, with the root filesystem deployed on a UBI volume built on top of the SLC NAND device. The volume is mounted as "rw,sync,relatime".
> >
> > We are doing the following test:
> >
> >    - Copy the same file (/bin/busybox) to a different file names, in a sequence.
> >
> >    - Power is cut off during the copy sequence.
> >
> >    - After reboot, UBI mounts OK, and we see a number of valid copies of /bin/busybox (md5sum matches), and the last file with the short length (partially written), as expected.
> >
> > The question is: should we expect the last partially-written file to have the valid data of the original? We observe that quite often, the last 512 or so bytes in the short file doesn't match the original.  
> 
> Hm, I don't fully understand your question.
> If you copy files and this is interrupted, the copy is not complete
> and therefore contents are missing.
> 

This is understood. However, on the file length that is written to the partition, I'd expect that the file content will be the same as in the original file. This is not so.
Is it expected, or is it a deficiency of UBI?

Thanks!

Regards,
Sergei

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2019-06-06 18:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06  9:10 UBIFS: file data corruption during the power cut-off test Sergei Poselenov
2019-06-06 14:55 ` Richard Weinberger
2019-06-06 18:08   ` Sergei Poselenov [this message]
2019-06-06 18:13     ` Richard Weinberger
2019-06-07 14:23       ` Sergei Poselenov
2019-06-07 16:01         ` Steve deRosier
2019-06-09  8:32           ` Sergei Poselenov
2019-06-09 15:25             ` Steve deRosier
2019-06-07 16:02         ` Richard Weinberger
2019-06-08  6:42           ` Sergei Poselenov
2019-06-08  8:46             ` Richard Weinberger
2019-06-09  8:18               ` Sergei Poselenov
2019-06-09  8:53                 ` Richard Weinberger
2019-06-09  9:59                   ` Sergei Poselenov
2019-06-09 10:00                     ` Richard Weinberger
2019-06-15  7:26                       ` Sergei Poselenov

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=20190606210803.481cbc5d@sergmir.emcraft.com \
    --to=sposelenov@emcraft.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard.weinberger@gmail.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