Re: Extended attributes support on udf file system

"王锋" <[email protected]> Fri, 20 Mar 2020 21:22:55 +0800
Newsgroups gmane.comp.audio.cd-record
Message-ID <[email protected]>
Hi Jörg,


&gt;&gt; Hi all,
&gt;&gt;
&gt;&gt; Is there any tool which can create udf file system image supporting extended attributes? I tried mkudffs and mkisofs, but they all failed.

&gt; Hi,

&gt; what do you expect?

&gt; Since August 2006 mkisofs suports extended attributes for Mac OS.

&gt; Is this what you like?

&gt; Do you use the real mkisofs or one of the fake/outdated variants?

On linux platform I'd like to create an udf image and mount it to a directory, then copy some files with extended attributes to the image.&nbsp; I hope the extended attributes to be reserved on the udf file system.&nbsp;


The version of mkisofs I used is "mkisofs 3.02a10 2020/02/26 (x86_64-unknown-linux-gnu)". The following is what I did with mkisofs.


#Check the version of mkisofs
root@Ubuntu:x86_64-linux-gcc# ./mkisofs --version
mkisofs 3.02a10 2020/02/26 (x86_64-unknown-linux-gnu)


Copyright (C) 1993-1997 Eric Youngdale
Copyright (C) 1997-2019 Joerg Schilling
Copyright (C) 1997-2001 James Pearson
Copyright (C) 2006&nbsp; &nbsp; &nbsp; HELIOS Software GmbH


#Set the extended attribute to the file.
root@Ubuntu:x86_64-linux-gcc# setfattr -n "trusted.udf.test" -v "1234" ./100M-file&nbsp;
root@Ubuntu:x86_64-linux-gcc# getfattr -d -m .* ./100M-file&nbsp;
# file: 100M-file
trusted.udf.test="1234"


#Make the udf image file
root@Ubuntu:x86_64-linux-gcc# ./mkisofs -o /tmp/a.udf -udf ./100M-file&nbsp; &nbsp;&nbsp;
&nbsp; 9.69% done, estimate finish Fri Mar 20 21:09:54 2020
&nbsp;19.43% done, estimate finish Fri Mar 20 21:09:54 2020
&nbsp;29.10% done, estimate finish Fri Mar 20 21:09:54 2020
&nbsp;38.77% done, estimate finish Fri Mar 20 21:09:54 2020
&nbsp;48.44% done, estimate finish Fri Mar 20 21:09:54 2020
&nbsp;58.17% done, estimate finish Fri Mar 20 21:09:54 2020
&nbsp;67.84% done, estimate finish Fri Mar 20 21:09:54 2020
&nbsp;77.51% done, estimate finish Fri Mar 20 21:09:54 2020
&nbsp;87.18% done, estimate finish Fri Mar 20 21:09:54 2020
&nbsp;96.92% done, estimate finish Fri Mar 20 21:09:54 2020
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
51618 extents written (100 MB)
root@Ubuntu:x86_64-linux-gcc# mount /tmp/a.udf /mnt
mount: block device /tmp/a.udf is write-protected, mounting read-only


#Check the extended the attribute after mount the image file. But we got nothing.
root@Ubuntu:x86_64-linux-gcc# getfattr -d -m .* /mnt/100M-file&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
root@Ubuntu:x86_64-linux-gcc#&nbsp;




The extended attribute is lost.


-------


For the mkudffs I got the error with "Operation not supported" message.


root@Ubuntu:x86_64-linux-gcc# mkudffs -h
mkudffs 1.0.0b2 for UDF FS 1.0.0-cvs, 2002/02/09



root@Ubuntu:x86_64-linux-gcc# truncate -s 150M a.udf
root@Ubuntu:x86_64-linux-gcc# mkudffs ./a.udf&nbsp;
start=0, blocks=16, type=RESERVED&nbsp;
start=16, blocks=3, type=VRS&nbsp;
start=19, blocks=237, type=USPACE&nbsp;
start=256, blocks=1, type=ANCHOR&nbsp;
start=257, blocks=16, type=PVDS&nbsp;
start=273, blocks=1, type=LVID&nbsp;
start=274, blocks=76269, type=PSPACE&nbsp;
start=76543, blocks=1, type=ANCHOR&nbsp;
start=76544, blocks=239, type=USPACE&nbsp;
start=76783, blocks=16, type=RVDS&nbsp;
start=76799, blocks=1, type=ANCHOR&nbsp;





root@Ubuntu:x86_64-linux-gcc# getfattr -d -m .* ./100M-file&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
# file: 100M-file
trusted.udf.test="1234"
root@Ubuntu:x86_64-linux-gcc# cp --preserve ./100M-file /mnt/
root@Ubuntu:x86_64-linux-gcc# getfattr -d -m .* /mnt/100M-file&nbsp;
root@Ubuntu:x86_64-linux-gcc# setfattr -n "trusted.udf.test" -v "1234" /mnt/100M-file&nbsp;
setfattr: /mnt/100M-file: Operation not supported





According to the specification of UDF version 2.01, this feature should be supported. Is there something wrong with what I did?


Best Regards,
WF