Bug 383451 - [PATCH] Add basic support for UDF filesystem
Summary: [PATCH] Add basic support for UDF filesystem
Status: RESOLVED FIXED
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-13 11:06 UTC by Pali Rohár
Modified: 2017-08-17 08:16 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
[PATCH] Add basic support for UDF filesystem (13.70 KB, patch)
2017-08-13 11:06 UTC, Pali Rohár
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pali Rohár 2017-08-13 11:06:46 UTC
Created attachment 107251 [details]
[PATCH] Add basic support for UDF filesystem

For reading UDF label and UUID is needed blkid >= 2.30. For creating new
UDF filesystem is needed mkudffs binary from the udftools package.

When creating new UDF fileystem, revision 2.01 for hard disk media is used.
Therefore it is not possible to use it for optical (or other) medias.

Problems:
* Check for min and max capacity is incorrect as it depends on logical
  (sector) size of the disk.
* Check for max label length is incorrect too as it depends on characters
  itself in label.
* Specifying label is not working yet as FileSystem::create() does not get
  label parameter.
* UDF filesystem should be used on unpartitioned disk, without MBR or GPT
  and spanning whole disk, but KDE Partition Manager does not support it.
* When MBR is used, MBR partition id should be 0x07, but currently it is
  incorrect 0x83. See: https://serverfault.com/a/829172 (same for GPT)
Comment 1 Pali Rohár 2017-08-13 11:14:30 UTC
Note that incorrect MBR means that filesystem is not detected by Windows systems which is a big problem as choice for UDF is multiplatform support.
Comment 2 Andrius Štikonas 2017-08-16 15:19:15 UTC
(In reply to Pali Rohár from comment #0)

> Problems:
> * Check for max label length is incorrect too as it depends on characters
>   itself in label.

Maybe I should restrict it to 63 for now and refactor later? 63 is not that little, should be enough for most use cases. Then we can extend API to check a particular label and not just length.
Comment 3 Pali Rohár 2017-08-16 15:56:34 UTC
(In reply to Andrius Štikonas from comment #2)
> (In reply to Pali Rohár from comment #0)
> 
> > Problems:
> > * Check for max label length is incorrect too as it depends on characters
> >   itself in label.
> 
> Maybe I should restrict it to 63 for now and refactor later? 63 is not that
> little, should be enough for most use cases. Then we can extend API to check
> a particular label and not just length.

It is not so simple. Some background:

Label is stored as UDF Logical Volume Identifier (--lvid) which has above restrictions. But due to compatibility reasons with Linux systems with older blkid library/binaries, it is needed to store label also into UDF Volume Identifier (--vid) which has restriction of 30 resp. 15 characters (again 15 only if label contains at least one Unicode codepoint above U+FF). Moreover mkudffs prior to version 1.1 is able to process --lvid and --vid params which contains only ASCII characters. Other non-ASCII character cause creating damaged file system.