Commit 79b510c0 authored by Artem Bityutskiy's avatar Artem Bityutskiy

UBI: add few more comments

Add few comments above ubi_scan_add_used() to explain why it is so
complex. Requested by Satyam Sharma <satyam.sharma@gmail.com>.
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 941dfb07
...@@ -407,8 +407,12 @@ out_free_vidh: ...@@ -407,8 +407,12 @@ out_free_vidh:
* @vid_hdr: the volume identifier header * @vid_hdr: the volume identifier header
* @bitflips: if bit-flips were detected when this physical eraseblock was read * @bitflips: if bit-flips were detected when this physical eraseblock was read
* *
* This function returns zero in case of success and a negative error code in * This function adds information about a used physical eraseblock to the
* case of failure. * 'used' tree of the corresponding volume. The function is rather complex
* because it has to handle cases when this is not the first physical
* eraseblock belonging to the same logical eraseblock, and the newer one has
* to be picked, while the older one has to be dropped. This function returns
* zero in case of success and a negative error code in case of failure.
*/ */
int ubi_scan_add_used(const struct ubi_device *ubi, struct ubi_scan_info *si, int ubi_scan_add_used(const struct ubi_device *ubi, struct ubi_scan_info *si,
int pnum, int ec, const struct ubi_vid_hdr *vid_hdr, int pnum, int ec, const struct ubi_vid_hdr *vid_hdr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment