Re: Spare Tables error on format
Hi,
Listas Canal wrote:
> Hello dear list:I don't know if here can I ask about dvd+rw-format, the
> autor of dvd+rw-tools points this list.
Well, he seems to be out of the burn business since a decade.
Being developer of libburn and xorriso, i seem to be the last remaining
active carer of optical drives in the free software world. A lonely job.
> dvd+rw-tools-7.1$ ./dvd+rw-format -f /dev/sr0 -ssa=32m
It looks like your -ssa= value is too small for BD-RE.
MMC-5, 6.5.4.2.15.3 "Spares Allocation on Single Layer BD-RE" says that
there must be at least 4096 * 32 = 131072 blocks = 256 MiB of spare
area (or none at all).
That paragraph predicts the error reply
ILLEGAL REQUEST/INVALID FIELD IN PARAMETER LIST
which you see with your run.
It seems wrong that dvd+rw-format's understands your "32m" as 32.0e6,
and then computes the desired number of blocks by dividing by 2.0e3.
Actually block size is 2*1024.
https://sources.debian.org/src/dvd+rw-tools/7.1-14/dvd%252Brw-format.cpp/#L285
So "32m" leads to 16,000 blocks instead of 16384.
I expect that
-ssa=262144000
yields the minimal permissible number of 131072 blocks.
> only -ssa=none or -ssa=default is working. max and min also does not work.
I did not use dvd+rw-format in years.
$ dvd+rw-format -f /dev/sr4 -ssa=min
* BD/DVD±RW/-RAM format utility by <appro@fy.chalmers.se>, version 7.1.
* 24.5GB BD media detected.
* formatting .:-[ FORMAT UNIT failed with SK=5h/INVALID FIELD IN PARAMETER LIST]: Input/output error
$
Wow. That was quick.
With xorriso i would do it like:
$ xorriso -outdev /dev/sr4 -list_formats
...
Format status: formatted, with 23354.0 MiB
BD Spare Area: 0 blocks consumed, 262144 blocks available
Format idx 0 : 00h , 11826176s , 23098.0 MiB
Format idx 1 : 30h , 11826176s , 23098.0 MiB
Format idx 2 : 30h , 11564032s , 22586.0 MiB
Format idx 3 : 30h , 12088320s , 23610.0 MiB
Format idx 4 : 31h , 12219392s , 23866.0 MiB
$ xorriso -outdev /dev/sr4 -format fast_by_index_3
...
Beginning to format medium.
xorriso : UPDATE : Formatting ( 1.0% done in 1 seconds )
xorriso : UPDATE : Formatting ( 1.0% done in 2 seconds )
xorriso : UPDATE : Formatting ( 1.0% done in 3 seconds )
xorriso : UPDATE : Formatting ( 1.0% done in 4 seconds )
xorriso : UPDATE : Formatting ( 7.0% done in 5 seconds )
xorriso : UPDATE : Formatting ( 7.0% done in 6 seconds )
xorriso : UPDATE : Formatting ( 12.9% done in 7 seconds )
Formatting done
...
$ xorriso -outdev /dev/sr4 -list_formats
...
Format status: formatted, with 23610.0 MiB
BD Spare Area: 0 blocks consumed, 131072 blocks available
...
I fail to understand what goes wrong in dvd+rw-format with -ssa=min.
The code is quite condensed but after some riddling it seems correct.
It looks for the format descriptor with the highest capacity and uses
its data to request that capacity via the FORMAT UNIT command.
Pity that dvd+rw-format does not offer a debugging mode which would
show its SCSI transactions, like with xorriso -scsi_log on.
Whatever, even if we find the bug, there is few hope that Debian will
add a patch to its dvd+rw-tools package. I have a DVD-R[W] patch pending
there since 6 years.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794868
So i can only invite you to find the bugs in xorriso's formatting code.
See above example and also the description of command -format in
man xorriso.
Have a nice day :)
Thomas
Reply to: