On Sat, Nov 30, 2019 at 10:01:17PM +0000, Chaitanya Kulkarni wrote: > Not an XFS expert, but patch to handle ^C is been discussed on the > block layer mailing list which includes discard operations. [1] Heh, I wasn't aware of that. :) > This solution seems specific to one file system, which will lead to > code repetition for all the file systems which are in question. > > How about we come up with the generic solution in the block-layer so > it can be reused for all the file systems ? > > (fyi, I'm not aware of any drawbacks of handling ^C it in the block > layer and would like to learn if any). The only one that I can think of is how to signal a partial completion, but if you're only aborting on *fatal* signals then that doesn't matter. Fixing the block layer seems like a better answer anyway. > [1] https://patchwork.kernel.org/patch/11234607/ Though looking through that patch raises the question of whether xfs' control loops also need to check for fatal signals, similar to what the online scrub loops do? --D > -Chaitanya > > On 11/27/2019 10:21 PM, Pavel Reichl wrote: > > Some users are not happy about the BLKDISCARD taking too long and at the same > > time not being informed about that - so they think that the command actually > > hung. > > > > This commit changes code so that progress reporting is possible and also typing > > the ^C will cancel the ongoing BLKDISCARD. > > > > Signed-off-by: Pavel Reichl<preichl@xxxxxxxxxx> > > --- >