Re: [Lsf] LSF/MM Schedule and improving discard support

2016-04-13 Thread Douglas Gilbert
On 16-04-13 01:30 PM, Darrick J. Wong wrote: On Wed, Apr 13, 2016 at 09:51:04AM -0700, James Bottomley wrote: On Wed, 2016-04-13 at 09:29 -0700, Bart Van Assche wrote: On 04/13/2016 09:21 AM, Martin K. Petersen wrote: From a filesystem/ioctl perspective, BLKDISCARD is a hint. We should not be

Re: [Lsf] LSF/MM Schedule and improving discard support

2016-04-13 Thread Darrick J. Wong
On Wed, Apr 13, 2016 at 09:51:04AM -0700, James Bottomley wrote: > On Wed, 2016-04-13 at 09:29 -0700, Bart Van Assche wrote: > > On 04/13/2016 09:21 AM, Martin K. Petersen wrote: > > > From a filesystem/ioctl perspective, BLKDISCARD is a hint. We > > > should not be > > > rounding off or aligning a

Re: [Lsf] LSF/MM Schedule and improving discard support

2016-04-13 Thread Martin K. Petersen
> "Bart" == Bart Van Assche writes: Bart> And if so, how should this code behave and if sector and/or Bart> nr_sectors is not a multiple of sdp->sector_size? As one can see Bart> the above code rounds down sector and nr_sectors while converting Bart> from sectors to logical blocks. This means

Re: [Lsf] LSF/MM Schedule and improving discard support

2016-04-13 Thread Bart Van Assche
On 04/13/2016 09:43 AM, Martin K. Petersen wrote: "Bart" == Bart Van Assche writes: Bart> Today if a BLKDISCARD ioctl passes a non-aligned start and/or end Bart> sector to the kernel then the block layer will submit invalid Bart> (non-aligned) REQ_DISCARD requests to the block driver the ioctl

Re: [Lsf] LSF/MM Schedule and improving discard support

2016-04-13 Thread James Bottomley
On Wed, 2016-04-13 at 09:29 -0700, Bart Van Assche wrote: > On 04/13/2016 09:21 AM, Martin K. Petersen wrote: > > From a filesystem/ioctl perspective, BLKDISCARD is a hint. We > > should not be > > rounding off or aligning anything. > > Hello Martin, > > Today if a BLKDISCARD ioctl passes a non-a

Re: [Lsf] LSF/MM Schedule and improving discard support

2016-04-13 Thread Martin K. Petersen
> "Bart" == Bart Van Assche writes: Bart> Today if a BLKDISCARD ioctl passes a non-aligned start and/or end Bart> sector to the kernel then the block layer will submit invalid Bart> (non-aligned) REQ_DISCARD requests to the block driver the ioctl Bart> applies to. I do not know what you mean