[dm-devel] [PATCH 3/3] block: implement (some of) fallocate for block devices

2016-09-29 Thread Darrick J. Wong
After much discussion, it seems that the fallocate feature flag FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature FALLOC_FL_PUNCH_HOLE maps nicely to the devices that have been whitelisted for zeroing SCSI UNMAP. Punch still requires that FALLOC_FL_KEEP_SIZE is set. A length th

Re: [dm-devel] [PATCH 3/3] block: implement (some of) fallocate for block devices

2016-09-28 Thread Hannes Reinecke
On 09/29/2016 02:39 AM, Darrick J. Wong wrote: > After much discussion, it seems that the fallocate feature flag > FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature > FALLOC_FL_PUNCH_HOLE maps nicely to the devices that have been > whitelisted for zeroing SCSI UNMAP. Punch still

Re: [dm-devel] [PATCH 3/3] block: implement (some of) fallocate for block devices

2016-09-28 Thread Darrick J. Wong
On Wed, Sep 28, 2016 at 06:42:14PM -0700, Bart Van Assche wrote: > On 09/28/16 17:39, Darrick J. Wong wrote: > >+if (end > isize) { > >+if (mode & FALLOC_FL_KEEP_SIZE) { > >+len = isize - start; > >+end = start + len - 1; > >+} els

Re: [dm-devel] [PATCH 3/3] block: implement (some of) fallocate for block devices

2016-09-28 Thread Bart Van Assche
On 09/28/16 17:39, Darrick J. Wong wrote: + if (end > isize) { + if (mode & FALLOC_FL_KEEP_SIZE) { + len = isize - start; + end = start + len - 1; + } else + return -EINVAL; + } If FALLOC_F

[dm-devel] [PATCH 3/3] block: implement (some of) fallocate for block devices

2016-09-28 Thread Darrick J. Wong
After much discussion, it seems that the fallocate feature flag FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature FALLOC_FL_PUNCH_HOLE maps nicely to the devices that have been whitelisted for zeroing SCSI UNMAP. Punch still requires that FALLOC_FL_KEEP_SIZE is set. A length th

[dm-devel] [PATCH 3/3] block: implement (some of) fallocate for block devices

2016-08-25 Thread Darrick J. Wong
After much discussion, it seems that the fallocate feature flag FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature FALLOC_FL_PUNCH_HOLE maps nicely to the devices that have been whitelisted for zeroing SCSI UNMAP. Punch still requires that FALLOC_FL_KEEP_SIZE is set. A length th

[dm-devel] [PATCH 3/3] block: implement (some of) fallocate for block devices

2016-06-16 Thread Darrick J. Wong
After much discussion, it seems that the fallocate feature flag FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature FALLOC_FL_PUNCH_HOLE maps nicely to the devices that have been whitelisted for zeroing SCSI UNMAP. Punch still requires that FALLOC_FL_KEEP_SIZE is set. A length th

[dm-devel] [PATCH 3/3] block: implement (some of) fallocate for block devices

2016-04-12 Thread Darrick J. Wong
After much discussion, it seems that the fallocate feature flag FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature FALLOC_FL_PUNCH_HOLE maps nicely to the devices that have been whitelisted for zeroing SCSI UNMAP. Punch still requires that FALLOC_FL_KEEP_SIZE is set. A length th

Re: [dm-devel] [PATCH 3/3] block: implement (some of) fallocate for block devices

2016-03-22 Thread Brian Foster
On Mon, Mar 21, 2016 at 03:22:29PM -0400, Mike Snitzer wrote: > On Mon, Mar 21 2016 at 3:11pm -0400, > Darrick J. Wong wrote: > > > On Mon, Mar 21, 2016 at 02:52:00PM -0400, Mike Snitzer wrote: > > > On Tue, Mar 15, 2016 at 3:42 PM, Darrick J. Wong > > > wrote: > > > > After much discussion, it

Re: [dm-devel] [PATCH 3/3] block: implement (some of) fallocate for block devices

2016-03-21 Thread Mike Snitzer
On Mon, Mar 21 2016 at 3:11pm -0400, Darrick J. Wong wrote: > On Mon, Mar 21, 2016 at 02:52:00PM -0400, Mike Snitzer wrote: > > On Tue, Mar 15, 2016 at 3:42 PM, Darrick J. Wong > > wrote: > > > After much discussion, it seems that the fallocate feature flag > > > FALLOC_FL_ZERO_RANGE maps nicel

Re: [dm-devel] [PATCH 3/3] block: implement (some of) fallocate for block devices

2016-03-21 Thread Darrick J. Wong
On Mon, Mar 21, 2016 at 02:52:00PM -0400, Mike Snitzer wrote: > On Tue, Mar 15, 2016 at 3:42 PM, Darrick J. Wong > wrote: > > After much discussion, it seems that the fallocate feature flag > > FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature > > FALLOC_FL_PUNCH_HOLE maps nicel

Re: [dm-devel] [PATCH 3/3] block: implement (some of) fallocate for block devices

2016-03-21 Thread Mike Snitzer
On Tue, Mar 15, 2016 at 3:42 PM, Darrick J. Wong wrote: > After much discussion, it seems that the fallocate feature flag > FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature > FALLOC_FL_PUNCH_HOLE maps nicely to the devices that have been > whitelisted for zeroing SCSI UNMAP. P