[PATCH] sd, mmc, virtio_blk, string_helpers: fix block size units

2015-03-05 Thread James Bottomley
From: James Bottomley The current string_get_size() overflows when the device size goes over 2^64 bytes because the string helper routine computes the suffix from the size in bytes. However, the entirety of Linux thinks in terms of blocks, not bytes, so this will artificially induce an overflow

Re: [PATCH 0/25] Replace DEFINE_PCI_DEVICE_TABLE macro use

2014-07-18 Thread James Bottomley
On Fri, 2014-07-18 at 11:17 -0700, Greg KH wrote: > On Fri, Jul 18, 2014 at 09:54:32AM -0700, James Bottomley wrote: > > On Fri, 2014-07-18 at 09:43 -0700, Greg KH wrote: > > > On Fri, Jul 18, 2014 at 12:22:13PM -0400, John W. Linville wrote: > > > > On Fri, Ju

Re: [PATCH 0/25] Replace DEFINE_PCI_DEVICE_TABLE macro use

2014-07-18 Thread James Bottomley
On Fri, 2014-07-18 at 09:43 -0700, Greg KH wrote: > On Fri, Jul 18, 2014 at 12:22:13PM -0400, John W. Linville wrote: > > On Fri, Jul 18, 2014 at 05:26:47PM +0200, Benoit Taine wrote: > > > We should prefer `const struct pci_device_id` over > > > `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding styl

Re: [PATCH 0/25] Replace DEFINE_PCI_DEVICE_TABLE macro use

2014-07-18 Thread James Bottomley
On Fri, 2014-07-18 at 17:26 +0200, Benoit Taine wrote: > We should prefer `const struct pci_device_id` over > `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. > This issue was reported by checkpatch. What kernel coding style? checkpatch isn't the arbiter of style, if that's the o

Re: [PATCH] Fix uses of dma_max_pfn() when converting to a limiting address

2014-02-13 Thread James Bottomley
On Thu, 2014-02-13 at 17:11 +, Russell King - ARM Linux wrote: > On Thu, Feb 13, 2014 at 08:58:10AM -0800, James Bottomley wrote: > > This doesn't really look like the right fix. You replaced dev->dma_mask > > with a calculation on dev_max_pfn(). Since dev->dma_

Re: [PATCH] Fix uses of dma_max_pfn() when converting to a limiting address

2014-02-13 Thread James Bottomley
On Tue, 2014-02-11 at 17:28 +, Russell King wrote: > We must use a 64-bit for this, otherwise overflowed bits get lost, and > that can result in a lower than intended value set. > > Fixes: 8e0cb8a1f6ac ("ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for > bounce_limit calculations") > Fixes:

Re: [PATCH v2 0/9] fix max discard sectors limit

2013-04-20 Thread James Bottomley
On Sat, 2013-04-20 at 01:40 +0900, Namjae Jeon wrote: > From: Namjae Jeon > > linux-v3.8-rc1 and later support for plug for blkdev_issue_discard with > commit 0cfbcafcae8b7364b5fa96c2b26ccde7a3a296a9 > (block: add plug for blkdev_issue_discard ) > > For example, > 1) DISCARD rq-1 with size size

Re: [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-17 Thread James Bottomley
On Thu, 2013-01-17 at 11:04 +, Russell King - ARM Linux wrote: > On Thu, Jan 17, 2013 at 11:01:47AM +0000, James Bottomley wrote: > > On Thu, 2013-01-17 at 10:47 +, Russell King - ARM Linux wrote: > > > Also, couldn't the addition of the scatterlist offset to the p

Re: [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-17 Thread James Bottomley
On Thu, 2013-01-17 at 10:47 +, Russell King - ARM Linux wrote: > On Thu, Jan 17, 2013 at 10:37:42AM +, Russell King - ARM Linux wrote: > > On Thu, Jan 17, 2013 at 09:11:20AM +0000, James Bottomley wrote: > > > I'd actually prefer page = pfn_to_page(page_to_pfn(page)

Re: [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-17 Thread James Bottomley
On Wed, 2013-01-16 at 15:18 -0800, Tejun Heo wrote: > On Wed, Jan 16, 2013 at 10:32:35AM +0000, James Bottomley wrote: > > diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c > > index 6b2fb87..ab88c5b 100644 > > --- a/arch/arm/mm/dma-mapping.c > > +++

Re: [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-17 Thread James Bottomley
On Wed, 2013-01-16 at 23:14 +, Russell King - ARM Linux wrote: > On Wed, Jan 16, 2013 at 10:32:35AM +0000, James Bottomley wrote: > > On Wed, 2013-01-16 at 12:07 +0530, Subhash Jadavani wrote: > > > > > Now consider this call stack from MMC block driver (this is o

Re: [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-16 Thread James Bottomley
. Fix this by doing the increment via the pfn, which will do the right thing whatever the memory model. Signed-off-by: James Bottomley --- diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 6b2fb87..ab88c5b 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-ma

Re: [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-16 Thread James Bottomley
On Wed, 2013-01-16 at 12:07 +0530, Subhash Jadavani wrote: > On 1/15/2013 9:49 PM, James Bottomley wrote: > > On Tue, 2013-01-15 at 21:31 +0530, Subhash Jadavani wrote: > >> blk_rq_map_sg() function merges the physically contiguous pages to use same > >> scatter-gath

Re: [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-15 Thread James Bottomley
On Tue, 2013-01-15 at 21:31 +0530, Subhash Jadavani wrote: > blk_rq_map_sg() function merges the physically contiguous pages to use same > scatter-gather node without checking if their page descriptors are > contiguous or not. > > Now when dma_map_sg() is called on the scatter gather list, it woul

Re: How to make kernel block layer generate bigger request in the request queue?

2010-04-12 Thread James Bottomley
On Mon, 2010-04-12 at 14:26 -0400, Martin K. Petersen wrote: > >>>>> "James" == James Bottomley writes: > > >> Correct. It's quite unlikely for pages to be contiguous so this is > >> the best we can do. > > James> Actually, avera

Re: How to make kernel block layer generate bigger request in the request queue?

2010-04-10 Thread James Bottomley
On Fri, 2010-04-09 at 22:05 -0400, Martin K. Petersen wrote: > > "Robert" == Robert Hancock writes: > > >> Did I miss something to make the block layer generate bigger size > >> data for every request in the request queue? Below is part of my > >> source code. Any comments are highly appreci