On Tue, Nov 13, 2018 at 2:59 PM Alan Somers <[email protected]> wrote: > > On Tue, Nov 13, 2018 at 3:51 PM Conrad Meyer <[email protected]> wrote: >> >> On Tue, Nov 13, 2018 at 2:10 PM Alan Somers <[email protected]> wrote: >> > ... >> > 8) Add aio_freesp(2), an asynchronous version of fcntl(F_FREESP). >> >> Why not just add DIOCGDELETE support to various VOP_IOCTL >> implementations? The file objects forward correctly through vn_ioctl >> to VOP_IOCTL for both regular files and devfs VCHR nodes. >> >> We can emulate the Linux API if we want to be compatible there, but I >> wouldn't bother with Solaris. > > The only reason that I prefer the Solaris API is because it doesn't require > adding another syscall, and because Linux's fallocate(2) does a whole bunch > of other things besides hole-punching.
I am imagining that if we went this route, we would implement Linux fallocate as a library shim around the native FreeBSD ioctl (or whatever) rather than an independent system call. This would be for API compatibility, not ABI compatibility. But Linux compat can be set aside for now, I think — it's a secondary concern. > What about an asynchronous version? ioctl(2) is still synchronous. Do you > see any better way to hole-punch/TRIM asynchronously than with aio? Yeah, this is a good consideration. No, I don't have any better suggestion for an asynchronous API. In general our VOPs tend to be synchronous. Aio does seem like the logical home for a new asynchronous API. Best regards, Conrad _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "[email protected]"
