Re: [PATCH] block: Force sector and nr_sects to device alignment and granularity.

2014-03-14 Thread Martin K. Petersen
> "Frank" == Frank Mayhar writes: Frank, Frank> Well, in this particular case the driver is filling in the Frank> relevant information (alignment and granularity) and then Frank> complaining later that that information has been ignored. As I Frank> intimated earlier, it seems a little odd t

Re: [PATCH] block: Force sector and nr_sects to device alignment and granularity.

2014-03-14 Thread Frank Mayhar
On Wed, 2014-03-12 at 21:47 -0400, Martin K. Petersen wrote: > I'm no big fan of dropping information. > > My original intent with the discard granularity and alignment was to > allow filesystems to use them to influence block allocation and layout. > Not to affect how we issue commands at runtime

Re: [PATCH] block: Force sector and nr_sects to device alignment and granularity.

2014-03-12 Thread Martin K. Petersen
> "Jeff" == Jeff Moyer writes: >> The case that we were seeing was with an SSD that required TRIM on 8k >> boundaries and with an 8k granularity. Since the file system was >> trying to do discards based on 4k alignment the driver complained >> mightily. Jeff> but you managed to read my mind

Re: [PATCH] block: Force sector and nr_sects to device alignment and granularity.

2014-03-12 Thread Frank Mayhar
On Wed, 2014-03-12 at 15:33 -0400, Jeff Moyer wrote: > No, TRIM is advisory, even for well-formed TRIMs. I guess you could > alter the definition of successful and have a correct statement there. Yeah, you're right. How about "is more likely to be successful." > Sure, there's no sense getting i

Re: [PATCH] block: Force sector and nr_sects to device alignment and granularity.

2014-03-12 Thread Jeff Moyer
Frank Mayhar writes: > On Wed, 2014-03-12 at 14:20 -0400, Jeff Moyer wrote: >> but you managed to read my mind well enough. The question is how high >> up the stack do you put the logic for this? Is it worth it to duplicate >> the checks in the OS that are already done on the device? I don't >

Re: [PATCH] block: Force sector and nr_sects to device alignment and granularity.

2014-03-12 Thread Frank Mayhar
On Wed, 2014-03-12 at 14:20 -0400, Jeff Moyer wrote: > but you managed to read my mind well enough. The question is how high > up the stack do you put the logic for this? Is it worth it to duplicate > the checks in the OS that are already done on the device? I don't > know. Martin, do you have

Re: [PATCH] block: Force sector and nr_sects to device alignment and granularity.

2014-03-12 Thread Jeff Moyer
Frank Mayhar writes: > On Tue, 2014-03-11 at 11:15 -0400, Jeff Moyer wrote: >> Frank Mayhar writes: >> >> > block: Force sector and nr_sects to device alignment and granularity. >> > >> > In blkdev_issue_discard(), rather than sending an improperly- >> > aligned discard to the device (where it

Re: [PATCH] block: Force sector and nr_sects to device alignment and granularity.

2014-03-12 Thread Frank Mayhar
On Mon, 2014-03-10 at 11:01 -0700, Frank Mayhar wrote: > block: Force sector and nr_sects to device alignment and granularity. Just FYI, I'll be going out for surgery next week and recovery for a couple of months after that. If anyone has any further questions or issues, either ask them this wee

Re: [PATCH] block: Force sector and nr_sects to device alignment and granularity.

2014-03-11 Thread Frank Mayhar
On Tue, 2014-03-11 at 11:15 -0400, Jeff Moyer wrote: > Frank Mayhar writes: > > > block: Force sector and nr_sects to device alignment and granularity. > > > > In blkdev_issue_discard(), rather than sending an improperly- > > aligned discard to the device (where it may get an error), > > adjust

Re: [PATCH] block: Force sector and nr_sects to device alignment and granularity.

2014-03-11 Thread Jeff Moyer
Frank Mayhar writes: > block: Force sector and nr_sects to device alignment and granularity. > > In blkdev_issue_discard(), rather than sending an improperly- > aligned discard to the device (where it may get an error), > adjust the start and length to the block device alignment and > granularit

[PATCH] block: Force sector and nr_sects to device alignment and granularity.

2014-03-10 Thread Frank Mayhar
block: Force sector and nr_sects to device alignment and granularity. In blkdev_issue_discard(), rather than sending an improperly- aligned discard to the device (where it may get an error), adjust the start and length to the block device alignment and granularity. Don't fail if this leaves noth