- 21 9月, 2009 1 次提交
-
-
由 Anand Gadiyar 提交于
Signed-off-by: NAnand Gadiyar <gadiyar@ti.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 25 7月, 2009 2 次提交
-
-
由 Adrian Hunter 提交于
Fall back onto thinking everything's OK if either of the sequence numbers we are asked to compare is zero, which is what was used before sequence numbers were introduced. [ Artem: modified the patch to be applicable to upstream UBI, added big comment ] Signed-off-by: NAdrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: NPhil Carmody <ext-phil.2.carmody@nokia.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Adrian Hunter 提交于
If we fail in 'ubi_eba_init_scan()', we free 'ubi->volumes[i]->eba_tbl' in there, but also later free it in 'free_internal_volumes()'. Fix this by assigning NULL to 'ubi->volumes[i]->eba_tbl' after it is freed. Signed-off-by: NAdrian Hunter <adrian.hunter@nokia.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 15 7月, 2009 2 次提交
-
-
由 Holger Brunck 提交于
This patch fixes a bug in the image seq. number handling in the scanning level. The assignment of the image_seq was incorrect. Signed-off-by: NHolger Brunck <holger.brunck@keymile.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
Do not forget to initialize 'gluebi->ubi_num' because otherwise it will stay 0 even for ubi1 device, and gluebi will open wrong UBI device when 'gluebi_get_device()' is called. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 08 7月, 2009 1 次提交
-
-
由 Artem Bityutskiy 提交于
The recent "UBI: fix NOR flash recovery" introduced compilation warnings which were immediately spotted by our linux-next keeper. This patch fixes them. Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 07 7月, 2009 1 次提交
-
-
由 Artem Bityutskiy 提交于
This commit fixes NOR flash recovery issues observed with Spansion S29GL512N NOR. When NOR erases, it first fills PEBs with zeroes, then sets all bytes to 0xFF. Filling with zeroes starts from the end of the PEB. And when power is cut, this results in PEBs containing correct EC and VID headers but corrupted with zeros at the end. This confuses UBI and it mistakinly accepts these PEBs and associate them with LEBs. Fis this issue by zeroing EC and VID magics before erasing PEBs, to make UBI later refuse zem. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 05 7月, 2009 4 次提交
-
-
由 Artem Bityutskiy 提交于
Move the image seq. number handling from I/O level to the scanning lever, where it really belongs to. Move the @image_seq_set variable to the @struct ubi_scan_info structure, which exists only during scanning. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Adrian Hunter 提交于
An image sequence number is added to the UBI erase-counter header to be able determine if the root file system contains a mixture of old and new images (because the flashing failed to complete). A change to nolo is also needed for this to take effect. Signed-off-by: NAdrian Hunter <adrian.hunter@nokia.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
The 'paranoid_check_empty()' is bogus because, which is easilly seen on NOR flash, which has long erase cycles, and which may easilly end-up with half-erased eraseblocks. In this case the paranoid check fails. I is just wrong to assume that PEBs which do not have EC headers always contain all 0xFF. Such assumption should not be made on the I/O level, which is quite low. Thus, just kill the check. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
This patch adds code which makes sure eraseblocks contain all 0xFF bytes before starting using them. The verification is done only when debugging checks are enabled. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 10 6月, 2009 4 次提交
-
-
由 Kevin Cernekee 提交于
Terminate the UBI background thread prior to restarting the system. [Artem: amended comments a little] Signed-off-by: NKevin Cernekee <kpc.mtd@gmail.com> Tested-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
The UBIFS WL worker may encounter read errors and there is logic which makes a decision whether we should do one of: 1. cancel the operation and move the PEB with the read errors to the 'erroneous' list; 2. switch to R/O mode. ATM, only -EIO errors trigger 1., other errors trigger 2. The idea is that if we know we encountered an I/O error, do 1. Otherwise, we do not know how to react, and do 2., just in case. E.g., if the underlying driver became crazy because of a bug, we do not want to harm any data, and switch to R/O mode. This patch does 2 things: 1. Makes sure reads from the source PEB always cause 1. This is more consistent with other reads which come from the upper layers and never cause R/O. 2. Teaches UBI to do 1. also on -EBADMSG, UBI_IO_BAD_VID_HDR, -ENOMEM, and -ETIMEOUT. But this is only when reading the target PEB. This preblems were hunted by Adrian Hunter. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
Some of the typos were indicated by Adrian Hunter, some by 'aspell'. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
'kmem_cache_free()' oopeses if NULL is passed, and there is one error-path place where UBI may call it with NULL object. This problem was pointed to by Adrian Hunter. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 09 6月, 2009 1 次提交
-
-
由 Artem Bityutskiy 提交于
When marking a PEB as bad, print how many PEBs are left reserved. This is very useful information. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 08 6月, 2009 1 次提交
-
-
由 Artem Bityutskiy 提交于
Print not only the PEB number, but also the LEB number and volume id, which is very useful for bug hunting. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 03 6月, 2009 1 次提交
-
-
由 Dmitry Pervushin 提交于
[Artem: re-worked the patch: made it release resources when the module is unloaded, made it do module referencing, made it really independent on UBI, tested it with the UBI test-suite which can be found in ubi-2.6.git/tests/ubi-tests, re-named most of the funcs/variables to get rid of the "ubi" word and make names consistent.] Signed-off-by: NDmitry Pervushin <dpervushin@embeddedalley.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 02 6月, 2009 5 次提交
-
-
由 Dmitry Pervushin 提交于
Remove built-in gluebi support. This is a preparation for a standalone glubi module support Signed-off-by: NDmitry Pervushin <dpervushin@embeddedalley.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Dmitry Pervushin 提交于
UBI volume notifications are intended to create the API to get clients notified about volume creation/deletion, renaming and re-sizing. A client can subscribe to these notifications using 'ubi_volume_register()' and cancel the subscription using 'ubi_volume_unregister()'. When UBI volumes change, a blocking notifier is called. Clients also can request "added" events on all volumes that existed before client subscribed to the notifications. If we use notifications instead of calling functions like 'ubi_gluebi_xxx()', we can make the MTD emulation layer to be more flexible: build it as a separate module and load/unload it on demand. [Artem: many cleanups, rework locking, add "updated" event, provide device/volume info in notifiers] Signed-off-by: NDmitry Pervushin <dpervushin@embeddedalley.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
This patch improves UBI errors handling. ATM UBI switches to R/O mode when the WL worker fails to read the source PEB. This means that the upper layers (e.g., UBIFS) has no chances to unmap the erroneous PEB and fix the error. This patch changes this behaviour and makes UBI put PEBs like this into a separate RB-tree, thus preventing the WL worker from hitting the same read errors again and again. But there is a 10% limit on a maximum amount of PEBs like this. If there are too much of them, UBI switches to R/O mode. Additionally, this patch teaches UBI not to panic and switch to R/O mode if after a PEB has been copied, the target LEB cannot be read back. Instead, now UBI cancels the operation and schedules the target PEB for torturing. The error paths has been tested by ingecting errors into 'ubi_eba_copy_leb()'. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
This patch fixes the error path in the WL worker - in same cases UBI oopses when 'goto out_error' happens and e1 or e2 are NULL. This patch also cleans up the error paths a little. And I have tested nearly all error paths in the WL worker. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
This patch is a clean-up and a preparation for the following patches. It introduece constants for the return values of the 'ubi_eba_copy_leb()' function. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 26 5月, 2009 1 次提交
-
-
由 Artem Bityutskiy 提交于
This patch fixes a minor problem where we may fail to wake upe the UBI background thread. This is not fatal at all, it may just result at sligtly worse performace for a short period of time, just because the thread will be woken up when real I/O on the UBI starts. Anywey, the issue is the race condition between 'ubi_attach_mtd_dev()' and 'ubi_thread()'. If we do not serialize them, the 'wake_up_process()' call may be done before 'ubi_thread()' went seep, but after it checked 'ubi->thread_enabled'. This issue was spotted by Shin Hong <hongshin@gmail.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 18 5月, 2009 8 次提交
-
-
由 Artem Bityutskiy 提交于
The @vol->upd_marker should be protected by the @ubi->device_mutex, otherwise 'paranoid_check_volume()' complains sometimes because vol->upd_marker is 1 while vtbl_rec->upd_marker is 0. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
If a volume paranoid check fails, do not return an error code to the caller, but just print error messages and go forward. The primary reason for this is that it is difficult to recover and cancel the operation at that stage. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
I am experiencing an error in 'paranoid_check_volume()'. Add dump_stack() there to make it easier to identify the reasons of the error. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
When paranoid checs are enabled, the 'io_paral' test from the 'mtd-utils' package fails. The symptoms are: UBI error: paranoid_check_all_ff: flash region at PEB 3973:512, length 15872 does not contain all 0xFF bytes UBI error: paranoid_check_all_ff: paranoid check failed for PEB 3973 UBI: hex dump of the 512-16384 region It turned out to be a bug in the checking function. Suppose there are 2 tasks - A and B. Task A is the wear-levelling working ('wear_leveling_worker()'). It is reading the VID header to find which LEB this PEB belongs to. Say, task A is reading header of PEB X. Suppose PEB X is unmapped, and has no VID header. Task B is trying to write to PEB X. Task A: in 'ubi_io_read_vid_hdr()': reads the VID header from PEB X. The read data contain all 0xFF bytes. Task B: writes VID header and some data to PEB X Task A: assumes PEB X is empty, calls 'paranoid_check_all_ff()', which fails. The solution for this problem is to make 'paranoid_check_all_ff()' re-read the VID header, re-check it, and only if it is not there, check the rest. This now implemented by the 'paranoid_check_empty()' function. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
The @ubi->dbg_peb_buf is needed only when paranoid checks are enabled, not when debugging in general is enabled. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
Various minor improvements to the debugging messages which I found useful while hunting problems. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
The mutex essencially protects the entire UBI device, so the old @volumes_mutex name is a little misleading. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
The @mult_mutex does not serve any purpose. We already have @volumes_mutex and it is enough. The @volume mutex is pushed down to the 'ubi_rename_volumes()', because we want first to open all volumes in the exclusive mode, and then lock the mutex, just like all other ioctl's (remove, re-size, etc) do. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 20 2月, 2009 1 次提交
-
-
由 Corentin Chary 提交于
Now, we can call fsync() on an UBI volume. Signed-off-by: NCorentin Chary <corentincj@iksaif.net> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 27 1月, 2009 1 次提交
-
-
由 Sidney Amani 提交于
Introduce a new ioctl UBI_IOCSETPROP to set properties on a volume. Also add the first property: UBI_PROP_DIRECT_WRITE, this property is used to set the ability to use direct writes in userspace Signed-off-by: NSidney Amani <seed@uffs.org> Signed-off-by: NCorentin Chary <corentincj@iksaif.net> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 21 1月, 2009 2 次提交
-
-
由 Artem Bityutskiy 提交于
GregKH asked to fix UBI which has fake device release method. Indeed, we have to free UBI device description object from the release method, because otherwise we'll oops is someone opens a UBI device sysfs file, then the device is removed, and he reads the file. With this fix, he will get -ENODEV instead of an oops. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
- 18 1月, 2009 4 次提交
-
-
由 Artem Bityutskiy 提交于
Get rid of 'do_div()' and use more user-friendly primitives from 'linux/math64.h'. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
UBI ioctl's do not work when running 64-bit kernel and 32-bit user-land. Fix this by adding the compat_ioctl method. Also, UBI serializes all ioctls, so more than one ioctl at a time is not a problem. Amd UBI does not seem to depend on anything else, so use unlocked_ioctl instead of ioctl (no BKL needed). Reported-by: NGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Reviewed-by: NArnd Bergmann <arnd@arndb.de>
-
由 Jan Engelhardt 提交于
Signed-off-by: NJan Engelhardt <jengelh@medozas.de> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-
由 Artem Bityutskiy 提交于
Some ioctl's in UBI are enabled only when debugging is switched on. There is not particular reason for this, just noone needed them. However, some people need the now for their user-space development. Thus, allow these ioctl's even if UBI debugging is disabled. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
-