Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jan 2022 21:52:32 -0700
From:      Alan Somers <asomers@freebsd.org>
To:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   fspacectl meets DIOCGDELETEE
Message-ID:  <CAOtMX2hjiP-0pVB7E-D0DXfzgw66hVZ0NF_qm2a9DLfrNPFppw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2hjiP-0pVB7E-D0DXfzgw66hVZ0NF_qm2a9DLfrNPFppw>