Re: [PATCH v4] sg: O_EXCL and other lock handling

2014-06-21 Thread Hannes Reinecke
On 06/13/2014 02:26 AM, Douglas Gilbert wrote: This is a re-presentation of a patch to the sg driver whose v3 was sent in November 2013: http://www.spinics.net/lists/linux-scsi/msg69957.html It addresses a problem reported by Vaughan Cao concerning the correctness of the O_EXCL logic in the s

[PATCH 7/9] [drivers/scsi] replace strict_strto calls

2014-06-21 Thread Daniel Walter
Replace obsolete strict_strto with more appropriate kstrto calls Signed-off-by: Daniel Walter --- drivers/scsi/pmcraid.c| 4 ++-- drivers/scsi/scsi_sysfs.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index be8ce54..

Re: sd_setup_discard_cmnd: BUG: unable to handle kernel NULL pointer dereference at (null)

2014-06-21 Thread Stefan Priebe
Hi Lars, Am 20.06.2014 20:29, schrieb Lars Ellenberg: On Fri, Jun 20, 2014 at 12:49:39PM -0400, Martin K. Petersen wrote: "Lars" == Lars Ellenberg writes: Lars, Lars> Any bio allocated that will be passed down with REQ_DISCARD has to Lars> be allocated with nr_iovecs = 1 (at least), even tho

RE: [PATCH 10/14] scsi: only maintain target_blocked if the driver has a target queue limit

2014-06-21 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: Christoph Hellwig [mailto:h...@lst.de] > Sent: Thursday, 12 June, 2014 8:49 AM > To: James Bottomley > Cc: Jens Axboe; Bart Van Assche; Elliott, Robert (Server Storage); linux- > s...@vger.kernel.org; linux-ker...@vger.kernel.org > Subject: [PATCH 10/14] scsi:

Re: 32-bit bug in iovec iterator changes

2014-06-21 Thread Theodore Ts'o
On Sat, Jun 21, 2014 at 06:53:07AM +0100, Al Viro wrote: > > ed include/linux/uio.h < /iov_iter_truncate/s/size_t/u64/ > w > q > EOF > > Could you check if that fixes the sucker? The following patch (attached at the end) appears to fix the problem, but looking at uio.h, I'm completely confused a

Re: 32-bit bug in iovec iterator changes

2014-06-21 Thread Al Viro
On Sat, Jun 21, 2014 at 07:09:22PM -0400, Theodore Ts'o wrote: > On Sat, Jun 21, 2014 at 06:53:07AM +0100, Al Viro wrote: > > > > ed include/linux/uio.h < > /iov_iter_truncate/s/size_t/u64/ > > w > > q > > EOF > > > > Could you check if that fixes the sucker? > > The following patch (attached at

Re: 32-bit bug in iovec iterator changes

2014-06-21 Thread James Bottomley
On Sun, 2014-06-22 at 00:49 +0100, Al Viro wrote: > On Sat, Jun 21, 2014 at 07:09:22PM -0400, Theodore Ts'o wrote: > > On Sat, Jun 21, 2014 at 06:53:07AM +0100, Al Viro wrote: > > > > > > ed include/linux/uio.h < > > /iov_iter_truncate/s/size_t/u64/ > > > w > > > q > > > EOF > > > > > > Could you

Re: 32-bit bug in iovec iterator changes

2014-06-21 Thread Al Viro
On Sat, Jun 21, 2014 at 05:03:20PM -0700, James Bottomley wrote: > > Anyway, does the following alone fix the problem you are seeing? > > > > diff --git a/include/linux/uio.h b/include/linux/uio.h > > index ddfdb53..dbb02d4 100644 > > --- a/include/linux/uio.h > > +++ b/include/linux/uio.h > > @@

Re: 32-bit bug in iovec iterator changes

2014-06-21 Thread James Bottomley
On Sun, 2014-06-22 at 01:26 +0100, Al Viro wrote: > On Sat, Jun 21, 2014 at 05:03:20PM -0700, James Bottomley wrote: > > > > Anyway, does the following alone fix the problem you are seeing? > > > > > > diff --git a/include/linux/uio.h b/include/linux/uio.h > > > index ddfdb53..dbb02d4 100644 > >

Re: 32-bit bug in iovec iterator changes

2014-06-21 Thread Al Viro
On Sat, Jun 21, 2014 at 05:32:44PM -0700, James Bottomley wrote: > > No, we are not. Look: > > * comparison promotes both operands to u64 here, so its result is > > accurate, no matter how large count is. They are compared as natural > > numbers. > > True ... figured this out 10 seconds afte

Re: 32-bit bug in iovec iterator changes

2014-06-21 Thread James Bottomley
On Sun, 2014-06-22 at 01:53 +0100, Al Viro wrote: > On Sat, Jun 21, 2014 at 05:32:44PM -0700, James Bottomley wrote: > > > No, we are not. Look: > > > * comparison promotes both operands to u64 here, so its result is > > > accurate, no matter how large count is. They are compared as natural > >

Re: 32-bit bug in iovec iterator changes

2014-06-21 Thread Al Viro
On Sun, Jun 22, 2014 at 01:53:52AM +0100, Al Viro wrote: > On Sat, Jun 21, 2014 at 05:32:44PM -0700, James Bottomley wrote: > > > No, we are not. Look: > > > * comparison promotes both operands to u64 here, so its result is > > > accurate, no matter how large count is. They are compared as natu