All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: "Lukáš Czerner" <lczerner@redhat.com>
Cc: Kay Sievers <kay@vrfy.org>, util-linux@vger.kernel.org
Subject: Re: [PATCH] blkdiscard: add new command
Date: Thu, 13 Sep 2012 15:57:27 +0200	[thread overview]
Message-ID: <20120913135727.GC13016@x2.net.home> (raw)
In-Reply-To: <alpine.LFD.2.00.1209130934290.2222@new-host-2>

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@vrfy.org>
> > To: Lukas Czerner <lczerner@redhat.com>
> > Cc: util-linux@vger.kernel.org, kzak@redhat.com
> > Subject: Re: [PATCH] blkdiscard: add new command
> > 
> > On Wed, Sep 12, 2012 at 11:49 PM, Lukas Czerner <lczerner@redhat.com> 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@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2012-09-13 13:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12 21:49 [PATCH] blkdiscard: add new command Lukas Czerner
2012-09-12 22:43 ` Kay Sievers
2012-09-12 22:47   ` Davidlohr Bueso
2012-09-13 13:37   ` Lukáš Czerner
2012-09-13 13:57     ` Karel Zak [this message]
2012-09-13 14:09       ` Lukáš Czerner
2012-09-13 15:33       ` Kay Sievers
2012-09-13 15:52         ` Lukáš Czerner
2012-09-13 15:32     ` Kay Sievers
2012-09-26 19:47 ` Lukáš Czerner
2012-09-26 20:04   ` Kay Sievers
2012-09-26 20:14     ` Lukáš Czerner
2012-09-26 20:27       ` Kay Sievers
2012-09-26 21:01         ` Lukáš Czerner
2012-09-27  9:42   ` Karel Zak
2012-09-27 15:21     ` Lukáš Czerner
2012-09-27 15:49       ` Martin K. Petersen
2012-09-27 17:03         ` Lukáš Czerner
2012-09-27 17:03           ` Lukáš Czerner
2012-09-27 17:33           ` Martin K. Petersen
2012-09-27 17:33             ` Martin K. Petersen
2012-09-27 23:17         ` Karel Zak
2012-09-27 23:13 ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120913135727.GC13016@x2.net.home \
    --to=kzak@redhat.com \
    --cc=kay@vrfy.org \
    --cc=lczerner@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.