Re: [PATCH v2] nvme-tcp: Check if request has started before processing it

2021-03-31 Thread Hannes Reinecke
id frames. We can _not_ protect against maliciously crafted packets referencing any random _existing_ tag; that's what TLS is for. What we can do, though, is checking the 'state' field in the tcp request, and only allow completions for commands which are in a state allowing for completions. Let's see if

Re: [PATCH -next 1/5] block: add disk sequence number

2021-03-26 Thread Hannes Reinecke
4b45464a42-0001 uuid.3c6500ee-a775-4c89-b223-e9551f5a9f7a and for SCSI the wwid is part of the SCSI device: # cat /sys/block/sd*/device/wwid naa.600508b1001ce2e648a35b6ec14a3996 Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de

Re: [PATCH] scsi: Fix a double free in myrs_cleanup

2021-03-11 Thread Hannes Reinecke
release_region(cs->io_addr, 0x80); > - iounmap(cs->mmio_base); > pci_set_drvdata(pdev, NULL); > pci_disable_device(pdev); > scsi_host_put(cs->host); > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke

Re: [RFC PATCH v1 1/6] badblocks: add more helper structure and routines in badblocks.h

2021-03-03 Thread Hannes Reinecke
d sorted in a single page. > @@ -41,6 +42,14 @@ struct badblocks { > sector_t size; /* in sectors */ > }; > > +struct bad_context { > + sector_tstart; > + sector_tlen; > + int ack; > + sector_t orig_start;

Re: [PATCH] nvme-tcp: Check if request has started before processing it

2021-03-02 Thread Hannes Reinecke
On 3/1/21 9:59 PM, Keith Busch wrote: > On Mon, Mar 01, 2021 at 05:53:25PM +0100, Hannes Reinecke wrote: >> On 3/1/21 5:05 PM, Keith Busch wrote: >>> On Mon, Mar 01, 2021 at 02:55:30PM +0100, Hannes Reinecke wrote: >>>> On 3/1/21 2:26 PM, Daniel Wagner wrote: >&

Re: [PATCH] nvme-tcp: Check if request has started before processing it

2021-03-01 Thread Hannes Reinecke
On 3/1/21 5:05 PM, Keith Busch wrote: On Mon, Mar 01, 2021 at 02:55:30PM +0100, Hannes Reinecke wrote: On 3/1/21 2:26 PM, Daniel Wagner wrote: On Sat, Feb 27, 2021 at 02:19:01AM +0900, Keith Busch wrote: Crashing is bad, silent data corruption is worse. Is there truly no defense against

Re: [PATCH] nvme-tcp: Check if request has started before processing it

2021-03-01 Thread Hannes Reinecke
st too naive? > This is actually a sensible solution. Please send a patch for that. Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 9

Re: [PATCH] nvme-tcp: Check if request has started before processing it

2021-02-26 Thread Hannes Reinecke
On 2/26/21 5:13 PM, Keith Busch wrote: On Fri, Feb 26, 2021 at 01:54:00PM +0100, Hannes Reinecke wrote: On 2/26/21 1:35 PM, Daniel Wagner wrote: On Mon, Feb 15, 2021 at 01:29:45PM -0800, Sagi Grimberg wrote: Well, I think we should probably figure out why that is happening first. I got my

Re: [PATCH] nvme-tcp: Check if request has started before processing it

2021-02-26 Thread Hannes Reinecke
alid before processing it. Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

Re: [RFC/RFT PATCH] scsi: pm8001: Expose HW queues for pm80xx hw

2021-02-16 Thread Hannes Reinecke
ed tagset functionality. But seeing that we're having it now I guess I'll need to repost; that addresses precisely the issue you've described. Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solut

Re: [PATCH] nvme-tcp: Check if request has started before processing it

2021-02-16 Thread Hannes Reinecke
none of these protections, making it really easy to inject faulty frames (or, heaven forbid, running a packet fuzzer). And crashing the machine on invalid frames is always a bad idea; I would have expected NVMe-TCP to drop them. Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage

Re: [PATCH] nvme-tcp: Check if request has started before processing it

2021-02-13 Thread Hannes Reinecke
actually view that as a valid protection against spoofed frames. Without it it's easy to crash the machine by injecting fake completions with random command ids. Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688

Re: [PATCH] nvme-tcp: Check if request has started before processing it

2021-02-13 Thread Hannes Reinecke
--- This patch is against nvme-5.12. There is one blk_mq_tag_to_rq() in nvme_tcp_recv_ddgst() which I didn't update as I am not sure if it's also needed. I guess it is; this patch is essentially a protection against invalid frames, and as such affects all places. Cheers, Hannes -- Dr. Hannes

Re: [PATCH] nvme/hwmon: Return error code when registration fails

2021-02-12 Thread Hannes Reinecke
rom hwmon_device_register_with_info(). Fixes: ec420cdcfab4 ("nvme/hwmon: rework to avoid devm allocation") Cc: Hannes Reinecke Signed-off-by: Daniel Wagner --- This patch is against linux-block/for-next. drivers/nvme/host/hwmon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvme/host/hwmon.c b

Re: [PATCH v2] nvme-multipath: Early exit if no path is available

2021-02-01 Thread Hannes Reinecke
On 2/1/21 10:40 AM, Chao Leng wrote: On 2021/2/1 16:57, Hannes Reinecke wrote: On 2/1/21 9:47 AM, Chao Leng wrote: On 2021/2/1 15:29, Hannes Reinecke wrote:[ .. ] Urgh. Please, no. That is well impossible to debug. Can you please open-code it to demonstrate where the difference

Re: [PATCH v2] nvme-multipath: Early exit if no path is available

2021-02-01 Thread Hannes Reinecke
On 2/1/21 9:47 AM, Chao Leng wrote: On 2021/2/1 15:29, Hannes Reinecke wrote:[ .. ] Urgh. Please, no. That is well impossible to debug. Can you please open-code it to demonstrate where the difference to the current (and my fixed) versions is? I'm still not clear where the problem is once we

Re: [PATCH v2] nvme-multipath: Early exit if no path is available

2021-01-31 Thread Hannes Reinecke
On 2/1/21 3:16 AM, Chao Leng wrote: On 2021/1/29 17:20, Hannes Reinecke wrote: On 1/29/21 9:46 AM, Chao Leng wrote: On 2021/1/29 16:33, Hannes Reinecke wrote: On 1/29/21 8:45 AM, Chao Leng wrote: On 2021/1/29 15:06, Hannes Reinecke wrote: On 1/29/21 4:07 AM, Chao Leng wrote

Re: [PATCH v2] nvme-multipath: Early exit if no path is available

2021-01-28 Thread Hannes Reinecke
= nvme_next_ns(head, ns)) The ns will always be ns1, and then infinite loop. No. nvme_next_ns() will return NULL. Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnb

Re: [PATCH v2] nvme-multipath: Early exit if no path is available

2021-01-28 Thread Hannes Reinecke
L for nvme_next_ns(head, old). No. list_next_or_null_rcu()/list_first_or_null_rcu() will return NULL when then end of the list is reached. Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions

Re: [PATCH v2] nvme-multipath: Early exit if no path is available

2021-01-27 Thread Hannes Reinecke
On 1/27/21 11:30 AM, Daniel Wagner wrote: nvme_round_robin_path() should test if the return ns pointer is valid. nvme_next_ns() will return a NULL pointer if there is no path left. Fixes: 75c10e732724 ("nvme-multipath: round-robin I/O policy") Cc: Hannes Reinecke Signed-off-by: Dan

Re: [PATCH 2/3] blk-mq: Always complete remote completions requests in softirq

2021-01-25 Thread Hannes Reinecke
ware queue. So where exactly does the remote CPU case come in here? Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäf

Re: [PATCH] nvme: hwmon: fix crash on device teardown

2021-01-11 Thread Hannes Reinecke
Failed to read smart log (error %d)\n", err); + dev_warn(dev, "Failed to read smart log (error %d)\n", err); devm_kfree(dev, data); return err; } Cheers, Hannes -- Dr. Hannes ReineckeKernel S

Re: [PATCH] blk-mq-debugfs: Add decode for BLK_MQ_F_TAG_HCTX_SHARED

2021-01-10 Thread Hannes Reinecke
_flag_name[] = { HCTX_FLAG_NAME(BLOCKING), HCTX_FLAG_NAME(NO_SCHED), HCTX_FLAG_NAME(STACKING), + HCTX_FLAG_NAME(TAG_HCTX_SHARED), }; #undef HCTX_FLAG_NAME Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage A

Re: DM's filesystem lookup in dm_get_dev_t() [was: Re: linux-next: manual merge of the device-mapper tree with Linus' tree]

2020-12-22 Thread Hannes Reinecke
nnes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

Re: [LSFMMBPF 2021] A status update

2020-12-15 Thread Hannes Reinecke
-February would be a good time, giving enough room to organize etc. Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg

Re: [PATCH 0/3] block: blk_interposer - Block Layer Interposer

2020-12-14 Thread Hannes Reinecke
On 12/15/20 7:51 AM, Bob Liu wrote: Hi Folks, On 12/12/20 12:56 AM, Hannes Reinecke wrote: On 12/11/20 5:33 PM, Jens Axboe wrote: On 12/11/20 9:30 AM, Mike Snitzer wrote: While I still think there needs to be a proper _upstream_ consumer of blk_interposer as a condition of it going in.. I'll

Re: [PATCH 0/3] block: blk_interposer - Block Layer Interposer

2020-12-11 Thread Hannes Reinecke
On 12/11/20 6:04 PM, Jens Axboe wrote: On 12/11/20 9:56 AM, Hannes Reinecke wrote: On 12/11/20 5:33 PM, Jens Axboe wrote: On 12/11/20 9:30 AM, Mike Snitzer wrote: While I still think there needs to be a proper _upstream_ consumer of blk_interposer as a condition of it going in.. I'll let

Re: [PATCH 0/3] block: blk_interposer - Block Layer Interposer

2020-12-11 Thread Hannes Reinecke
that is needed in an appropriate way, instead of hacking some "interposer" into the core block layer. Which is my plan, too. I'll be working with the Veeam folks to present a joint patchset (including the DM bits) for the next round. Cheers, Hannes -- Dr. Hannes Reinecke

Re: [PATCH] nvme: hwmon: fix crash on device teardown

2020-12-11 Thread Hannes Reinecke
n controlled by the lifetime of the controller (which to my knowledge was the idea behind the devm_* thingies). So why do we have to deallocate the hwmon attributes? And why on reset? And who's re-creating them after reset, seeing that 'initialized' should be true? Hmm? Cheers, Hannes -- Dr. Han

Re: [RFC PATCH v2 0/2] add simple copy support

2020-12-07 Thread Hannes Reinecke
On 12/7/20 11:12 PM, Douglas Gilbert wrote: On 2020-12-07 9:56 a.m., Hannes Reinecke wrote: On 12/7/20 3:11 PM, Christoph Hellwig wrote: So, I'm really worried about:   a) a good use case.  GC in f2fs or btrfs seem like good use cases, as does accelating dm-kcopyd.  I agree with Damien

Re: [RFC PATCH v2 0/2] add simple copy support

2020-12-07 Thread Hannes Reinecke
there is very little point in even attempting to do so. I can't see any provisions for that in the TPAR, leading me to the assumption that NVMe simple copy will suffer from the same issue. So if we can't address this I guess this attempt will fail, too. Cheers, Hannes -- Dr. Hannes Reinecke

Re: [PATCH v2 01/17] ibmvfc: add vhost fields and defaults for MQ enablement

2020-12-07 Thread Hannes Reinecke
ncreasing the number of requests will increase the memory footprint of the driver (as each request will be statically allocated). Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solut

Re: [PATCH 00/13] ibmvfc: initial MQ development

2020-12-02 Thread Hannes Reinecke
? Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

Re: [PATCH V1] block: Fix use-after-free while iterating over requests

2020-11-29 Thread Hannes Reinecke
e.kernel.org/linux-block/20200820180335.3109216-1-ming@redhat.com/ https://lore.kernel.org/linux-block/8376443a-ec1b-0cef-8244-ed584b96f...@huawei.com/ But I never saw a crash, just kasan report. And if that above were a concern, I would have thought one would need to use a WRI

Re: [PATCH 0/2] block layer filter and block device snapshot module

2020-10-23 Thread Hannes Reinecke
rposer approach would turn out. Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

Re: [RFC] synchronous readpage for buffer_heads

2020-10-23 Thread Hannes Reinecke
? So wouldn't it be more useful to concentrate on the iomap code, and ensure that _that_ is working correctly? Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409

Re: [PATCH 0/2] block layer filter and block device snapshot module

2020-10-21 Thread Hannes Reinecke
On 10/21/20 4:10 PM, Sergei Shtepa wrote: The 10/21/2020 16:31, Hannes Reinecke wrote: I do understand where you are coming from, but then we already have a dm-snap which does exactly what you want to achieve. Of course, that would require a reconfiguration of the storage stack on the machine

Re: [PATCH 0/2] block layer filter and block device snapshot module

2020-10-21 Thread Hannes Reinecke
devices without having to move the whole setup to device-mapper first. Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg

Re: [PATCH] block: switch to pr_warn() in __device_add_disk()

2020-10-11 Thread Hannes Reinecke
re is the point in continuing here? I'd rather have it fixed up properly, either by having a return value to __device_add_disk() or by allowing the caller to check (eg by checking GENHD_FL_UP) if the call succeeded. Cheers, Hannes -- Dr. Hannes ReineckeKernel S

Re: [v5 01/12] struct device: Add function callback durable_name

2020-10-07 Thread Hannes Reinecke
So it looks as most of your usecase would be solved by moving to dev_printk(). Why not work on that instead? I do presume this will have immediate benefits for everybody, and will have approval from everyone. Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Ar

Re: [PATCH 19/19] block: remove check_disk_change

2020-09-09 Thread Hannes Reinecke
es changed, 21 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), GF: Felix Imendörffer

Re: [PATCH 18/19] sr: simplify sr_block_revalidate_disk

2020-09-09 Thread Hannes Reinecke
Johannes Thumshirn > --- > drivers/scsi/sr.c | 36 +--- > 1 file changed, 13 insertions(+), 23 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de

Re: [PATCH 17/19] sr: use bdev_check_media_change

2020-09-09 Thread Hannes Reinecke
nit and read the TOC and then stop wiring up > ->revalidate_disk. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > drivers/scsi/sr.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > Reviewed-by: Hannes Reinecke

Re: [PATCH 16/19] sd: use bdev_check_media_change

2020-09-09 Thread Hannes Reinecke
ev_disk_changed is not required either, so stop wiring up the > method. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > drivers/scsi/sd.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > Reviewed-by: Hannes Reinecke

Re: [PATCH 15/19] md: use bdev_check_media_change

2020-09-09 Thread Hannes Reinecke
fmode_t > mode) > atomic_inc(>openers); > mutex_unlock(>open_mutex); > > - check_disk_change(bdev); > + bdev_check_media_change(bdev); > out: > if (err) > mddev_put(mddev); > Reviewed-by: Hannes Reinecke Cheers,

Re: [PATCH 14/19] ide-gd: stop using the disk events mechanism

2020-09-09 Thread Hannes Reinecke
gt; --- > drivers/ide/ide-disk.c | 5 + > drivers/ide/ide-floppy.c | 2 -- > drivers/ide/ide-gd.c | 48 +--- > include/linux/ide.h | 2 -- > 4 files changed, 7 insertions(+), 50 deletions(-) > Reviewed-by: Hannes Reinecke Che

Re: [PATCH 13/19] ide-cd: remove idecd_revalidate_disk

2020-09-09 Thread Hannes Reinecke
etions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), GF: Felix Imendörffer

Re: [PATCH 11/19] gdrom: use bdev_check_media_change

2020-09-09 Thread Hannes Reinecke
nt gdrom_bdops_open(struct block_device *bdev, > fmode_t mode) > { > int ret; > > - check_disk_change(bdev); > + bdev_check_media_change(bdev); > > mutex_lock(_mutex); > ret = cdrom_open(gd.cd_info, bdev, mode); > Reviewed-by: Hannes Reine

Re: [PATCH 12/19] ide-cd: use bdev_check_media_changed

2020-09-09 Thread Hannes Reinecke
revalidate_disk from bdev_disk_changed is not required > either, so stop wiring up the method. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > drivers/ide/ide-cd.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > Reviewed-by: H

Re: [PATCH 10/19] paride/pcd: use bdev_check_media_change

2020-09-09 Thread Hannes Reinecke
,7 +233,7 @@ static int pcd_block_open(struct block_device *bdev, > fmode_t mode) > struct pcd_unit *cd = bdev->bd_disk->private_data; > int ret; > > - check_disk_change(bdev); > + bdev_check_media_change(bdev); > > mutex_lock(_mutex); >

Re: [PATCH 09/19] xsysace: simplify media change handling

2020-09-09 Thread Hannes Reinecke
/block/xsysace.c | 26 ++ > 1 file changed, 10 insertions(+), 16 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions

Re: [PATCH 08/19] xsysace: use bdev_check_media_change

2020-09-09 Thread Hannes Reinecke
ev_disk_changed is not required either, so stop wiring up the > method. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > drivers/block/xsysace.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Hannes Reinecke

Re: [PATCH 07/19] swim3: use bdev_check_media_changed

2020-09-09 Thread Hannes Reinecke
ev_disk_changed is not required either, so stop wiring up the > method. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > drivers/block/swim3.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Hannes Reinecke

Re: [PATCH 06/19] swim: simplify media change handling

2020-09-09 Thread Hannes Reinecke
Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > drivers/block/swim.c | 24 ++-- > 1 file changed, 2 insertions(+), 22 deletions(-) > What a convoluted driver. Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke

Re: [PATCH 03/19] ataflop: use bdev_check_media_change

2020-09-09 Thread Hannes Reinecke
ev_disk_changed is not required either, so stop wiring up the > method. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > drivers/block/ataflop.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > Reviewed-by: Hannes Reinecke

Re: [PATCH 01/19] block: add a bdev_check_media_change helper

2020-09-09 Thread Hannes Reinecke
+- > fs/block_dev.c| 17 +++-- > include/linux/genhd.h | 2 +- > 3 files changed, 32 insertions(+), 16 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeK

Re: [PATCH 05/19] swim: use bdev_check_media_change

2020-09-09 Thread Hannes Reinecke
ev_disk_changed is not required either, so stop wiring up the > method. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > drivers/block/swim.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > Reviewed-by: Hannes Reinecke

Re: [PATCH 04/19] floppy: use bdev_check_media_change

2020-09-09 Thread Hannes Reinecke
ev_disk_changed is not required either, so stop wiring up the > method. > > Signed-off-by: Christoph Hellwig > --- > drivers/block/floppy.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke

Re: [PATCH 02/19] amiflop: use bdev_check_media_change

2020-09-09 Thread Hannes Reinecke
@@ static int floppy_open(struct block_device *bdev, > fmode_t mode) > } > > if (mode & (FMODE_READ|FMODE_WRITE)) { > - check_disk_change(bdev); > + bdev_check_media_change(bdev); > if (mode & FMODE_WRITE) { >

Re: [PATCH v8 00/18] blk-mq/scsi: Provide hostwide shared tags for SCSI HBAs

2020-09-08 Thread Hannes Reinecke
opiate patches > - (@Don, please let me know if issue with how I did this) > - Add "scsi: core: Show nr_hw_queues in sysfs" > - Rework megaraid SAS patch to have module param (Kashyap) > - rebase > > V7 is here for more info: > https://lore.kernel.org/linux-scsi/1

Re: [PATCH 19/19] block: switch gendisk lookup to a simple xarray

2020-09-04 Thread Hannes Reinecke
-- include/linux/genhd.h | 7 -- 2 files changed, 37 insertions(+), 178 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software

Re: [PATCH 18/19] z2ram: use separate gendisk for the different modes

2020-09-04 Thread Hannes Reinecke
the blk_register_region framework. Signed-off-by: Christoph Hellwig --- drivers/block/z2ram.c | 100 -- 1 file changed, 58 insertions(+), 42 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel

Re: [PATCH 16/19] ataflop: use a separate gendisk for each media format

2020-09-04 Thread Hannes Reinecke
of that fact. To fix this just create a separate gendisk for each of the aliases if they are accessed. Signed-off-by: Christoph Hellwig --- drivers/block/ataflop.c | 135 +--- 1 file changed, 86 insertions(+), 49 deletions(-) Reviewed-by: Hannes Reinecke

Re: [PATCH 17/19] z2ram: reindent

2020-09-04 Thread Hannes Reinecke
(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

Re: [PATCH 15/19] amiflop: use separate gendisks for Amiga vs MS-DOS mode

2020-09-04 Thread Hannes Reinecke
for removing the blk_register_region framework. Signed-off-by: Christoph Hellwig --- drivers/block/amiflop.c | 98 +++-- 1 file changed, 55 insertions(+), 43 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke

Re: [PATCH 14/19] floppy: use a separate gendisk for each media format

2020-09-04 Thread Hannes Reinecke
of that fact. To fix this just create a separate gendisk for each of the aliases if they are accessed. Signed-off-by: Christoph Hellwig --- drivers/block/floppy.c | 154 ++--- 1 file changed, 97 insertions(+), 57 deletions(-) Reviewed-by: Hannes Reinecke

Re: [PATCH 10/19] brd: use __register_blkdev to allocate devices on demand

2020-09-04 Thread Hannes Reinecke
insertions(+), 28 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg

Re: [PATCH 13/19] ide: switch to __register_blkdev for command set probing

2020-09-04 Thread Hannes Reinecke
++ 1 file changed, 6 insertions(+), 28 deletions(-) Ceterum censeo ... Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH

Re: [PATCH 12/19] md: use __register_blkdev to allocate devices on demand

2020-09-04 Thread Hannes Reinecke
- 1 file changed, 8 insertions(+), 13 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG

Re: [PATCH 11/19] loop: use __register_blkdev to allocate devices on demand

2020-09-04 Thread Hannes Reinecke
(+), 22 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix

Re: [PATCH 09/19] sd: use __register_blkdev to avoid a modprobe for an unregistered dev_t

2020-09-04 Thread Hannes Reinecke
file changed, 5 insertions(+), 14 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG

Re: [PATCH 08/19] swim: don't call blk_register_region

2020-09-04 Thread Hannes Reinecke
-off-by: Christoph Hellwig --- drivers/block/swim.c | 17 - 1 file changed, 17 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software

Re: [PATCH 06/19] block: add an optional probe callback to major_names

2020-09-04 Thread Hannes Reinecke
registered dev_t. Signed-off-by: Christoph Hellwig --- block/genhd.c | 21 ++--- include/linux/genhd.h | 5 - 2 files changed, 22 insertions(+), 4 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h

Re: [PATCH 05/19] block: rework requesting modules for unclaimed devices

2020-09-04 Thread Hannes Reinecke
+++-- 1 file changed, 15 insertions(+), 10 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409

Re: [PATCH 04/19] block: split block_class_lock

2020-09-04 Thread Hannes Reinecke
Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

Re: [PATCH 03/19] block: cleanup del_gendisk a bit

2020-09-04 Thread Hannes Reinecke
On 9/3/20 10:01 AM, Christoph Hellwig wrote: Merge three hidden gendisk checks into one. Signed-off-by: Christoph Hellwig --- block/genhd.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke

Re: [PATCH 02/19] block: merge drivers/base/map.c into block/genhd.c

2020-09-04 Thread Hannes Reinecke
/linux/kobj_map.h Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix

Re: [PATCH 01/19] char_dev: replace cdev_map with an xarray

2020-09-04 Thread Hannes Reinecke
+-- fs/dcache.c | 1 - fs/internal.h | 5 --- 3 files changed, 47 insertions(+), 53 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49

Re: rework check_disk_change()

2020-09-04 Thread Hannes Reinecke
tion() in drivers/scsi/scsi_lib.c So I don't think you'd need to keep it in sg.c. Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg),

Re: [PATCH 07/19] ide: remove ide_{,un}register_region

2020-08-27 Thread Hannes Reinecke
/linux/ide.h | 3 --- > 3 files changed, 37 deletions(-) > IDE-tape. Shudder. Anything to get rid of them. Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053

Re: [PATCH 01/19] char_dev: replace cdev_map with an xarray

2020-08-27 Thread Hannes Reinecke
if (error) > + goto out_unwind; > + } > + mutex_unlock(_lock); > > kobject_get(p->kobj.parent); > - > return 0; > + > +out_unwind: > + while (--i >= 0) > + xa_erase(_map, dev + i); > + mutex_unlock(_lock); > + return error; > } > > /** Do you really need the mutex? Wouldn't xa_store_range() be better and avoid the mutex? Cheers, Hannes -- Dr. Hannes ReineckeKernel Storage Architect h...@suse.de +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), GF: Felix Imendörffer

Re: [PATCH 3/3] nvme: don't call revalidate_disk from nvme_set_queue_dying

2020-08-24 Thread Hannes Reinecke
t; drivers/nvme/host/core.c | 33 +++-- > drivers/nvme/host/nvme.h | 13 - > 2 files changed, 23 insertions(+), 23 deletions(-) > YES! I've been bitten by this far too often. Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke

Re: [PATCH 2/3] block: fix locking for struct block_device size updates

2020-08-24 Thread Hannes Reinecke
s/block/aoe/aoecmd.c | 4 +--- > drivers/md/dm.c | 15 ++- > drivers/s390/block/dasd_ioctl.c | 9 ++--- > fs/block_dev.c | 25 ++--- > include/linux/blk_types.h | 1 + > 6 files changed, 22 insertions(+), 36 deletio

Re: [PATCH 2/2] block: fix locking for struct block_device size updates

2020-08-21 Thread Hannes Reinecke
| 15 ++- > drivers/s390/block/dasd_ioctl.c | 9 ++--- > fs/block_dev.c | 18 +- > include/linux/blk_types.h | 1 + > 6 files changed, 17 insertions(+), 34 deletions(-) > Reviewed-by: Hannes Reinecke Cheer

Re: [PATCH 1/2] block: replace bd_set_size with bd_set_nr_sectors

2020-08-21 Thread Hannes Reinecke
drivers/block/nbd.c | 7 --- > drivers/block/pktcdvd.c | 2 +- > drivers/nvme/host/nvme.h | 2 +- > fs/block_dev.c | 10 +- > include/linux/genhd.h| 2 +- > 6 files changed, 14 insertions(+), 13 deletions(-) > Reviewed-by: Hannes Reinecke

Re: [PATCH v3] block: check queue's limits.discard_granularity in __blkdev_issue_discard()

2020-08-05 Thread Hannes Reinecke
_issue_discard()") Fixes: c52abf563049 ("loop: Better discard support for block devices") Reported-and-suggested-by: Ming Lei Signed-off-by: Coly Li Reviewed-by: Ming Lei Cc: Bart Van Assche Cc: Christoph Hellwig Cc: Enzo Matsumiya Cc: Evan Green Cc: Hannes Reinecke Cc: Jens

Re: [PATCH] block: Use non _rcu version of list functions for tag_set_list

2020-07-28 Thread Hannes Reinecke
x_shared(q, true); - list_add_tail_rcu(>tag_set_list, >tag_list); + list_add_tail(>tag_set_list, >tag_list); mutex_unlock(>tag_list_lock); } Indeed. Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Network

Re: [PATCH v2 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-21 Thread Hannes Reinecke
On 7/15/20 1:03 AM, James Bottomley wrote: On Tue, 2020-07-14 at 22:39 +0100, Lee Jones wrote: On Tue, 14 Jul 2020, James Bottomley wrote: On Tue, 2020-07-14 at 09:46 +0200, Hannes Reinecke wrote: On 7/13/20 10:00 AM, Lee Jones wrote: Haven't been used since 2006. Fixes the following W=1

Re: [PATCH v2 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-14 Thread Hannes Reinecke
On 7/14/20 11:39 PM, Lee Jones wrote: On Tue, 14 Jul 2020, James Bottomley wrote: On Tue, 2020-07-14 at 09:46 +0200, Hannes Reinecke wrote: On 7/13/20 10:00 AM, Lee Jones wrote: Haven't been used since 2006. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx

Re: [PATCH v2.1 05/29] scsi: fcoe: fcoe_ctlr: Fix a myriad of documentation issues

2020-07-14 Thread Hannes Reinecke
: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_start' drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_start' Cc: Hannes Reinecke Signed-off-by: Lee Jones --- Changelog: v2 - Rename title s

Re: [PATCH v2 04/29] scsi: fcoe: fcoe: Fix various kernel-doc infringements

2020-07-14 Thread Hannes Reinecke
On 7/14/20 9:58 AM, Lee Jones wrote: > On Tue, 14 Jul 2020, Hannes Reinecke wrote: > >> On 7/13/20 9:46 AM, Lee Jones wrote: >>> A couple of headers make no attempt to document their associated function >>> parameters. Others looks as if they are suffering with

Re: [PATCH v2 21/24] scsi: aic7xxx: aic79xx_osm: Remove unused variable 'ahd'

2020-07-14 Thread Hannes Reinecke
et but > not used [-Wunused-but-set-variable] > > Cc: Hannes Reinecke > Signed-off-by: Lee Jones > --- > drivers/scsi/aic7xxx/aic79xx_osm.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c > b/drivers/scsi/aic7xxx/ai

Re: [PATCH v2 22/24] scsi: aic7xxx: aic79xx_osm: Remove unused variables 'wait' and 'paused'

2020-07-14 Thread Hannes Reinecke
ariable ‘wait’ set but > not used [-Wunused-but-set-variable] > drivers/scsi/aic7xxx/aic79xx_osm.c:781:9: warning: variable ‘paused’ set but > not used [-Wunused-but-set-variable] > > Cc: Hannes Reinecke > Signed-off-by: Lee Jones > --- > drivers/scsi/aic7xxx/aic79xx_osm.

Re: [PATCH v2 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-14 Thread Hannes Reinecke
aved_modes’ > set but not used [-Wunused-but-set-variable] > drivers/scsi/aic7xxx/aic79xx_osm.c:2148:9: warning: variable ‘saved_scsiid’ > set but not used [-Wunused-but-set-variable] > > Cc: Hannes Reinecke > Signed-off-by: Lee Jones > --- > drivers/scsi/aic7xxx/aic79xx_osm

Re: [PATCH v2 23/24] scsi: aic7xxx: aic79xx_osm: Fix 'amount_xferred' set but not used issue

2020-07-14 Thread Hannes Reinecke
ere. > > Fixes the following W=1 kernel build warning(s): > > drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_done’: > drivers/scsi/aic7xxx/aic79xx_osm.c:1796:12: warning: variable > ‘amount_xferred’ set but not used [-Wunused-but-set-variable] > > Cc: Hann

Re: [PATCH v2 15/24] scsi: myrs: Demote obvious misuse of kerneldoc to standard comment blocks

2020-07-14 Thread Hannes Reinecke
rs and false otherwise. > drivers/scsi/myrs.c:2349: warning: Function parameter or member 'cs' not > described in 'myrs_err_status' > drivers/scsi/myrs.c:2349: warning: Function parameter or member 'status' not > described in 'myrs_err_status' > drivers/scsi/myrs.c:2349: warning

Re: [PATCH v2 21/29] scsi: aic7xxx: aic7xxx_osm: Fix 'amount_xferred' set but not used issue

2020-07-14 Thread Hannes Reinecke
kernel build warning(s): drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_done’: drivers/scsi/aic7xxx/aic7xxx_osm.c:1725:12: warning: variable ‘amount_xferred’ set but not used [-Wunused-but-set-variable] 1725 | uint32_t amount_xferred; | ^~ Cc: Hannes Reinecke Cc

Re: [PATCH v2 20/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'targ'

2020-07-14 Thread Hannes Reinecke
[-Wunused-but-set-variable] 1604 | struct ahc_linux_target *targ; | ^~~~ Cc: Hannes Reinecke Cc: "Daniel M. Eischen" Cc: Doug Ledford Signed-off-by: Lee Jones --- drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/aic7xxx/aic

Re: [PATCH v2 19/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'ahc'

2020-07-14 Thread Hannes Reinecke
but not used [-Wunused-but-set-variable] 674 | struct ahc_softc *ahc; | ^~~ Cc: Hannes Reinecke Cc: "Daniel M. Eischen" Cc: Doug Ledford Signed-off-by: Lee Jones --- drivers/scsi/aic7xxx/aic7xxx_osm.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/scsi/aic7xxx/aic

Re: [PATCH v2 12/29] scsi: libfc: fc_fcp: Provide missing and repair existing function documentation

2020-07-14 Thread Hannes Reinecke
/scsi/libfc/fc_fcp.c:1859: warning: Function parameter or member 'sc_cmd' not described in 'fc_queuecommand' drivers/scsi/libfc/fc_fcp.c:1859: warning: Excess function parameter 'cmd' description in 'fc_queuecommand' Cc: Hannes Reinecke Signed-off-by: Lee Jones --- drivers/scsi/libfc/fc_fcp.c

  1   2   3   4   5   6   7   8   9   10   >