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

The user cannot access a file directory, with the message of "Contains a cluster (xxx). Assuming EOF" #175

Open
DouZhaolei opened this issue Feb 10, 2022 · 0 comments

Comments

@DouZhaolei
Copy link

DouZhaolei commented Feb 10, 2022

【Background】:
I reset board and run the dosfsck command once. then, The user cannot access a file directory.
The operations of "cd ***" and "rm ***" was failed.

  • I checked the FSCK logs and found that a large number of file corruption check records were recorded.

picture1

  • I re-do the dosfsck command,the directory will be deleted. and the system will be ok ,The fsck logs are as follows:

picture2

【question】:
The error information is in the following code segment in check_file():

if (!curEntry.value || bad_cluster(fs, curr)) {
	    printf("%s\n  Contains a %s cluster (%lu). Assuming EOF.\n",
		   path_name(file), curEntry.value ? "bad" : "free", (unsigned long)curr);
	    if (prev)
		set_fat(fs, prev, -1);
	    else if (!file->offset)
		die("FAT32 root dir starts with a bad cluster!");
	    else
		MODIFY_START(file, 0, fs);
	    break;
}

In the else branch,why not modify the file name[0] as DELETED_FLAG ? or I shoud run dosfsck with the operation of "V"?

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

No branches or pull requests

1 participant