mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC 0/1] ubi: An interface for dump the mapping between LEBs and PEBs
@ 2023-07-22 10:23 ZhaoLong Wang
  2023-07-22 10:23 ` [RFC 1/1] ubi: An interface is added " ZhaoLong Wang
  0 siblings, 1 reply; 3+ messages in thread
From: ZhaoLong Wang @ 2023-07-22 10:23 UTC (permalink / raw)
  To: richard, miquel.raynal, vigneshr
  Cc: linux-mtd, linux-kernel, chengzhihao1, wangzhaolong1, yi.zhang

When a metadata exception occurs on a device using UBIFS, we can easily
obtain the LEB number of the data exception from the log, but the PEB
number corresponding to the LEB cannot be obtained.

In some production lines, the NAND flash produced by the NAND flash
cannot provide reliable ECC error correction capabilities. The file
system damage is always related to the flash eraseblock exception.
Therefore, I hope that there is a way to quickly obtain the mapping
between LEBs and PEBs in the user space. In this way, the tool of 
user mode can be used to debug possible faulty physical blocks
more conveniently.

Currently, the implementation of this interface is rough. It does
not obtain necessary locks when traversing the entire eba_tbl. Therefore,
this operation race with the volume update process (such as resize and
wear-leveling). As a result, the user mode obtains incorrect mapping
information. However, in practice, when the development and O&M need
to use this interface, frequent volume management operations do not
occur. Therefore, this problem may be tolerated.

I hope the experts will give valuable comments on this patch. If this
interface is acceptable, I'll make it perform as well as I can.

ZhaoLong Wang (1):
  ubi: An interface is added for dump the mapping between LEBs and PEBs

 drivers/mtd/ubi/debug.c | 104 ++++++++++++++++++++++++++++++++++++++++
 drivers/mtd/ubi/eba.c   |  24 ----------
 drivers/mtd/ubi/ubi.h   |  24 ++++++++++
 3 files changed, 128 insertions(+), 24 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-31 13:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-22 10:23 [RFC 0/1] ubi: An interface for dump the mapping between LEBs and PEBs ZhaoLong Wang
2023-07-22 10:23 ` [RFC 1/1] ubi: An interface is added " ZhaoLong Wang
2023-07-31 13:44   ` Zhihao Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®