On Wed, Feb 21, 2024 at 02:16:23PM +0530, Nilay Shroff wrote: > On 2/21/24 02:11, Keith Busch wrote: > > From: Keith Busch <kbusch@xxxxxxxxxx> > > # time blkdiscard -z /dev/nvme0n1 > > real 10m27.514s > user 0m0.000s > sys 0m0.369s > > So shouldn't we need to add the same code (allowing user to kill the process) under > __blkdev_issue_write_zeroes()? I think even though a drive supports "write zero offload", if > drive has a very large capacity then it would take up a lot of time to zero out the complete drive. > Yes the time required may not be in hours in this case but it could be in tens of minutes depending > on the drive capacity. Yeah, that's long enough to change your mind and not want to wait around for it to proceed anyway. Between that and the filesystem usage, looks like I have more things to consider for v2.