From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>,
"Seymour, Shane M" <shane.seymour@hpe.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
Jeff Layton <jlayton@poochiereds.net>,
"J. Bruce Fields" <bfields@fieldses.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Subject: Re: [PATCH v4] block: create ioctl to discard-or-zeroout a range of blocks
Date: Mon, 7 Dec 2015 21:28:30 -0800 [thread overview]
Message-ID: <20151208052830.GC10584@birch.djwong.org> (raw)
In-Reply-To: <20151208024015.GA18458@infradead.org>
On Mon, Dec 07, 2015 at 06:40:15PM -0800, Christoph Hellwig wrote:
> On Fri, Nov 13, 2015 at 02:01:43PM -0800, Darrick J. Wong wrote:
> > Create a new ioctl to expose the block layer's newfound ability to
> > issue either a zeroing discard, a WRITE SAME with a zero page, or a
> > regular write with the zero page. This BLKZEROOUT2 ioctl takes
> > {start, length, flags} as parameters. So far, the only flag available
> > is to enable the zeroing discard part -- without it, the call invokes
> > the old BLKZEROOUT behavior. start and length have the same meaning
> > as in BLKZEROOUT.
> >
> > Furthermore, because BLKZEROOUT2 issues commands directly to the
> > storage device, we must invalidate the page cache (as a regular
> > O_DIRECT write would do) to avoid returning stale cache contents at a
> > later time.
>
> So does BLKZEROOUT. Seems like adding the cache invalidation should
> be one patch and the ioctl another one. Otherwise this looks fine
> except that I kinda hate BLKZEROOUT2 name, but can't come up with
> anything better.
I should've sent the 4.4 version -- since the ioctl code was refactored into
separate functions and the new function modifies its arguments, I ended up
rewriting most of the function body just to set up the page cache invalidation.
(Ah, I see -- 4.4-rc1 came out and I forgot to resend.)
Blergh, v5 on its way...
--D
> --
> To unsubscribe from this list: send the line "unsubscribe linux-api" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2015-12-08 5:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-13 22:01 [PATCH v4] block: create ioctl to discard-or-zeroout a range of blocks Darrick J. Wong
2015-11-16 22:56 ` Seymour, Shane M
[not found] ` <20151113220143.GE2217-PTl6brltDGh4DFYR7WNSRA@public.gmane.org>
2015-12-08 1:16 ` Martin K. Petersen
2015-12-08 2:40 ` Christoph Hellwig
2015-12-08 5:28 ` Darrick J. Wong [this message]
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=20151208052830.GC10584@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=axboe@kernel.dk \
--cc=bfields@fieldses.org \
--cc=hch@infradead.org \
--cc=jlayton@poochiereds.net \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=shane.seymour@hpe.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;
as well as URLs for NNTP newsgroup(s).