On Fri, Nov 13, 2015 at 08:47:20AM -0700, Jens Axboe wrote:
> On 11/10/2015 11:14 PM, Darrick J. Wong wrote:
> >On Wed, Nov 11, 2015 at 05:30:07AM +, Seymour, Shane M wrote:
> >>A quick question about this part of the patch:
> >>
> >>>+ uint64_t end = start + len - 1;
> >>
> >>>+ if (end >= i
On 11/10/2015 11:14 PM, Darrick J. Wong wrote:
On Wed, Nov 11, 2015 at 05:30:07AM +, Seymour, Shane M wrote:
A quick question about this part of the patch:
+ uint64_t end = start + len - 1;
+ if (end >= i_size_read(bdev->bd_inode))
return -EINVAL;
+
> I don't have a device large enough to test for signedness errors, since
> passing
> huge values for start and len never make it past the i_size_read check.
If you have someone trying to bypass your sanity checks then if
start=18446744073709551104 and len=1024 the result of adding them togethe
> which would make the other checks I suggested to ensure that neither start
> or end were more than (uint64_t)LLONG_MAX unnecessary.
My apologies I was wrong about what I said above - after thinking about it for
longer you still need to make sure that at least len is not greater than
(uint64_t)
> I don't have a device large enough to test for signedness errors, since
> passing
> huge values for start and len never make it past the i_size_read check.
> However, I do see that I forgot to check the padding values, so I'll update
> that.
Then do you want to at least consider converting end
On Wed, Nov 11, 2015 at 05:30:07AM +, Seymour, Shane M wrote:
> A quick question about this part of the patch:
>
> > + uint64_t end = start + len - 1;
>
> > + if (end >= i_size_read(bdev->bd_inode))
> return -EINVAL;
>
> > + /* Invalidate the page cache, including dirty
A quick question about this part of the patch:
> + uint64_t end = start + len - 1;
> + if (end >= i_size_read(bdev->bd_inode))
return -EINVAL;
> + /* Invalidate the page cache, including dirty pages */
> + mapping = bdev->bd_inode->i_mapping;
> + truncate_ino
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 disc
So, uh, it's been a couple of weeks...
Jens: Any comments? Nobody's objected to either the function or the interface;
can this go in -next?
--D
On Wed, Jan 28, 2015 at 06:00:25PM -0800, Darrick J. Wong wrote:
> Create a new ioctl to expose the block layer's newfound ability to
> issue either a
> "Darrick" == Darrick J Wong writes:
Darrick> Create a new ioctl to expose the block layer's newfound ability
Darrick> to issue either a zeroing discard, a WRITE SAME with a zero
Darrick> page, or a regular write with the zero page. This BLKZEROOUT2
Darrick> ioctl takes {start, length, flag
On Thursday 29 January 2015 11:01:02 Darrick J. Wong wrote:
> It won't do all-ones, because the underlying blkdev_issue_zeroout call only
> knows how to tell the device to write zeroes or perform a discard if the flag
> is set and the device is whitelisted. This patch only exposes the existing
> k
On Thu, Jan 29, 2015 at 11:02:58AM +0100, Arnd Bergmann wrote:
> On Wednesday 28 January 2015 18:00:25 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 zer
org; linux-
> fsde...@vger.kernel.org; linux-...@vger.kernel.org; Jeff Layton; J. Bruce
> Fields
> Subject: Re: [RESEND] [PATCH] block: create ioctl to discard-or-zeroout a
> range of blocks
>
> On Wednesday 28 January 2015 18:00:25 Darrick J. Wong wrote:
> > Create a new
On Wednesday 28 January 2015 18:00:25 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 param
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 disc
15 matches
Mail list logo