logging in or signing up ubi aSGuest106470 Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 52 Category: Science & Tech.. License: Some Rights Reserved Like it (0) Dislike it (0) Added: July 24, 2011 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript UBI – Unsorted Block Images: UBI – Unsorted Block Images Artem Bityutskiy <artem.bityutskiy@nokia.com>Introduction: Introduction A new technology for flash devices Designed by IBM Publicly accessible Git tree GPL license More information at www.linux-mtd.infradead.orgPlan: Plan Linux MTD overview UBI overviewLinux MTD overview: Linux MTD overviewMTD overview: MTD overview MTD stands for Memory Technology Devices MTD is a Linux subsystem ( drivers/mtd/ ) MTD provides uniform access to various flash devices MTD provides a generic API for that MTD provides an “MTD device” abstraction NAND NOR DataFlash AG-AND OneNAND ECC’d NOR MTD device, MTD API JFFS2 character device (/dev/mtd0)MTD device: MTD device consists of eraseblocks Eraseblock size varies, typically 32-128 Kilobytes Eraseblocks may be written to MTD device … Eraseblock, 128K MTD device write write write write write , but not re-written re-write X Whole eraseblock has to be erased first write Then it is possible to write thereMDT device vs Block device: MDT device vs Block device Block device Consists of sectors Sectors are small (512, 1024 bytes) 2 operations: read and write Bad sectors are hidden by hardware Sectors do not get worn out MTD device Consists of eraseblocks Eraseblocks are larger (32-128 Kilobytes) 3 operations: read , write and erase Bad eraseblocks are not hidden Eraseblocks get worn-out after 10 4 -10 5 erasures. MTD device is more difficult to handle MTD partitions: MTD partitions Flash chip may be split on several MTD partitions MTD partition is a set of consecutive eraseblocks MTD partitions is a physical flash area … Partition 1 (e.g., initfs) Partition 2 (e.g., rootfs) … so onDrawbacks of MTD partitions: Bad blocks Drawbacks of MTD partitions MTD partitions are static – now way to change them “on-flight” Do not provide wear-leveling for the whole chip … Partition 1 Partition 2 JFFS2UBI overview: UBI overviewUBI layer: UBI layer … Physical flash MTD layer UBI layer Flash File System (e.g., UBIFS)Logical Volumes: Create UBI volume “C” - size 20 logical eraseblocks Re-size volume B to 10 logical eraseblocks Create UBI volume “A” – size 10 logical eraseblocks Create UBI volume “B” - size 15 logical eraseblocks Delete UBI volume “A” Re-size volume “C” to 40 logical eraseblock Logical Volumes MTD device (physical flash) Volume A UBI provides logical volumes instead of MTD partitions UBI volumes are in a way similar to LVM volumes UBI volumes may be dynamically created, deleted and re-sized Volume B Volume C Volume B Volume C … and so onWear-leveling: Wear-leveling UBI does wear-leveling across whole MTD device! Wear-leveling is done by UBI, not by the UBI user! Boot volume RootFS volume DataStorage volume MTD device (physical flash) JFFS2UBI volume vs. MTD partition: UBI volume vs. MTD partition MTD partition Consists of physical eraseblocks ( PEB ) Does not implement wear-leveling Admits of bad PEBs UBI volume Consists of logical eraseblocks ( LEB ) Implements wear-leveling Devoid of bad LEBs Advantages of UBI Allows dynamic volume creation, deletion and re-sizing more flexibility Eliminates the “wear” problem simpler software Eliminates bad eraseblocks problem simpler software How it works: Static read-only data PEB 0 PEB 6 PEB 6 PEB 7 How it works LEBs are mapped to PEBs PEB 1 PEB 2 PEB 3 PEB 4 PEB 5 PEB 8 PEB 9 PEB 10 MTD device LEB 0 LEB 1 LEB 2 LEB 3 LEB 4 LEB 0 LEB 1 LEB 2 Volume A Volume B UBI layer erase read Return 0xFFs write read Low erase counter High erase counter Move data Re-map LEB Any LEB may be mapped to any PEBBad eraseblocks handling: Bad eraseblocks handling UBI volumes are devoid of bad eraseblocks UBI does proper error recovery transparently Bad physical eraseblock Empty physical Eraseblock Partially filled physical eraseblock Write more data Write error! The eraseblock’s become bad! No panic! Recover the data to a good PEB Write newcoming data to this PEB Re-map the LEB to this PEB Mark this PEB s bad The data have been successfully written! An UBI volumeUBI interfaces: UBI interfaces UBI character devices: /dev/ubi0 , /dev/ubi1 , … – UBI devices: volume create , delete , re-size , and get device description operations /dev/ubi0_0 , /dev/ubi0_1 , … - UBI volumes: read , write , update , and get volume description operations UBI sysfs interface: /sys/class/ubi UBI in-kernel interface: include/linux/mtd/ubi.hVolume update operation: Volume update operation Useful for software updates Volume is in “ corrupted ” state if update is interrupted “Corrupted” volumes are not usable and must be updatedStatic and dynamic UBI volumes: Static and dynamic UBI volumes Dynamic volumes are read-write Static volumes are read-only Static volumes are protected by CRC-32 checksum You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
ubi aSGuest106470 Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 52 Category: Science & Tech.. License: Some Rights Reserved Like it (0) Dislike it (0) Added: July 24, 2011 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript UBI – Unsorted Block Images: UBI – Unsorted Block Images Artem Bityutskiy <artem.bityutskiy@nokia.com>Introduction: Introduction A new technology for flash devices Designed by IBM Publicly accessible Git tree GPL license More information at www.linux-mtd.infradead.orgPlan: Plan Linux MTD overview UBI overviewLinux MTD overview: Linux MTD overviewMTD overview: MTD overview MTD stands for Memory Technology Devices MTD is a Linux subsystem ( drivers/mtd/ ) MTD provides uniform access to various flash devices MTD provides a generic API for that MTD provides an “MTD device” abstraction NAND NOR DataFlash AG-AND OneNAND ECC’d NOR MTD device, MTD API JFFS2 character device (/dev/mtd0)MTD device: MTD device consists of eraseblocks Eraseblock size varies, typically 32-128 Kilobytes Eraseblocks may be written to MTD device … Eraseblock, 128K MTD device write write write write write , but not re-written re-write X Whole eraseblock has to be erased first write Then it is possible to write thereMDT device vs Block device: MDT device vs Block device Block device Consists of sectors Sectors are small (512, 1024 bytes) 2 operations: read and write Bad sectors are hidden by hardware Sectors do not get worn out MTD device Consists of eraseblocks Eraseblocks are larger (32-128 Kilobytes) 3 operations: read , write and erase Bad eraseblocks are not hidden Eraseblocks get worn-out after 10 4 -10 5 erasures. MTD device is more difficult to handle MTD partitions: MTD partitions Flash chip may be split on several MTD partitions MTD partition is a set of consecutive eraseblocks MTD partitions is a physical flash area … Partition 1 (e.g., initfs) Partition 2 (e.g., rootfs) … so onDrawbacks of MTD partitions: Bad blocks Drawbacks of MTD partitions MTD partitions are static – now way to change them “on-flight” Do not provide wear-leveling for the whole chip … Partition 1 Partition 2 JFFS2UBI overview: UBI overviewUBI layer: UBI layer … Physical flash MTD layer UBI layer Flash File System (e.g., UBIFS)Logical Volumes: Create UBI volume “C” - size 20 logical eraseblocks Re-size volume B to 10 logical eraseblocks Create UBI volume “A” – size 10 logical eraseblocks Create UBI volume “B” - size 15 logical eraseblocks Delete UBI volume “A” Re-size volume “C” to 40 logical eraseblock Logical Volumes MTD device (physical flash) Volume A UBI provides logical volumes instead of MTD partitions UBI volumes are in a way similar to LVM volumes UBI volumes may be dynamically created, deleted and re-sized Volume B Volume C Volume B Volume C … and so onWear-leveling: Wear-leveling UBI does wear-leveling across whole MTD device! Wear-leveling is done by UBI, not by the UBI user! Boot volume RootFS volume DataStorage volume MTD device (physical flash) JFFS2UBI volume vs. MTD partition: UBI volume vs. MTD partition MTD partition Consists of physical eraseblocks ( PEB ) Does not implement wear-leveling Admits of bad PEBs UBI volume Consists of logical eraseblocks ( LEB ) Implements wear-leveling Devoid of bad LEBs Advantages of UBI Allows dynamic volume creation, deletion and re-sizing more flexibility Eliminates the “wear” problem simpler software Eliminates bad eraseblocks problem simpler software How it works: Static read-only data PEB 0 PEB 6 PEB 6 PEB 7 How it works LEBs are mapped to PEBs PEB 1 PEB 2 PEB 3 PEB 4 PEB 5 PEB 8 PEB 9 PEB 10 MTD device LEB 0 LEB 1 LEB 2 LEB 3 LEB 4 LEB 0 LEB 1 LEB 2 Volume A Volume B UBI layer erase read Return 0xFFs write read Low erase counter High erase counter Move data Re-map LEB Any LEB may be mapped to any PEBBad eraseblocks handling: Bad eraseblocks handling UBI volumes are devoid of bad eraseblocks UBI does proper error recovery transparently Bad physical eraseblock Empty physical Eraseblock Partially filled physical eraseblock Write more data Write error! The eraseblock’s become bad! No panic! Recover the data to a good PEB Write newcoming data to this PEB Re-map the LEB to this PEB Mark this PEB s bad The data have been successfully written! An UBI volumeUBI interfaces: UBI interfaces UBI character devices: /dev/ubi0 , /dev/ubi1 , … – UBI devices: volume create , delete , re-size , and get device description operations /dev/ubi0_0 , /dev/ubi0_1 , … - UBI volumes: read , write , update , and get volume description operations UBI sysfs interface: /sys/class/ubi UBI in-kernel interface: include/linux/mtd/ubi.hVolume update operation: Volume update operation Useful for software updates Volume is in “ corrupted ” state if update is interrupted “Corrupted” volumes are not usable and must be updatedStatic and dynamic UBI volumes: Static and dynamic UBI volumes Dynamic volumes are read-write Static volumes are read-only Static volumes are protected by CRC-32 checksum