On Wed, Aug 02, 2017 at 02:14:18PM +0200, Rafał Miłecki wrote: > From: Rafał Miłecki <rafal@xxxxxxxxxx> > > UBI is a volume management system that can be used on a raw flash > partition for providing multiple logical volumes. Detecting UBI > superblock may be useful for tools wanting to simplify or automate > attaching UBI. > > Please note it's not directly related to the ubifs support which is just > a filesystem working on top of UBI volume. > > In other words: UBI can be used on MTD partition (e.g. /dev/mtdblock0) > while ubifs can be used on UBI volume (e.g. /dev/ubi0_0). > > This patch adds simple code reading UBI version and unique number and > setting it in the blkid_probe. > > Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx> > --- > V2: Update commit message (more UBI vs. ubifs details) > Pass &hdr->image_seq to the blkid_probe_sprintf_uuid > Add test Applied, thanks. > +ID_FS_TYPE=ubi > +ID_FS_USAGE=filesystem This is probably not ideal. We use "RAID" flag for logic volume managers. The advantage is that probing is faster as it does not try to check for another signature when "RAID" is detected. The question is how small could be the UBI device? We don't probe for "RAID" on very small devices (<=1MiB). Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html