[RFC] [PATCH] UBI: rewrite of sysfs.c

Artem Bityutskiy Artem.Bityutskiy at nokia.com
Wed Mar 14 05:23:41 EDT 2007


Alexander Schmidt wrote:
> Hi,
> 
> I rewrote the sysfs interface to use struct device instead of struct
> class_device. This implies an interface change, as sysfs files are now
> ordered in a different manner:
> 
> /sys/class/ubi/ubiX/ for device files
> /sys/class/ubi/ubiX_Y/ for volumes
> 
> Before we had
> 
> /sys/class/ubi/ubiX/ for device files
> /sys/class/ubi/ubiX/Y/ for volumes
> 
> Please let me know if you got any objections on this or if you have
> proposals for a better implementation.

Alexander, may I please ask you to to the following experiments with your new changes:

Experiment 1: open sysfs file, and make sure UBI module refcount is increased.
lsmod will help. Please, check this with a UBI device's file and a UBI volume's
file.

Experiment 2: write a program which opens any sysfs file of volume, e.g.,
/sys/class/ubi/ubi0_0/alignment, and keeps it open. Do not close it. Then
remove the corresponding volume (volume 0). Make sure you delete the volume
and do not crash.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list