Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1486775
| From | Richard Weinberger <richard@nod.at> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] UBI: add debugfs file for tracking PEB state |
| Date | 2016-09-19 21:10 +0200 |
| Message-ID | <sjc70-Xi-35@gated-at.bofh.it> (permalink) |
| References | <sjbNE-Bs-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Zach,
On 19.09.2016 20:47, Zach Brown wrote:
> + } else {
> + struct ubi_ec_hdr erase_count_header;
> +
> + err = ubi_io_read_ec_hdr(ubi, *block_number,
> + &erase_count_header, 0);
> + if (err && err != UBI_IO_BITFLIPS)
> + r_sts = READ_STATUS_ERR_READING_ERASE_COUNT;
> + else {
> + erase_count = be64_to_cpu(erase_count_header.ec);
> + if (erase_count > UBI_MAX_ERASECOUNTER)
> + b_sts = BLOCK_STATUS_ERASE_COUNT_BEYOND_MAX;
Hmm, why don't you use ubi->lookuptbl[] to get a ubi_wl_entry object, it knows
the erase counter. That way you don't have to read from the flash. If you read
you have to deal with all kind of read errors, including bitflips.
Thanks,
//richard
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] UBI: add debugfs file for tracking PEB state Zach Brown <zach.brown@ni.com> - 2016-09-19 20:50 +0200 Re: [PATCH] UBI: add debugfs file for tracking PEB state Richard Weinberger <richard@nod.at> - 2016-09-19 21:10 +0200 Re: [PATCH] UBI: add debugfs file for tracking PEB state kbuild test robot <lkp@intel.com> - 2016-09-19 21:50 +0200
csiph-web