fspacectl(2) does for regular files the same thing that DIOCGDELETE does for GEOM devices. The only differences are that DIOCGDELETE requires the operation to be block-aligned, and if interrupted DIOCGDELETE doesn't give feedback about partial progress. Can we connect the two? That would allow a user to free space with a single API for both files and devices. It would require:
* Adding a d_fspacectl_t member to struct cdevsw * Implementing d_fspacectl_t for g_dev_cdevsw by using DIOCGDELETE * Implementing .fo_fspacectl for devfs * Optionally implementing d_fspacectl on other device types, like zvols. -Alan