On Thu, 27 Sep 2012, Martin K. Petersen wrote: > Date: Thu, 27 Sep 2012 11:49:22 -0400 > From: Martin K. Petersen <martin.petersen@xxxxxxxxxx> > To: Lukáš Czerner <lczerner@xxxxxxxxxx> > Cc: Karel Zak <kzak@xxxxxxxxxx>, util-linux@xxxxxxxxxxxxxxx > Subject: Re: [PATCH] blkdiscard: add new command > > >>>>> "Lukáš" == Lukáš Czerner <lczerner@xxxxxxxxxx> writes: > > Lukáš> TBH this is fugly :). Also what actually is the advantage of > Lukáš> doing this ? So we saved 50 lines of code for this ugliness and > Lukáš> instead of two separate binaries we have this one hybrid and > Lukáš> symlink. I am not sure it's worth it. Can't we just have two > Lukáš> separate binaries ? What is the problem with that ? > > It's not just discard. We should also consider the zeroout and write > same use cases. They have nothing to do with fstrim. > > Time to incorporate and extend Garzik's blktool, perhaps? > Hmm, I do not know. blktool seems to be very similar to blockdev in the sense that it is for querying and changing block device setting which is not what we do with, discard, write same or zeroout where we actually change the data on the device itself. In my mind it just somehow does not fit there. But you're right that it is not just about discard or secure discard, we have other quite similar functionalities and it might be worth having one separate tool for all those, thanks for pointing this out. (CCing linux-fsdevel ... for the whole discussion see http://www.spinics.net/lists/util-linux-ng/msg06832.html) Thanks! -Lukas