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

[kernel] Cleanup ifdefs and unused code in direct floppy driver #1719

Merged
merged 4 commits into from
Sep 13, 2023
Merged

Conversation

ghaerr
Copy link
Owner

@ghaerr ghaerr commented Sep 13, 2023

Removes unused or unneeded ifdefs and outdated code not used in ELKS or TLVC, for understandability and maintainability.
Follow-on from importing direct floppy driver in #1716.

Removes BDEV_SIZE_CHK and most CONFIG_FS_XMS_BUFFER ifdefs.
Removes drive "aliasing" from open code.
Will add fsync_dev/invalidate_inodes to floppy_release in separate push.

Considering whether to remove all floppy formatting code.
Considering whether kernel_ds:tmp_floppy_area could be replaced with DMASEG:0, but unsure if DMASEG used separately in driver.

Tested and works with no functional changes in QEMU.

@ghaerr
Copy link
Owner Author

ghaerr commented Sep 13, 2023

Adds latest direct driver enhancements from @Mellvik's Mellvik/TLVC#24.

BTW @Mellvik, I'm not sure its OK to not call fsync_dev(dev) on the last close to floppy_release, since one can't depend on umount doing it - the device could be unmounted and accessed just by open/close of /dev/df0, in which case the buffers would not be synced.

@ghaerr ghaerr merged commit d832532 into master Sep 13, 2023
2 checks passed
@ghaerr ghaerr deleted the fd3 branch September 13, 2023 20:20
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.

1 participant