Re: [PATCH 3/3] block: Introduce blkdev_issue_zeroout_discard() function

2014-11-17 Thread Darrick J. Wong
On Fri, Nov 14, 2014 at 03:22:05PM -0500, Martin K. Petersen wrote: > > "Martin" == Martin K Petersen writes: > > Martin> What would you prefer as the default for the ext4 use case? To > Martin> allocate or to discard? > > I didn't get a preference for whether sb_issue_zeroout() should disca

Re: [PATCH 3/3] block: Introduce blkdev_issue_zeroout_discard() function

2014-11-14 Thread Martin K. Petersen
> "Martin" == Martin K Petersen writes: Martin> What would you prefer as the default for the ext4 use case? To Martin> allocate or to discard? I didn't get a preference for whether sb_issue_zeroout() should discard or allocate. But here's an updated patch 3... commit eb23c9e71e08b7f467cbc3

Re: [PATCH 3/3] block: Introduce blkdev_issue_zeroout_discard() function

2014-11-10 Thread Martin K. Petersen
> "Darrick" == Darrick J Wong writes: Darrick> Can this be plumbed into a BLK* ioctl too? I'll write a patch, Darrick> if this is ok with everyone: Darrick> ...and make it zap the page cache per earlier discussion. This Darrick> seems to be a good fit with what we've been discussing for Da

Re: [PATCH 3/3] block: Introduce blkdev_issue_zeroout_discard() function

2014-11-10 Thread Darrick J. Wong
On Fri, Nov 07, 2014 at 12:08:14AM -0500, Martin K. Petersen wrote: > blkdev_issue_discard() will zero a given block range on disk. This is > done by way of either WRITE SAME or regular WRITE. I.e. the blocks on > disk will be written and thus provisioned. > > There are use cases where the desired

Re: [PATCH 3/3] block: Introduce blkdev_issue_zeroout_discard() function

2014-11-07 Thread Martin K. Petersen
> "Ted" == Theodore Ts'o writes: Ted> So I'd be in favor of adding a flag to to blkdev_issue_zeroout(), Ted> and I would have a slight preference for also modifying Ted> sb_issue_zeroout so the flag gets plumbed all the way through to Ted> the fs-level callers. OK. I'll do that, then. I alwa

Re: [PATCH 3/3] block: Introduce blkdev_issue_zeroout_discard() function

2014-11-07 Thread Theodore Ts'o
On Fri, Nov 07, 2014 at 10:42:24AM -0500, Martin K. Petersen wrote: > > "Christoph" == Christoph Hellwig writes: > > Christoph> I'm not a fan of adding another function here and would > Christoph> prefer a flag, but it looks correct, > > That was my original approach too but I didn't want t

Re: [PATCH 3/3] block: Introduce blkdev_issue_zeroout_discard() function

2014-11-07 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> I'm not a fan of adding another function here and would Christoph> prefer a flag, but it looks correct, That was my original approach too but I didn't want to stomp over all the existing callers. Although there only are few. Ted: Which

Re: [PATCH 3/3] block: Introduce blkdev_issue_zeroout_discard() function

2014-11-07 Thread Christoph Hellwig
On Fri, Nov 07, 2014 at 12:08:14AM -0500, Martin K. Petersen wrote: > blkdev_issue_discard() will zero a given block range on disk. This is > done by way of either WRITE SAME or regular WRITE. I.e. the blocks on > disk will be written and thus provisioned. > > There are use cases where the desired

[PATCH 3/3] block: Introduce blkdev_issue_zeroout_discard() function

2014-11-06 Thread Martin K. Petersen
blkdev_issue_discard() will zero a given block range on disk. This is done by way of either WRITE SAME or regular WRITE. I.e. the blocks on disk will be written and thus provisioned. There are use cases where the desired behavior is to zero the blocks but unprovision them if possible. The blocks m