UBI scrubbing behavior when readonly
Zhihao Cheng
chengzhihao1 at huawei.com
Thu Dec 7 18:00:25 PST 2023
在 2023/12/8 1:56, Chuck Meade 写道:
> Hello,
>
> Does UBI scrubbing (moving data to new PEB when read operations report
> ECC
> bitflips) still occur when a UBIFS mounted on the UBI volume is
> readonly, in
> terms of Linux filesystem permissions?
>
> I have looked at the UBI source for scrubbing, and it appears that it
> will not
> occur when the UBI device (or MTD partition to which the device is
> attached)
> is in readonly mode. But what if the UBI device is in read/write mode,
> but the
> UBIFS mounted on the device is in readonly mode?
>
Does 'UBI scrubbing' mean the wear_leveling_worker(e1 comes from
ubi->scrub)? If so, I think it still work when UBI is rw mode and ubifs
is readonly. For example: ubifs_leb_read -> ubi_leb_read ->
ubi_eba_read_leb -> ubi_wl_scrub_peb: wl_tree_add(e, &ubi->scrub) &&
ensure_wear_leveling
> I am trying to create a configuration where the UBIFS is readonly at
> the Linux
> filesystem permissions level, but UBI scrubbing still occurs when read
> operations report enough ECC bitflips. So no Linux userspace programs
> may
> modify the filesystem due to permissions, but UBI scrubbing still
> would occur.
>
> Is this possible, or am I missing something in the UBI source code?
>
> Thanks,
> Chuck
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
More information about the linux-mtd
mailing list