From: Mike Snitzer <snitzer@redhat.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org, dm-devel@redhat.com
Subject: Re: Is it deliberate that the device mapper is not passing the DISCARD ioctls
Date: Mon, 20 Sep 2010 14:55:41 -0400 [thread overview]
Message-ID: <20100920185541.GA29770@redhat.com> (raw)
In-Reply-To: <20100920174043.GA29057@redhat.com>
On Mon, Sep 20 2010 at 1:40pm -0400,
Mike Snitzer <snitzer@redhat.com> wrote:
> Hi Ted,
>
> On Mon, Sep 20 2010 at 9:14am -0400,
> Theodore Ts'o <tytso@mit.edu> wrote:
>
> > Hi there,
> >
> > I was just testing discard support in mke2fs, and I was surprised that
> > although the dm layer appears to pass discard requests through to the
> > underlying block device driver when submitted through the bio layer
> > (i.e., from kernel file systems), apparently the discard ioctls (i.e.,
> > BLKDISCARD, BLKDISCARDSEC, BLKDISCARDZEROES) are not currently wired up
> > in the dm layer.
>
> After enabling scsi tracing:
> # mount -t debugfs none /sys/kernel/debug
> # cd /sys/kernel/debug/tracing/
> # echo "scsi:*" > set_event
> # cat trace_pipe
>
> I'm not seeing a problem with BLKDISCARD (via mkfs.ext4) for either
> request-based DM (this is on a 2.6.36-rc4 kernel w/ the FLUSH+FUA patchset):
Here is a trace during mkfs.ext4 of a bio-based striped DM device (with
4 stripes) on a stock 2.6.36-rc4:
mkfs.ext4-3835 [000] 6050624.201765: scsi_dispatch_cmd_start: host_no=10 channel=0 id=0 lun=0 data_sgl=1 prot_sgl=0 cmnd=(UNMAP regions=1 raw=42 00 00 00 00 00 00 00 18 00)
mkfs.ext4-3835 [000] 6050624.201790: scsi_dispatch_cmd_start: host_no=10 channel=0 id=0 lun=0 data_sgl=1 prot_sgl=0 cmnd=(UNMAP regions=1 raw=42 00 00 00 00 00 00 00 18 00)
mkfs.ext4-3835 [000] 6050624.201806: scsi_dispatch_cmd_start: host_no=10 channel=0 id=0 lun=0 data_sgl=1 prot_sgl=0 cmnd=(UNMAP regions=1 raw=42 00 00 00 00 00 00 00 18 00)
mkfs.ext4-3835 [000] 6050624.201823: scsi_dispatch_cmd_start: host_no=10 channel=0 id=0 lun=0 data_sgl=1 prot_sgl=0 cmnd=(UNMAP regions=1 raw=42 00 00 00 00 00 00 00 18 00)
<idle>-0 [000] 6050624.202772: scsi_dispatch_cmd_done: host_no=10 channel=0 id=0 lun=0 data_sgl=1 prot_sgl=0 cmnd=(UNMAP regions=1 raw=42 00 00 00 00 00 00 00 18 00) result=(driver=DRIVER_OK host=DID_OK message=COMMAND_COMPLETE status=SAM_STAT_GOOD)
<idle>-0 [000] 6050624.202774: scsi_dispatch_cmd_done: host_no=10 channel=0 id=0 lun=0 data_sgl=1 prot_sgl=0 cmnd=(UNMAP regions=1 raw=42 00 00 00 00 00 00 00 18 00) result=(driver=DRIVER_OK host=DID_OK message=COMMAND_COMPLETE status=SAM_STAT_GOOD)
<idle>-0 [000] 6050624.202775: scsi_dispatch_cmd_done: host_no=10 channel=0 id=0 lun=0 data_sgl=1 prot_sgl=0 cmnd=(UNMAP regions=1 raw=42 00 00 00 00 00 00 00 18 00) result=(driver=DRIVER_OK host=DID_OK message=COMMAND_COMPLETE status=SAM_STAT_GOOD)
<idle>-0 [000] 6050624.202775: scsi_dispatch_cmd_done: host_no=10 channel=0 id=0 lun=0 data_sgl=1 prot_sgl=0 cmnd=(UNMAP regions=1 raw=42 00 00 00 00 00 00 00 18 00) result=(driver=DRIVER_OK host=DID_OK message=COMMAND_COMPLETE status=SAM_STAT_GOOD)
next prev parent reply other threads:[~2010-09-20 18:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-20 13:14 Is it deliberate that the device mapper is not passing the DISCARD ioctls Theodore Ts'o
2010-09-20 17:40 ` Mike Snitzer
2010-09-20 18:55 ` Mike Snitzer [this message]
2010-09-21 10:42 ` Lukas Czerner
2010-09-21 19:47 ` Mike Snitzer
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=20100920185541.GA29770@redhat.com \
--to=snitzer@redhat.com \
--cc=dm-devel@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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.