On 05/19/2017 12:46 AM, Omar Sandoval wrote:
> Looking at this some more, it seems like the syzkaller reproducer always
> bangs on /dev/sg0. How hard would it be to adapt it to run on the sg
> device for every test device instead?
Can't be too hard I guess ;-).
Maybe I can even clean it up a bit
On Tue, May 09, 2017 at 11:49:08AM -0400, Jeff Layton wrote:
> Nothing checks its return value.
Reviewed-by: Liu Bo
-liubo
>
> Signed-off-by: Jeff Layton
> ---
> fs/btrfs/disk-io.c | 6 +++---
> fs/btrfs/disk-io.h | 2 +-
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs
The function is only used when CONFIG_PPC_PMAC=y. Adding the attribute
fixes the following warning when building with clang:
block/partitions/mac.c:22:20: error: unused function 'mac_fix_string'
[-Werror,-Wunused-function]
Signed-off-by: Matthias Kaehlcke
---
block/partitions/mac.c | 2 +-
Hi Ming, Dmitry,
Ming,
> Also the following patch fixes one issue in remove path.
>
> http://marc.info/?l=linux-block&m=149498450028434&w=2
>
> So could you test v4.12-rc1(d3cfb2a0 is merged) with the above patch?
Thanks for the suggestion but it still resulted in the same BUG.
Dmitry,
On Thu, May 18, 2017 at 03:29:45PM +0200, Johannes Thumshirn wrote:
> On 05/18/2017 03:19 PM, Christoph Hellwig wrote:
> > All SG_IO test should also apply to block device nodes that support
> > the ioctl..
> >
>
> But these are not necessarily SG_IO tests, are they?
>
> The test included is doe
On Thu, May 18, 2017 at 02:06:20PM -0700, Omar Sandoval wrote:
> On Thu, May 18, 2017 at 02:13:07PM +0200, Johannes Thumshirn wrote:
> > Add a test group for tests of the SCSI generic driver and and
> > functions common to the SCSI generic driver and it's test cases.
> >
> > Signed-off-by: Johanne
On Thu, May 18, 2017 at 02:13:08PM +0200, Johannes Thumshirn wrote:
> Add a regression test for commit 48ae8484e9fc ("scsi: sg: don't return
> bogus Sg_requests"). This is a general protection fault triggered by
> syzcaller.
>
> Signed-off-by: Johannes Thumshirn
> ---
> tests/sg/001 | 48 +++
On Thu, May 18, 2017 at 02:13:07PM +0200, Johannes Thumshirn wrote:
> Add a test group for tests of the SCSI generic driver and and
> functions common to the SCSI generic driver and it's test cases.
>
> Signed-off-by: Johannes Thumshirn
> ---
> common/sg | 22 ++
> tests
On Thu, May 18, 2017 at 11:35:43PM +0800, Ming Lei wrote:
> On Thu, May 18, 2017 at 03:49:31PM +0200, Christoph Hellwig wrote:
> > On Wed, May 17, 2017 at 09:27:29AM +0800, Ming Lei wrote:
> > > If some writeback requests are submitted just before queue is killed,
> > > and these requests may not b
On Thu, May 18, 2017 at 03:49:31PM +0200, Christoph Hellwig wrote:
> On Wed, May 17, 2017 at 09:27:29AM +0800, Ming Lei wrote:
> > If some writeback requests are submitted just before queue is killed,
> > and these requests may not be canceled in nvme_dev_disable() because
> > they are not started
On Thu, May 18, 2017 at 03:47:34PM +0200, Christoph Hellwig wrote:
> On Wed, May 17, 2017 at 09:27:28AM +0800, Ming Lei wrote:
> > When one NVMe PCI device is being resetted and found reset failue,
> > nvme_remove_dead_ctrl() is called to handle the failure: blk-mq hw queues
> > are put into stoppe
On Thu, May 18, 2017 at 03:17:57PM +0200, Christoph Hellwig wrote:
> This series introduces a new blk_status_t error code type for the block
> layer so that we can have tigher control and explicit semantics for
> block layer errors.
>
> All but the last three patches are cleanups that lead to the
On Thu, 2017-05-18 at 15:18 +0200, Christoph Hellwig wrote:
> We've cleaned up our headers sufficiently that we don't need this split
> anymore.
Hello Christoph,
Request-based drivers need the structure definitions from and
the type definitions from but do not need the definition of
struct bio.
Jon Derrick writes:
> Hello,
>
> I've encountered a BUG that I've experienced during hot removal on an
> ext4-formatted nvme device undergoing writes. I have been able to verify
> that 4.5, 4.6, 4.10.12, 4.11, and 4.12-rc1 show similar issues (the v4.6
> trace below shows issues with block that h
On Wed, May 17, 2017 at 09:27:28AM +0800, Ming Lei wrote:
> When one NVMe PCI device is being resetted and found reset failue,
> nvme_remove_dead_ctrl() is called to handle the failure: blk-mq hw queues
> are put into stopped first, then schedule .remove_work to release the driver.
>
> Unfortunate
On Wed, May 17, 2017 at 09:27:29AM +0800, Ming Lei wrote:
> If some writeback requests are submitted just before queue is killed,
> and these requests may not be canceled in nvme_dev_disable() because
> they are not started yet, it is still possible for blk-mq to hold
> these requests in .requeue l
On Wed, May 17, 2017 at 09:27:28AM +0800, Ming Lei wrote:
> When one NVMe PCI device is being resetted and found reset failue,
> nvme_remove_dead_ctrl() is called to handle the failure: blk-mq hw queues
> are put into stopped first, then schedule .remove_work to release the driver.
>
> Unfortunate
On Thu, May 18, 2017 at 2:42 PM, Adrian Hunter wrote:
> On 18/05/17 11:21, Linus Walleij wrote:
>> It's better to do what everyone else does and let the core do this
>> allocation of extra data (tag) instead.
>
> I agree it is much nicer, but the extra bounce buffer allocations still seem
> gratu
On 05/18/2017 03:19 PM, Christoph Hellwig wrote:
> All SG_IO test should also apply to block device nodes that support
> the ioctl..
>
But these are not necessarily SG_IO tests, are they?
The test included is doesn't hit the SG_IO path in the sg driver, but
the sg_read path.
Of cause we can mak
We will only have sense data if the command exectured and got a SCSI
result, so this is pointless.
Signed-off-by: Christoph Hellwig
---
drivers/scsi/osd/osd_initiator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_ini
This series introduces a new blk_status_t error code type for the block
layer so that we can have tigher control and explicit semantics for
block layer errors.
All but the last three patches are cleanups that lead to the new type.
The series it mostly limited to the block layer and drivers, and t
Signed-off-by: Christoph Hellwig
---
fs/gfs2/incore.h | 1 -
fs/gfs2/lops.c | 4 +---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index b7cf65d13561..aa3d44527fa2 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -815,7 +815,6 @@ struc
A few (but not all) dm targets use a special EWOULDBLOCK error code for
failing REQ_RAHEAD requests that fail due to a lack of available resources.
But no one else knows about this magic code, and lower level drivers also
don't generate it when failing read-ahead requests for similar reasons.
So r
Instead of reinventing it poorly.
Signed-off-by: Christoph Hellwig
Reviewed-by: Javier González
---
drivers/nvme/host/lightnvm.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index f5df78ed1e10..f3885
Signed-off-by: Christoph Hellwig
---
fs/btrfs/inode.c | 6 +++---
fs/direct-io.c | 3 +--
include/linux/fs.h | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 17cbe9306faf..758b2666885e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btr
Once we move the block layer to its own status code we'll still want to
propagate the bio_iov_iter_get_pages, so restructure __blkdev_direct_IO
to take ret into account when returning the errno.
---
fs/block_dev.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/block_
This simplifies the code and especially the error passing a bit and
will help with the next patch.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-mpath.c | 42 --
1 file changed, 16 insertions(+), 26 deletions(-)
diff --git a/drivers/md/dm-mpath.c b/d
Turn the error paramter into a pointer so that target drivers can change
the value, and make sure only DM_ENDIO_* values are returned from the
methods.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-cache-target.c | 4 ++--
drivers/md/dm-flakey.c| 8
drivers/md/dm-log-wri
We've cleaned up our headers sufficiently that we don't need this split
anymore.
Signed-off-by: Christoph Hellwig
---
block/blk-wbt.c| 2 +-
drivers/target/target_core_pscsi.c | 2 +-
include/linux/bio.h| 307 +++-
include/l
This way writeback.h doesn't need to pull in blk_types.h.
Signed-off-by: Christoph Hellwig
---
fs/fs-writeback.c | 13 +
include/linux/writeback.h | 11 +--
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 63
All SG_IO test should also apply to block device nodes that support
the ioctl..
Use the same values for use for request completion errors as the return
value from ->queue_rq. BLK_STS_RESOURCE is special cased to cause
a requeue, and all the others are completed as-is.
Signed-off-by: Christoph Hellwig
---
block/blk-mq.c| 37 --
Instead use the special DM_MAPIO_KILL return value to return -EIO just
like we do for the request based path. Note that dm-log-writes returned
-ENOMEM in a few places, which now becomes -EIO instead. No consumer
treats -ENOMEM special so this shouldn't be an issue (and it should
use a mempool to
Only read bio->bi_error once in the common path.
Signed-off-by: Christoph Hellwig
---
fs/direct-io.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 04247a6c3f73..bb711e4b86c2 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -477
On 18/05/17 11:21, Linus Walleij wrote:
> On Tue, May 16, 2017 at 1:54 PM, Adrian Hunter
> wrote:
>> On 10/05/17 11:24, Linus Walleij wrote:
>>> The mmc_queue_req is a per-request state container the MMC core uses
>>> to carry bounce buffers, pointers to asynchronous requests and so on.
>>> Curre
On Thu, May 18, 2017 at 11:32 AM, Christoph Hellwig wrote:
> Btw, you can also remove the struct request backpointer in
> struct mmc_queue_req now - blk_mq_rq_from_pdu will do it for you
> without the need for a pointer.
Thanks I made a patch for this in the front of my next clean-up
series.
Yo
Add a test group for tests of the SCSI generic driver and and
functions common to the SCSI generic driver and it's test cases.
Signed-off-by: Johannes Thumshirn
---
common/sg | 22 ++
tests/sg/group | 40
2 files changed, 62 inser
Add a test group for the SCSI generic driver and one syzcaller
reproducer for this group.
The reprodcuer is distributed as a C program, so the makefile is
amended to build C files to be used in the test.
I didn't get the TIMEOUT to work (not even with block/001) so I
decided to just require the '
Add a regression test for commit 48ae8484e9fc ("scsi: sg: don't return
bogus Sg_requests"). This is a general protection fault triggered by
syzcaller.
Signed-off-by: Johannes Thumshirn
---
tests/sg/001 | 48
tests/sg/001.out | 2 ++
2 files c
Add the ability to build test cases from C files. This is handy for
things like syzcaller reproducers and all other kinds of test
binaries.
Signed-off-by: Johannes Thumshirn
---
Makefile | 26 +++-
src/.gitignore | 1 +
src/Makefile | 14 ++
src/sg-001.c | 430 +
On Wed, Mar 29, 2017 at 05:09:37AM +0200, Linus Walleij wrote:
> 2. When MMC cards are ejected a serious error condition occurs. So for this
> reason we spool out the queue with
>
> req->rq_flags |= RQF_QUIET;
> blk_end_request_all(req, -EIO);
>
> This will shut up a huge amount of console errors
On Tue, Apr 18, 2017 at 5:31 PM, Alex Lemberg wrote:
> There is an additional functionality, which is require the host lock
> to be held for several write commands - the FFU.
> In case of FFU, the FW can be download/write in several iterations
> of Write command (CMD25). This sequence should not
On Thu, May 18, 2017 at 11:29:34AM +0200, Linus Walleij wrote:
> We are storing the ioctl() in/out argument as a pointer in
> the per-request struct mmc_blk_request container.
Btw, for the main ioctl data (not the little reponse field) it might
make sense to use blk_rq_map_user, which will do a ge
Btw, you can also remove the struct request backpointer in
struct mmc_queue_req now - blk_mq_rq_from_pdu will do it for you
without the need for a pointer.
This wraps single ioctl() commands into block requests using
the custom block layer request types REQ_OP_DRV_IN and
REQ_OP_DRV_OUT.
By doing this we are loosening the grip on the big host lock,
since two calls to mmc_get_card()/mmc_put_card() are removed.
We are storing the ioctl() in/out argumen
commit cdf8a6fb48882651049e468e6b16956fb83db86c
"mmc: block: Introduce queue semantics"
deleted the last user of mmc_req_is_special() and it was
a horrible hack to classify requests as "special" or
"not special" to begin with, so delete the helper.
Signed-off-by: Linus Walleij
---
ChangeLog v1->v
This switches also the multiple-command ioctl() call to issue
all ioctl()s through the block layer instead of going directly
to the device.
We extend the passed argument with an argument count and loop
over all passed commands in the ioctl() issue function called
from the block layer.
By doing th
The variable is_rpmb is clearly a bool and even assigned true
and false, yet declared as an int.
Signed-off-by: Linus Walleij
---
ChangeLog v1->v2:
- No changes, just resending
---
drivers/mmc/core/block.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/core/block
The mmc_queue_req is a per-request state container the MMC core uses
to carry bounce buffers, pointers to asynchronous requests and so on.
Currently allocated as a static array of objects, then as a request
comes in, a mmc_queue_req is assigned to it, and used during the
lifetime of the request.
T
This option is activated by all multiplatform configs and what
not so we almost always have it turned on, and the memory it
saves is negligible, even more so moving forward. The actual
bounce buffer only gets allocated only when used, the only
thing the ifdefs are saving is a little bit of code.
I
On Fri, May 12, 2017 at 11:09 PM, Avri Altman wrote:
>> + req = blk_get_request(mq->queue,
>> + idata[0]->ic.write_flag ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN,
>> + __GFP_RECLAIM);
>
> It is possible, e.g. as in RPMB access, that some commands are read and some
> are write.
On 05/16/2017 07:56 PM, Christoph Hellwig wrote:
On Tue, May 16, 2017 at 05:39:13PM +0800, Anand Jain wrote:
blkdev_issue_flush() is a blocking function and returns only after
the flush bio is completed, so a module handling more than one
device can't issue flush for all the devices unless it
On 05/18/2017 01:14 AM, David Sterba wrote:
On Tue, May 16, 2017 at 02:07:23PM +, Bart Van Assche wrote:
On Tue, 2017-05-16 at 17:39 +0800, Anand Jain wrote:
BTRFS wanted a block device flush function which does not wait for
its completion, so that the flush for the next device can be cal
On 05/16/2017 10:07 PM, Bart Van Assche wrote:
On Tue, 2017-05-16 at 17:39 +0800, Anand Jain wrote:
BTRFS wanted a block device flush function which does not wait for
its completion, so that the flush for the next device can be called
in the same thread.
Here is a RFC patch to provide the fun
On Tue, May 16, 2017 at 1:54 PM, Adrian Hunter wrote:
> On 10/05/17 11:24, Linus Walleij wrote:
>> The mmc_queue_req is a per-request state container the MMC core uses
>> to carry bounce buffers, pointers to asynchronous requests and so on.
>> Currently allocated as a static array of objects, then
On Tue, May 16, 2017 at 11:02 AM, Ulf Hansson wrote:
> On 10 May 2017 at 10:24, Linus Walleij wrote:
>> @@ -1662,7 +1655,7 @@ static void mmc_blk_rw_try_restart(struct mmc_queue
>> *mq, struct request *req,
>> if (mmc_card_removed(mq->card)) {
>> req->rq_flags |= RQF_QUI
On Mon, May 15, 2017 at 4:04 PM, Bartlomiej Zolnierkiewicz
wrote:
> [ I added Daniel, Marc & Steven to cc: ]
>> The option CONFIG_MMC_BLOCK_BOUNCE is default y so the
>> majority of platforms in the kernel already have it on, and
>> it then gets turned off at runtime since most of these have
>>
Hi Omar,
I was thinking of adding some of the syszcaller reproducers I've
collected, which have been crashing the SCSI generic driver.
This would require blktests to have a build infrastructure (not a big
deal I know).
So my question is, are you comfortable with adding these tests (in a new
grou
> Il giorno 17 mag 2017, alle ore 21:12, Tejun Heo ha scritto:
>
> Hello,
>
> On Mon, May 15, 2017 at 09:49:13PM +0200, Paolo Valente wrote:
>> So, unless you tell me that there are other races I haven't seen, or,
>> even worse, that I'm just talking nonsense, I have thought of a simple
>> solu
59 matches
Mail list logo