Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added option to skip bad sectors in mkudffs #11

Closed
wants to merge 1 commit into from

Conversation

ganboing
Copy link

@ganboing ganboing commented Dec 31, 2017

Hi Pali,

Would you mind take a look at this change? I've added a option to skip bad sectors in mkudffs. It allows disc to be formatted even if some sectors have worn out. It can also be used to reserve those sectors. Not sure if utilizing the "BAD" enum is the current approach.

Bo

@pali
Copy link
Owner

pali commented Dec 31, 2017

"BAD" enum is unused, so it is ok. But this code is not enough. If there are bad sectors in partition data area (PSPACE) then it needs to be properly splitted. Also to prevent allocation of bad sectors by UDF filesystem drivers, it is needed to put those bad sectors into system stream "*UDF Non-Allocatable Space". See section 3.3.7.2 in UDF specification. And about API, what about using rather file with bad sectors, like in mke2fs? Then it would be easier also integration with badblocks tool which find bad sectors automatically.

@ganboing
Copy link
Author

ganboing commented Jan 1, 2018

Thanks for your reply. I didn't even think about PSPACE, as I'm quite new to UDF spec. The primary reason for this is to relocate LVID and other potentially frequently overwritten sectors. When used in Windows, I noticed that it placed the LVID at sector 64 on my DVD-RW. After some stress testing, sector 64-79 is no longer read/writable. With the patch, I'm able to advise mkudffs not to put LVID on or close to the bad sectors, and the disc can be reused.

I'll have to read more about UDF Non-Allocatable Space to have a proper way to mark these sectors per spec. It's not going to be very soon for a new PR.

@pali
Copy link
Owner

pali commented Jan 2, 2018

Even your current algorithm for marking bad blocks would not work when you specify some bad block which is in normal partition space. As currently mkudffs can work only with continuous partition space, marking some block as bad would result in half of disk to be unused space.

I understand your motivation (there is no problem to put LVID on other blocks), but patches in current form are not ready for merging.

Copy link
Owner

@pali pali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking as request changes.

@pali
Copy link
Owner

pali commented Apr 22, 2018

Are you going to rework/fix your changes?

@pali
Copy link
Owner

pali commented Sep 3, 2018

Closing for inactivity.

@pali pali closed this Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants