Re: [PATCH] blkdiscard: add new command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 13, 2012 at 09:37:30AM -0400, Lukáš Czerner wrote:
> On Thu, 13 Sep 2012, Kay Sievers wrote:
> 
> > Date: Thu, 13 Sep 2012 00:43:01 +0200
> > From: Kay Sievers <kay@xxxxxxxx>
> > To: Lukas Czerner <lczerner@xxxxxxxxxx>
> > Cc: util-linux@xxxxxxxxxxxxxxx, kzak@xxxxxxxxxx
> > Subject: Re: [PATCH] blkdiscard: add new command
> > 
> > On Wed, Sep 12, 2012 at 11:49 PM, Lukas Czerner <lczerner@xxxxxxxxxx> wrote:
> > > blkdiscard is used to discard device sectors. This is useful for
> > > solid-state drivers (SSDs) and thinly-provisioned storage. Unlike
> > > fstrim this command is used directly on the block device.
> > 
> > Should this maybe live in blockdev(8)?
> > 
> > It's kind of unfortunate to create standalone tools for every other
> > rather exotic block device feature.
> 
> Discard is hardly exotic feature nowadays :). But anyway, I was not aware of
> blockdev(8) and indeed it seems like a better place to put this
> functionality. I'll look into it.

 That's question ... we already have fstrim which is also wrapper for
 one ioctl and it seems that your blkdiscard requires some logic
 (devsize, sectorsize, align ranges, ...). We usually use blockdev
 for pretty primitive ioctls, add something more complex will be hack
 (like --getsz or --report).

 It's UNIX, it's not so unusual that utils do one thing and do it well ;-)

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux