diskfs: fix LBA space leak on unlink/rmdir + add spinlock protection + ATA DMA irqsave
Root cause: diskfs_unlink and diskfs_rmdir zeroed freed inodes but
never reclaimed LBA space -- next_free_lba only grew, never shrank.
After many test runs, next_free_lba exceeded the 8192-sector disk,
causing ata_pio_read28 to fail with -EIO on out-of-range LBAs,
making writes to newly created files fail silently.
Fixes:
- Add diskfs_reclaim_space() that recalculates next_free_lba by
scanning all inodes for the highest used LBA extent. Called from
both diskfs_unlink and diskfs_rmdir after freeing an inode.
- Add g_diskfs_lock spinlock with irqsave/irqrestore variants
protecting all superblock load/modify/store operations across all
diskfs functions. All early returns properly unlock.
- Restructure diskfs_read_impl and diskfs_write_impl to cache inode
metadata under lock, then release before sector I/O, avoiding long
interrupt-disabled periods that could cause deadlocks/timeouts.
- Replace spin_lock/spin_unlock with spin_lock_irqsave/spin_unlock_
irqrestore in all 4 ATA DMA channel functions to prevent deadlocks
from timer interrupts during lock hold.