ubi: Expose mean erase counter in sysfs
Subsystems (2)
PATCH 1/4 ubi: Expose mean erase counter in sysfs
Currently, only "max_ec" can be read from sysfs, which provides a limited view of the flash device’s wear. In certain cases, such as bugs in the wear-leveling algorithm, specific blocks can be worn down more than others, resulting in uneven wear distribution. Providing a mean erase counter value gives a better understanding of the overall flash wear.
There exists more detailed info in debugfs, but this information is only available for debug builds.
This patch calculates the mean value only when it is requested. This calculation typically takes 2.7 ms for an UBI device with 4091 blocks running on a single core Cortex-A9 at 792 MHz.
--- drivers/mtd/ubi/build.c | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+)
drivers/mtd/ubi/build.c +44 -0
@@ -131,6 +131,8 @@ static struct device_attribute dev_volumes_count =__ATTR (volumes_count,S_IRUGO , dev_attribute_show,NULL );static struct device_attribute dev_max_ec =__ATTR (max_ec,S_IRUGO , dev_attribute_show,NULL ); +static struct device_attribute dev_mean_ec = +__ATTR (mean_ec,S_IRUGO , dev_attribute_show,NULL );static struct device_attribute dev_reserved_for_bad =__ATTR (reserved_for_bad,S_IRUGO , dev_attribute_show,NULL ); static struct device_attribute dev_bad_peb_count =
@@ -340,6 +342,45 @@ int ubi_major2num(int major)return ubi_num; } +/** +* ubi_calc_mean_ec - calculate mean erase counter value. +* @ubi: UBI device description object +* +* Returns the mean value of the all blocks of the device. +* Returns zero if it was not possible to calculate the mean value. +*/ +int ubi_calc_mean_ec (struct ubi_device *ubi) +{ +struct ubi_wl_entry *wl; +int peb; +int ec_count =0 ; +int mean_ec =0 ; +uint64_t ec_sum =0 ; + +for (peb =0 ; peb < ubi->peb_count; peb++) { +int err; + + err =ubi_io_is_bad (ubi, peb); +if (err) +continue ; + +spin_lock (&ubi->wl_lock); + + wl = ubi->lookuptbl[peb]; +if (wl) { + ec_sum += wl->ec; + ec_count++; + } + +spin_unlock (&ubi->wl_lock); + } + +if (ec_count >0 ) + mean_ec =div_u64 (ec_sum, ec_count); + +return mean_ec; +} +/* "Show" method for files in '/<sysfs>/class/ubi/ubiX/' */ static ssize_t dev_attribute_show (struct device *dev,struct device_attribute *attr,char *buf)
@@ -369,6 +410,8 @@ static ssize_t dev_attribute_show(struct device *dev, ret =sprintf (buf,"%d\n" , ubi->vol_count -UBI_INT_VOL_COUNT ); else if (attr == &dev_max_ec) ret =sprintf (buf,"%d\n" , ubi->max_ec); + else if (attr == &dev_mean_ec) + ret =sprintf (buf,"%d\n" ,ubi_calc_mean_ec (ubi)); else if (attr == &dev_reserved_for_bad) ret =sprintf (buf,"%d\n" , ubi->beb_rsvd_pebs); else if (attr == &dev_bad_peb_count)
@@ -395,6 +438,7 @@ static struct attribute *ubi_dev_attrs[] = { &dev_total_eraseblocks.attr, &dev_volumes_count.attr, &dev_max_ec.attr, + &dev_mean_ec.attr, &dev_reserved_for_bad.attr, &dev_bad_peb_count.attr, &dev_max_vol_count.attr,
Signature · 6 lines
2.30.2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 2/4 ubi: Expose mean erase counter for fastmap in sysfs
Since the fastmap area has its own wear levelling it is valuable to provide a mean value for that area. This value can be used in order to estimate life expectancy of the flash.
--- drivers/mtd/ubi/build.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-)
drivers/mtd/ubi/build.c +24 -5
@@ -133,6 +133,8 @@ static struct device_attribute dev_max_ec =__ATTR (max_ec,S_IRUGO , dev_attribute_show,NULL );static struct device_attribute dev_mean_ec =__ATTR (mean_ec,S_IRUGO , dev_attribute_show,NULL ); +static struct device_attribute dev_mean_ec_fastmap = +__ATTR (mean_ec_fastmap,S_IRUGO , dev_attribute_show,NULL );static struct device_attribute dev_reserved_for_bad =__ATTR (reserved_for_bad,S_IRUGO , dev_attribute_show,NULL ); static struct device_attribute dev_bad_peb_count =
@@ -345,19 +347,33 @@ int ubi_major2num(int major)/** * ubi_calc_mean_ec - calculate mean erase counter value. * @ubi: UBI device description object +* @fastmap: true if mean value of just the fastmap area should be calculated * -* Returns the mean value of the all blocks of the device. -* Returns zero if it was not possible to calculate the mean value. +* Returns the mean value of the all non-bad blocks of the device if fastmap is +* false. +* If fastmap is true then only a mean value of the fastmap area is calculated. +* Returns zero if it was not possible to calculate the mean value or if no +* fastmap exists. */ -int ubi_calc_mean_ec (struct ubi_device *ubi) +int ubi_calc_mean_ec (struct ubi_device *ubi,bool fastmap) {struct ubi_wl_entry *wl;int peb;int ec_count =0 ; +int peb_count;int mean_ec =0 ;uint64_t ec_sum =0 ; -for (peb =0 ; peb < ubi->peb_count; peb++) { + peb_count = ubi->peb_count; + +if (fastmap) { +if ((!ubi->fm_disabled) && (peb_count >UBI_FM_MAX_START )) + peb_count =UBI_FM_MAX_START ; +else +return 0 ;/* No fastmap on this UBI device */ + } + +for (peb =0 ; peb < peb_count; peb++) {int err; err =ubi_io_is_bad (ubi, peb);
@@ -411,7 +427,9 @@ static ssize_t dev_attribute_show(struct device *dev,else if (attr == &dev_max_ec) ret =sprintf (buf,"%d\n" , ubi->max_ec);else if (attr == &dev_mean_ec) - ret =sprintf (buf,"%d\n" ,ubi_calc_mean_ec (ubi)); + ret =sprintf (buf,"%d\n" ,ubi_calc_mean_ec (ubi, false)); +else if (attr == &dev_mean_ec_fastmap) + ret =sprintf (buf,"%d\n" ,ubi_calc_mean_ec (ubi, true));else if (attr == &dev_reserved_for_bad) ret =sprintf (buf,"%d\n" , ubi->beb_rsvd_pebs);else if (attr == &dev_bad_peb_count)
@@ -439,6 +457,7 @@ static struct attribute *ubi_dev_attrs[] = { &dev_volumes_count.attr, &dev_max_ec.attr, &dev_mean_ec.attr, + &dev_mean_ec_fastmap.attr, &dev_reserved_for_bad.attr, &dev_bad_peb_count.attr, &dev_max_vol_count.attr,
Signature · 6 lines
2.30.2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Zhihao Cheng
reviewerRe: [PATCH 2/4] ubi: Expose mean erase counter for fastmap in sysfs
Quoted 4 lines · Rickard Andersson
Since the fastmap area has its own wear levelling it is valuable to provide a mean value for that area. This value can be used in order to estimate life expectancy of the flash.
There are 2 cases shown as following:
1) fastmap is disabled: We can determine whether the wear-leveling algorithm works fine by comparing 'max_ec' with 'mean_ec'.
2) fastmap is enabled: The max_ec may come from first 64 PEBs(fastmap area), or it may come from data area(pnum > 64), how can we determine whether the wear-leveling algorithm works fine for data area?
Quoted 37 lines
Signed-off-by Rickard Andersson <[email protected]>--- drivers/mtd/ubi/build.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-)drivers/mtd/ubi/build.c +9
-3@@ -133,6 +133,8 @@ static struct device_attribute dev_max_ec =__ATTR (max_ec,S_IRUGO , dev_attribute_show,NULL );static struct device_attribute dev_mean_ec =__ATTR (mean_ec,S_IRUGO , dev_attribute_show,NULL ); +static struct device_attribute dev_mean_ec_fastmap = +__ATTR (mean_ec_fastmap,S_IRUGO , dev_attribute_show,NULL );static struct device_attribute dev_reserved_for_bad =__ATTR (reserved_for_bad,S_IRUGO , dev_attribute_show,NULL ); static struct device_attribute dev_bad_peb_count =@@ -345,19 +347,33 @@ int ubi_major2num(int major)/** * ubi_calc_mean_ec - calculate mean erase counter value. * @ubi: UBI device description object +* @fastmap: true if mean value of just the fastmap area should be calculated * -* Returns the mean value of the all blocks of the device. -* Returns zero if it was not possible to calculate the mean value. +* Returns the mean value of the all non-bad blocks of the device if fastmap is +* false. +* If fastmap is true then only a mean value of the fastmap area is calculated. +* Returns zero if it was not possible to calculate the mean value or if no +* fastmap exists. */ -int ubi_calc_mean_ec (struct ubi_device *ubi) +int ubi_calc_mean_ec (struct ubi_device *ubi,bool fastmap) {struct ubi_wl_entry *wl;int peb;
drivers/mtd/ubi/build.c int ubi_major2num(int major) · line 370
Quoted 10 lines
drivers/mtd/ubi/build.c +5
-1int ec_count =0 ; +int peb_count;int mean_ec =0 ;uint64_t ec_sum =0 ; -for (peb =0 ; peb < ubi->peb_count; peb++) { + peb_count = ubi->peb_count; + +if (fastmap) { +if ((!ubi->fm_disabled) && (peb_count >UBI_FM_MAX_START ))
'if (!ubi->fm_disabled))' is enough.
drivers/mtd/ubi/build.c int ubi_major2num(int major) · line 373
Quoted 3 lines
drivers/mtd/ubi/build.c +3
-0+ peb_count =UBI_FM_MAX_START ; + else + return 0; /* No fastmap on this UBI device */
If we format /dev/mtdX by command 'ubiformat -e 0', the return value '0' may confuse us, it means that the fastmap is disabled or the mean_ec_fastmap is 0.
Quoted 19 lines
drivers/mtd/ubi/build.c +6
-1+ } + +for (peb =0 ; peb < peb_count; peb++) {int err; err =ubi_io_is_bad (ubi, peb);@@ -411,7 +427,9 @@ static ssize_t dev_attribute_show(struct device *dev,else if (attr == &dev_max_ec) ret =sprintf (buf,"%d\n" , ubi->max_ec);else if (attr == &dev_mean_ec) - ret =sprintf (buf,"%d\n" ,ubi_calc_mean_ec (ubi)); + ret =sprintf (buf,"%d\n" ,ubi_calc_mean_ec (ubi, false)); +else if (attr == &dev_mean_ec_fastmap) + ret =sprintf (buf,"%d\n" ,ubi_calc_mean_ec (ubi, true));else if (attr == &dev_reserved_for_bad) ret =sprintf (buf,"%d\n" , ubi->beb_rsvd_pebs);else if (attr == &dev_bad_peb_count)
drivers/mtd/ubi/build.c static struct attribute *ubi_dev_attrs[] = { · line 463
Quoted 7 lines
drivers/mtd/ubi/build.c +1
-0@@ -439,6 +457,7 @@ static struct attribute *ubi_dev_attrs[] = { &dev_volumes_count.attr, &dev_max_ec.attr, &dev_mean_ec.attr, + &dev_mean_ec_fastmap.attr, &dev_reserved_for_bad.attr, &dev_bad_peb_count.attr, &dev_max_vol_count.attr,
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 2/4] ubi: Expose mean erase counter for fastmap in sysfs
Quoted 9 lines · Zhihao Cheng
Quoted 4 lines · Rickard Andersson
Since the fastmap area has its own wear levelling it is valuable to provide a mean value for that area. This value can be used in order to estimate life expectancy of the flash.
There are 2 cases shown as following:
1) fastmap is disabled: We can determine whether the wear-leveling algorithm works fine by comparing 'max_ec' with 'mean_ec'.
2) fastmap is enabled: Themax_ecmay come from first 64 PEBs(fastmap area), or it may come from data area(pnum > 64), how can we determine whether the wear-leveling algorithm works fine for data area?
Thanks for the feedback.
My main goal is to provide mean values to determine how worn down the flash is. I am sort of assuming that the wear leveling algorithm works but that it previously had bugs, which made it difficult to use max_ec to get a complete picture of the wear. I could add max_ec_fastmap for symmetry if you want? Then I will make max_ec_fastmap cover blocks 0 - 63, and max_ec will cover 0 - LAST_BLOCK.
Quoted 7 lines
'if (!ubi->fm_disabled))' is enough.
Quoted 3 lines
+
peb_count=UBI_FM_MAX_START;
+ else
+ return 0; /* No fastmap on this UBI device */If we format
/dev/mtdXby command 'ubiformat -e 0', the return value '0' may confuse us, it means that the fastmap is disabled or themean_ec_fastmapis 0.
Do you prefer the function "dev_attribute_show" to return -ENODEV in case we have no fastmap? I.e this behavior:
/sys/class/ubi/ubi0 # cat mean_ec_fastmap
cat: read error: No such device
Best regards,
Rickard Andersson
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Zhihao Cheng
reviewerRe: [PATCH 2/4] ubi: Expose mean erase counter for fastmap in sysfs
Quoted 7 lines · Rickard x Andersson
Quoted 6 lines · Zhihao Cheng
Quoted 4 lines · Rickard Andersson
Since the fastmap area has its own wear levelling it is valuable to provide a mean value for that area. This value can be used in order to estimate life expectancy of the flash.
Quoted 9 lines
Quoted 3 lines
There are 2 cases shown as following:
1) fastmap is disabled: We can determine whether the wear-leveling algorithm works fine by comparing 'max_ec' with 'mean_ec'.
2) fastmap is enabled: Themax_ecmay come from first 64 PEBs(fastmap area), or it may come from data area(pnum > 64), how can we determine whether the wear-leveling algorithm works fine for data area?Thanks for the feedback.
My main goal is to provide mean values to determine how worn down the flash is. I am sort of assuming that the wear leveling algorithm works but that it previously had bugs, which made it difficult to use
max_ecto get a complete picture of the wear. I could addmax_ec_fastmapfor symmetry if you want? Then I will makemax_ec_fastmapcover blocks 0 - 63, andmax_ecwill cover 0 -LAST_BLOCK.
How about providing four variables:
1. mean_ec_data: mean ec for data area
2. max_ec_data:max ec for data area
3. mean_ec_fastmap:mean ec for fastmap area
4. max_ec_fastmap:max ec for fastmap area
If CONFIG_MTD_UBI_FASTMAP is enabled, all variables are displayed under sysfs, mean_ec_data and max_ec_data are calculated by 64~LAST_PEB, mean_ec_fastmap and max_ec_fastmap are calculated by 0~64 PEBs, despite whatever 'ubi->fm_disabled' is. If CONFIG_MTD_UBI_FASTMAP is disabled, only mean_ec_data and max_ec_data are displayed under sysfs, the mean_ec_data and max_ec_data are calculated by all PEBs.
Quoted 10 lines
Quoted 7 lines
'if (!ubi->fm_disabled))' is enough.
Quoted 3 lines
+
peb_count=UBI_FM_MAX_START;
+ else
+ return 0; /* No fastmap on this UBI device */If we format
/dev/mtdXby command 'ubiformat -e 0', the return value '0' may confuse us, it means that the fastmap is disabled or themean_ec_fastmapis 0.Do you prefer the function "
dev_attribute_show" to return-ENODEVin case we have no fastmap? I.e this behavior:
Quoted 8 lines
/sys/class/ubi/ubi0# catmean_ec_fastmap
cat: read error: No such deviceBest regards,
Rickard Andersson.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Zhihao Cheng
reviewerRe: [PATCH 2/4] ubi: Expose mean erase counter for fastmap in sysfs
Quoted 18 lines · Zhihao Cheng
Quoted 7 lines · Rickard x Andersson
Quoted 6 lines · Zhihao Cheng
Quoted 4 lines · Rickard Andersson
Since the fastmap area has its own wear levelling it is valuable to provide a mean value for that area. This value can be used in order to estimate life expectancy of the flash.
Quoted 9 lines
Quoted 3 lines
There are 2 cases shown as following:
1) fastmap is disabled: We can determine whether the wear-leveling algorithm works fine by comparing 'max_ec' with 'mean_ec'.
2) fastmap is enabled: Themax_ecmay come from first 64 PEBs(fastmap area), or it may come from data area(pnum > 64), how can we determine whether the wear-leveling algorithm works fine for data area?Thanks for the feedback.
My main goal is to provide mean values to determine how worn down the flash is. I am sort of assuming that the wear leveling algorithm works but that it previously had bugs, which made it difficult to use
max_ecto get a complete picture of the wear. I could addmax_ec_fastmapfor symmetry if you want? Then I will makemax_ec_fastmapcover blocks 0 - 63, andmax_ecwill cover 0 -LAST_BLOCK.
Quoted 9 lines
How about providing four variables:
1.mean_ec_data: mean ec for data area
2. max_ec_data:max ec for data area
3. mean_ec_fastmap:mean ec for fastmap area
4. max_ec_fastmap:max ec for fastmap areaIf
CONFIG_MTD_UBI_FASTMAPis enabled, all variables are displayed under sysfs,mean_ec_dataandmax_ec_dataare calculated by 64~LAST_PEB,mean_ec_fastmapandmax_ec_fastmapare calculated by 0~64 PEBs, despite whatever 'ubi->fm_disabled' is. IfCONFIG_MTD_UBI_FASTMAPis disabled, onlymean_ec_dataandmax_ec_dataare displayed under sysfs, themean_ec_dataandmax_ec_dataare calculated by all PEBs.
Besides that, you can add a variable named mean_ec which could store the average ec counter from all PEBs, so you can know the overall worn down of the flash. Although this value can be calculated by mean_ec_fastmap, mean_ec_data and total_eraseblocks.
Quoted 17 lines
Quoted 17 lines
Quoted 7 lines
'if (!ubi->fm_disabled))' is enough.
Quoted 3 lines
+
peb_count=UBI_FM_MAX_START;
+ else
+ return 0; /* No fastmap on this UBI device */If we format
/dev/mtdXby command 'ubiformat -e 0', the return value '0' may confuse us, it means that the fastmap is disabled or themean_ec_fastmapis 0.Do you prefer the function "
dev_attribute_show" to return-ENODEVin case we have no fastmap? I.e this behavior:
/sys/class/ubi/ubi0# catmean_ec_fastmap
cat: read error: No such deviceBest regards,
Rickard Andersson
Quoted 6 lines
Quoted 1 line
.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 3/4 ubi: Add mean erase counter sysfs attribute
In reply to Rickard AnderssonA mean erase counter gives a better understanding of the flash wear.
--- Documentation/ABI/stable/sysfs-class-ubi | 7 +++++++ 1 file changed, 7 insertions(+)
Documentation/ABI/stable/sysfs-class-ubi +7 -0
@@ -219,3 +219,10 @@ Description: Logical eraseblock size of this volume. Equivalent to logical eraseblock size of the device aligned on the volume alignment value. + +What: /sys/class/ubi/ubiX/mean_ec +Date: October 2024 +KernelVersion: 6.X +Contact: [email protected] +Description: + Mean physical eraseblock erase counter value.
Signature · 6 lines
2.30.2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 4/4 ubi: Add mean erase counter sysfs attribute for fastmap area
In reply to Rickard AnderssonA mean erase counter gives a better understanding of the flash wear of the fastmap area.
--- Documentation/ABI/stable/sysfs-class-ubi | 8 ++++++++ 1 file changed, 8 insertions(+)
Documentation/ABI/stable/sysfs-class-ubi +8 -0
@@ -226,3 +226,11 @@ KernelVersion: 6.X Contact: [email protected] Description: Mean physical eraseblock erase counter value. + +What: /sys/class/ubi/ubiX/mean_ec_fastmap +Date: October 2024 +KernelVersion: 6.X +Contact: [email protected] +Description: + Mean physical eraseblock erase counter value for the fastmap + area.
Signature · 6 lines
2.30.2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Zhihao Cheng
reviewerQuoted 33 lines · Rickard Andersson
Currently, only "
max_ec" can be read from sysfs, which provides a limited view of the flash device’s wear. In certain cases, such as bugs in the wear-leveling algorithm, specific blocks can be worn down more than others, resulting in uneven wear distribution. Providing a mean erase counter value gives a better understanding of the overall flash wear.
There exists more detailed info in debugfs, but this information is only available for debug builds.This patch calculates the mean value only when it is requested. This calculation typically takes 2.7 ms for an UBI device with 4091 blocks running on a single core Cortex-A9 at 792 MHz.
Signed-off-by Rickard Andersson <[email protected]>--- drivers/mtd/ubi/build.c | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+)drivers/mtd/ubi/build.c +2
-0@@ -131,6 +131,8 @@ static struct device_attribute dev_volumes_count =__ATTR (volumes_count,S_IRUGO , dev_attribute_show,NULL );static struct device_attribute dev_max_ec =__ATTR (max_ec,S_IRUGO , dev_attribute_show,NULL ); +static struct device_attribute dev_mean_ec = +__ATTR (mean_ec,S_IRUGO , dev_attribute_show,NULL );static struct device_attribute dev_reserved_for_bad =__ATTR (reserved_for_bad,S_IRUGO , dev_attribute_show,NULL ); static struct device_attribute dev_bad_peb_count =@@ -340,6 +342,45 @@ int ubi_major2num(int major)return ubi_num;
drivers/mtd/ubi/build.c int ubi_major2num(int major) · line 352
Quoted 10 lines
drivers/mtd/ubi/build.c +8
-0} +/** +* ubi_calc_mean_ec - calculate mean erase counter value. +* @ubi: UBI device description object +* +* Returns the mean value of the all blocks of the device. +* Returns zero if it was not possible to calculate the mean value. +*/ +int ubi_calc_mean_ec (struct ubi_device *ubi)
static int ubi_calc_mean_ec(struct ubi_device *ubi)
Quoted 45 lines
drivers/mtd/ubi/build.c +33
-0+{ +struct ubi_wl_entry *wl; +int peb; +int ec_count =0 ; +int mean_ec =0 ; +uint64_t ec_sum =0 ; + +for (peb =0 ; peb < ubi->peb_count; peb++) { +int err; + + err =ubi_io_is_bad (ubi, peb); +if (err) +continue ; + +spin_lock (&ubi->wl_lock); + + wl = ubi->lookuptbl[peb]; +if (wl) { + ec_sum += wl->ec; + ec_count++; + } + +spin_unlock (&ubi->wl_lock); + } + +if (ec_count >0 ) + mean_ec =div_u64 (ec_sum, ec_count); + +return mean_ec; +} +/* "Show" method for files in '/<sysfs>/class/ubi/ubiX/' */ static ssize_t dev_attribute_show (struct device *dev,struct device_attribute *attr,char *buf)@@ -369,6 +410,8 @@ static ssize_t dev_attribute_show(struct device *dev, ret =sprintf (buf,"%d\n" , ubi->vol_count -UBI_INT_VOL_COUNT ); else if (attr == &dev_max_ec) ret =sprintf (buf,"%d\n" , ubi->max_ec); + else if (attr == &dev_mean_ec) + ret =sprintf (buf,"%d\n" ,ubi_calc_mean_ec (ubi)); else if (attr == &dev_reserved_for_bad) ret =sprintf (buf,"%d\n" , ubi->beb_rsvd_pebs); else if (attr == &dev_bad_peb_count)
drivers/mtd/ubi/build.c static struct attribute *ubi_dev_attrs[] = { · line 444
Quoted 7 lines
drivers/mtd/ubi/build.c +1
-0@@ -395,6 +438,7 @@ static struct attribute *ubi_dev_attrs[] = { &dev_total_eraseblocks.attr, &dev_volumes_count.attr, &dev_max_ec.attr, + &dev_mean_ec.attr, &dev_reserved_for_bad.attr, &dev_bad_peb_count.attr, &dev_max_vol_count.attr,
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/