[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: growisofs doesnt check available space when using defect management on Blu-ray?



Hi,

> :-[ WRITE@LBA=b87400h failed with SK=5h/INVALID FIELD IN CDB]: Input/output error

What do you get from

  dvd+rw-mediainfo /dev/sr0

with the failed media already loaded in the drive ?
Interesting would be the number in output line
  Track Size:        ......*2KB
b87400h is 12088320 decimal.


> Note that Nero under windows was able to write them (to a similar disk),
> but didn't use any defect management.
> Also, both k3b and Nero showed the remaining space as ~200 MB, k3b
> apparently not taking into account the 250MB growisofs reserves.
> So, my question is, why didn't growisofs detect that the files + reserved space
> wouldn't fit to the media? Is this a bug?

Seems so. Probably shortcommings in both, k3b and growisofs.

In growisofs.c the test for overflow of capacity comes before eventual
unmounting of the media and before the drive is aquired for writing.
I cannot see that bd_r_format() in growisofs_mmc.cpp would take into
account the announced image size when deciding about formatting resp.
spare size.

If k3b is supposed to do own size checks, then it would either have to
format the media (e.g. via dvd+rw-format) before inquiring its capacity
or it should use growisofs option
  -use-the-force-luke=spare:none


A remedy for you would be to format the media before giving them to k3b.
Like:
  dvd+rw-format -ssa=min /dev/sr0

A BD-R can only be formatted once. So growisofs will have no chance to
change the media capacity after it checked against the image size.


(I will now check whether my own software is safe with this. Nice pitfall.
 It could spoil my BD-RE handling. BD-R should be safe, because they do
 not get formatted by default.)


Have a nice day :)

Thomas


Reply to: