From: keith.busch@linux.intel.com (Keith Busch)
Subject: BLKZEROOUT ioctl and WriteZero opcode
Date: Fri, 4 May 2018 14:05:56 -0600 [thread overview]
Message-ID: <20180504200556.GA20686@localhost.localdomain> (raw)
In-Reply-To: <CAPrnrPDEdOFKxuZNQo_BhY8Nf2MfcB=DgbzDEDV7JHx5_+-gnQ@mail.gmail.com>
On Thu, May 03, 2018@06:15:54PM +0300, ???? ?? ??? wrote:
> There is an ioctl command BLKZEROOUT that accepts range (lba + number
> of block to zero)
>
> Suppose:
> Block device is an nvme device (e.g. /dev/nvme0nX)
> Device does support the WriteZeroes opcode.
>
> If so, does the kernel make use of the WriteZeroes opcode in the
> implementation of BLKZEROOUT ?
> Same question for BLKDISCARD.
The NVMe driver supports BLKDISACRD if the device supports the DSM
command.
The NVMe driver at the moment doesn't support the NVME Writes Zeroes
command. We had it briefly, but apparently broke Linus' machine; never
did figure out why. Relevent link:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cdb98c2698b4af287925abcba4d77d92af82a0c3
For devices that claim discard determinisitcally returns 0's on reads,
the driver will map the user BLKZEROOUT request to the DSM command
rather than NVMe Write Zeroes.
For testing NVMe Write Zeroes, the nvme passthrough ioctl may still
be used.
next prev parent reply other threads:[~2018-05-04 20:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 15:15 BLKZEROOUT ioctl and WriteZero opcode אייל בן דוד
2018-05-04 20:05 ` Keith Busch [this message]
2018-05-07 12:17 ` Eyal BenDavid
2018-05-07 15:14 ` Keith Busch
2018-05-07 16:14 ` Eyal BenDavid
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=20180504200556.GA20686@localhost.localdomain \
--to=keith.busch@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox