Re: [PATCH 11/15] target: export initiator port values for all sessions

2018-07-19 Thread Christoph Hellwig
On Thu, Jul 19, 2018 at 05:07:59PM +, Bart Van Assche wrote: > Initially configfs did not support creation of a directory from the kernel > side. Last time I brought this up with Christoph he replied that this > functionality has been added to configfs (if I understood Christoph > correctly).

Re: [PATCH 08/15] target: add session removal function

2018-07-19 Thread Christoph Hellwig
is. Except for that this looks fine: Reviewed-by: Christoph Hellwig

Re: [PATCH 07/15] target: rename target_alloc_session

2018-07-19 Thread Christoph Hellwig
iscsi will continue to be the odd driver. Wish we could sort that out eventually.. Otherwise looks fine: Reviewed-by: Christoph Hellwig

Re: [PATCH 06/15] target: make transport_init_session_tags static

2018-07-19 Thread Christoph Hellwig
On Sun, Jul 15, 2018 at 06:16:22PM -0500, Mike Christie wrote: > transport_init_session_tags is only called from target_core_transport.c > so make it static. > > Signed-off-by: Mike Christie Looks fine by itself: Reviewed-by: Christoph Hellwig Although folding it into the only

Re: [PATCH 05/15] target: remove sess_get_index

2018-07-19 Thread Christoph Hellwig
rt. So just use the se_session sid > for all drivers and remove sess_get_index callout. Use up all your space again (not going to complain for any further patches). Modulo that and the type that Bart found: Reviewed-by: Christoph Hellwig

Re: [PATCH 03/15] target: fix __transport_register_session locking

2018-07-19 Thread Christoph Hellwig
call. Can be condensed as well. Otherwise looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH 01/15] configfs: fix registered group removal

2018-07-17 Thread Christoph Hellwig
Thanks, applied to the configfs tree.

[ANNOUNCE] Alpine Linux Persistence and Storage Summit

2018-07-08 Thread Christoph Hellwig
be available on our website: http://www.alpss.at/ Thank you on behalf of the program committee: Stephen Bates Sagi Grimberg Christoph Hellwig Johannes Thumshirn Richard Weinberger [1] http://www.tyrol.com/things-to-do/sports/hiking/refuge-huts/a-lizumer-hut [2] https

Re: [PATCH 01/33] TCMU PR: first commit to implement TCMU PR

2018-06-19 Thread Christoph Hellwig
On Mon, Jun 18, 2018 at 01:41:48PM +0200, David Disseldorp wrote: > On Mon, 18 Jun 2018 04:12:17 -0700, Christoph Hellwig wrote: > > > On Sun, Jun 17, 2018 at 12:40:56PM +0800, Zhu Lingshan wrote: > > > Hello Mike and Christoph, > > > Thanks Mike's commen

Re: [PATCH v2 5/8] mpt3sas: Fix _transport_smp_handler() error path

2018-06-18 Thread Christoph Hellwig
On Fri, Jun 15, 2018 at 02:41:58PM -0700, Bart Van Assche wrote: > This patch avoids that smatch complains about a double unlock on > ioc->transport_cmds.mutex. Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 01/33] TCMU PR: first commit to implement TCMU PR

2018-06-18 Thread Christoph Hellwig
On Sun, Jun 17, 2018 at 12:40:56PM +0800, Zhu Lingshan wrote: > Hello Mike and Christoph, > Thanks Mike's comment inspired me, if I understand this correctly, it is > suggested to implement this whole solution in kernel, avoid >  splitting PRG handling in both kernel and userspace, make it not

Re: [PATCH 01/33] TCMU PR: first commit to implement TCMU PR

2018-06-18 Thread Christoph Hellwig
On Sat, Jun 16, 2018 at 02:25:47PM -0500, Mike Christie wrote: > > Just wanted to make sure I understood this comment. In Lingshan's > > patches I think he was going to end up calling out to > > userspace/tcmu-runner and there he was going to make ceph calls which > > basically translate PGR

Re: [PATCH 01/33] TCMU PR: first commit to implement TCMU PR

2018-06-18 Thread Christoph Hellwig
On Sat, Jun 16, 2018 at 02:20:12PM -0500, Mike Christie wrote: > Just wanted to make sure I understood this comment. In Lingshan's > patches I think he was going to end up calling out to > userspace/tcmu-runner and there he was going to make ceph calls which > basically translate PGR operations to

Re: [PATCH 01/33] TCMU PR: first commit to implement TCMU PR

2018-06-15 Thread Christoph Hellwig
On Sat, Jun 16, 2018 at 02:23:10AM +0800, Zhu Lingshan wrote: > These commits and the following intend to implement Persistent > Reservation operations for TCMU devices. Err, hell no. If you are that tightly integrated with the target code that you can implement persistent reservation you need

[PATCH] aacraid: remove bogus GFP_DMA32 specifies

2018-05-30 Thread Christoph Hellwig
For one GFP_DMA32 does not actually work with kmalloc, as we only have GFP_DMA and GFP_KERNEL caches, but not GFP_DMA32. Second the memory is mapped using the proper DMA API anyway, which would include proper bounce buffering if needed by the device. Signed-off-by: Christoph Hellwig

[PATCH] block: remove parent device reference from struct bsg_class_device

2018-05-29 Thread Christoph Hellwig
. Reported-by: Anatoliy Glagolev Signed-off-by: Christoph Hellwig --- block/bsg-lib.c | 6 ++--- block/bsg.c | 39 - drivers/scsi/scsi_transport_fc.c| 7 +++--- drivers/scsi/scsi_transport_iscsi.c | 2 +- drivers/scsi

Re: [PATCH 04/14] nbd: complete requests from ->timeout

2018-05-28 Thread Christoph Hellwig
On Wed, May 23, 2018 at 03:28:38PM +0200, Hannes Reinecke wrote: > Again, some testcase would be nice ... For this one I don't have an actual test case. I'll have to defer to the nbd maintainers for that.

Re: [PATCH 03/14] nvme: return BLK_EH_DONE from ->timeout

2018-05-28 Thread Christoph Hellwig
On Wed, May 23, 2018 at 03:27:35PM +0200, Hannes Reinecke wrote: > Is there a way of _testing_ this patch? Use the error injection framework Johannes wrote? Use blktests (but make sure you have a fixed version of test 011). > It looks pretty dodgy, just replacing BLK_EH_HANDLED with >

Re: [PATCH 03/14] nvme: return BLK_EH_DONE from ->timeout

2018-05-28 Thread Christoph Hellwig
On Thu, May 24, 2018 at 12:45:15PM +0800, Ming Lei wrote: > This change should have been done after '[PATCH 13/14] blk-mq: Remove > generation seqeunce', otherwise the timed-out request won't be completed > by nvme_cancel_request() at all because we always marked this request as > 'COMPLETE'

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-25 Thread Christoph Hellwig
On Thu, May 24, 2018 at 10:06:59AM -0700, Kees Cook wrote: > On Thu, May 24, 2018 at 1:00 AM, Christoph Hellwig <h...@infradead.org> wrote: > > On Wed, May 23, 2018 at 03:14:19PM -0600, Jens Axboe wrote: > >> Ugh, so that would necessitate a change there too. As I said bef

Re: [PATCH 6/6] scsi: Check sense buffer size at build time

2018-05-24 Thread Christoph Hellwig
> +/* Make sure any sense buffer is the correct size. */ > +#define scsi_execute(sdev, cmd, data_direction, buffer, bufflen, sense, > \ > + sshdr, timeout, retries, flags, rq_flags, resid) \ > +({ \ > +

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-24 Thread Christoph Hellwig
On Wed, May 23, 2018 at 03:14:19PM -0600, Jens Axboe wrote: > Ugh, so that would necessitate a change there too. As I said before, > I don't really care where it lives. I know the SCSI folks seem bothered > by moving it, but in reality, it's not like this stuff will likely ever > really change. Of

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-24 Thread Christoph Hellwig
On Wed, May 23, 2018 at 02:17:14PM -0700, Kees Cook wrote: > > True, though I'm finding other robustness issues in the CDROM code. > They're probably all insane corner cases, but it seems like it'd be > nice to just fix them: > > diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c > index

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-23 Thread Christoph Hellwig
On Wed, May 23, 2018 at 08:13:56AM -0600, Jens Axboe wrote: > > Should I move to code to a new drivers/scsi/scsi_sense.c and add it to > > drivers/scsi/Makefile as: > > > > obj-$(CONFIG_BLK_SCSI_REQUEST)+= scsi_sense.o > > > > Every place I want to use the code is already covered by > >

[PATCH 13/14] blk-mq: Remove generation seqeunce

2018-05-23 Thread Christoph Hellwig
essing it. The request's tag won't be released for reuse until both the timeout handler and the completion are done with it. [hch: slight cleanups] Signed-off-by: Keith Busch <keith.bu...@intel.com> Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/blk-core.c | 6 - block/blk-

[PATCH 14/14] blk-mq: simplify blk_mq_rq_timed_out

2018-05-23 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/blk-mq.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 8c7b1803b7e9..592bab689f8e 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -747,22 +

[PATCH 10/14] block: remove BLK_EH_HANDLED

2018-05-23 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- Documentation/scsi/scsi_eh.txt | 11 --- block/blk-mq.c | 3 --- block/blk-timeout.c| 3 --- include/linux/blkdev.h | 1 - 4 files changed, 18 deletions(-) diff --git a/Documentatio

[PATCH 08/14] mmc: complete requests from ->timeout

2018-05-23 Thread Christoph Hellwig
in!] Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/mmc/core/queue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c index 56e9a803db21..648eb6743ed5 100644 --- a/drivers/mmc/core/queue.c +++ b/drivers/mm

[PATCH 11/14] block: document the blk_eh_timer_return values

2018-05-23 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/linux/blkdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 3d9d4da4dedd..3815d9dcfbe0 100644 --- a/include/linux/blkdev.h +++ b/include/linux/bl

[PATCH 09/14] libiscsi: don't try to bypass SCSI EH

2018-05-23 Thread Christoph Hellwig
should not actually be possible. If this doesn't work out iscsi will probably need its own eh_strategy_handler instead to just do the right thing. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/libiscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 12/14] blk-mq: Fix timeout and state order

2018-05-23 Thread Christoph Hellwig
From: Keith Busch The block layer had been setting the state to in-flight prior to updating the timer. This is the wrong order since the timeout handler could observe the in-flight state with the older timeout, believing the request had expired when in fact it is just

[PATCH 07/14] scsi_transport_fc: complete requests from ->timeout

2018-05-23 Thread Christoph Hellwig
By completing the request entirely in the driver we can remove the BLK_EH_HANDLED return value and thus the split responsibility between the driver and the block layer that has been causing trouble. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/scsi_transport_fc

[PATCH 05/14] mtip32xx: complete requests from ->timeout

2018-05-23 Thread Christoph Hellwig
By completing the request entirely in the driver we can remove the BLK_EH_HANDLED return value and thus the split responsibility between the driver and the block layer that has been causing trouble. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/block/mtip32xx/mtip32xx.c | 3

[PATCH 06/14] null_blk: complete requests from ->timeout

2018-05-23 Thread Christoph Hellwig
By completing the request entirely in the driver we can remove the BLK_EH_HANDLED return value and thus the split responsibility between the driver and the block layer that has been causing trouble. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/block/null_blk.c | 6 --

BLK_EH_HANDLED

2018-05-23 Thread Christoph Hellwig
Hi all, this series removes the BLK_EH_HANDLED return value, and instead places responsibility of timed out commands entirely on the drivers. Except for some odd layering vilations in libiscsi this actually is surprisingly simple. The last two pathes contain a respin of Keith' series to

[PATCH 01/14] libata: remove ata_scsi_timed_out

2018-05-23 Thread Christoph Hellwig
As far as I can tell this function can't even be called any more, given that ATA implements its own eh_strategy_handler with ata_scsi_error, which never calls ->eh_timed_out. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/ata/libata-

[PATCH 02/14] block: rename BLK_EH_NOT_HANDLED to BLK_EH_DONE

2018-05-23 Thread Christoph Hellwig
The BLK_EH_NOT_HANDLED implies nothing happen, but very often that is not what is happening - instead the driver already completed the command. Fix the symbolic name to reflect that a little better. Signed-off-by: Christoph Hellwig <h...@lst.de> --- Documentation/scsi/scsi_eh.txt

[PATCH 03/14] nvme: return BLK_EH_DONE from ->timeout

2018-05-23 Thread Christoph Hellwig
NVMe always completes the request before returning from ->timeout, either by polling for it, or by disabling the controller. Return BLK_EH_DONE so that the block layer doesn't even try to complete it again. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/nvme/host/pci.

[PATCH 04/14] nbd: complete requests from ->timeout

2018-05-23 Thread Christoph Hellwig
By completing the request entirely in the driver we can remove the BLK_EH_HANDLED return value and thus the split responsibility between the driver and the block layer that has been causing trouble. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/block/nbd.c | 7 ---

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Christoph Hellwig
On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: > I think Martin and Christoph are objecting to moving the code to > block/scsi_ioctl.h. I don't care too much about where the code is, but > think it would be nice to have the definitions in a separate header. But > if they prefer just

Re: [PATCH 2/6] scsi: cxlflash: Drop unused sense buffers

2018-05-22 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 1/6] ide-cd: Drop unused sense buffers

2018-05-22 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Christoph Hellwig
On Tue, May 22, 2018 at 11:15:09AM -0700, Kees Cook wrote: > Both SCSI and ATAPI share the sense header. In preparation for using the > struct scsi_sense_hdr more widely, move this into a separate header and > move the helper function to scsi_ioctl.c which is linked with CONFIG_IDE > by way of

Re: [PATCH] scsi: sg: allocate with __GFP_ZERO in sg_build_indirect()

2018-05-18 Thread Christoph Hellwig
On Fri, May 18, 2018 at 04:23:18PM +0200, Alexander Potapenko wrote: > This shall help avoid copying uninitialized memory to the userspace > when calling ioctl(fd, SG_IO) with an empty command. Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH] Bsg referencing parent device

2018-05-18 Thread Christoph Hellwig
The idea looks pretty reasonable, but once that is done we can get rid of the ->release callback entirely and just handle it in the callers. Something like the untested patch below: diff --git a/block/bsg-lib.c b/block/bsg-lib.c index fc2e5ff2c4b9..9419def8c017 100644 --- a/block/bsg-lib.c +++

Re: [PATCH 38/42] isdn: replace ->proc_fops with ->proc_show

2018-05-18 Thread Christoph Hellwig
On Fri, May 18, 2018 at 10:43:46AM +0200, Paul Bolle wrote: > > iif->ctr.release_appl = gigaset_release_appl; > > iif->ctr.send_message = gigaset_send_message; > > - iif->ctr.procinfo = gigaset_procinfo; > > Is this intentional? You didn't touch the procinfo method in the other

Re: [PATCH 1/1] qla2xxx: Allow SCSI-MQ to be enabled selectively

2018-05-17 Thread Christoph Hellwig
On Wed, May 16, 2018 at 08:54:11PM -0700, Himanshu Madhani wrote: > when ql2xmqsupport=1, use that value to selectively > enable SCSI-MQ NAK. This is not something that we should grow driver parameters for. Btw, should we look into enabling blk-mq by default again now that all the performance

Re: [PATCH 11/40] ipv6/flowlabel: simplify pid namespace lookup

2018-05-17 Thread Christoph Hellwig
On Thu, May 17, 2018 at 12:28:01AM -0500, Eric W. Biederman wrote: > > struct pid_namespace *proc_pid_namespace(struct inode *inode) > > { > > // maybe warn on for s_magic not on procfs?? > > return inode->i_sb->s_fs_info; > > } > > That should work. Ideally out of line for the proc_fs.h

[PATCH 01/42] net/can: single_open_net needs to be paired with single_release_net

2018-05-16 Thread Christoph Hellwig
Otherwise we will leak a reference to the network namespace. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/can/bcm.c | 2 +- net/can/proc.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/can/bcm.c b/net/can/bcm.c index ac5e5e34fee3..8073fa14e143

simplify procfs code for seq_file instances V3

2018-05-16 Thread Christoph Hellwig
We currently have hundreds of proc files that implement plain, read-only seq_file based interfaces. This series consolidates them using new procfs helpers that take the seq_operations or simple show callback directly. A git tree is available at: git://git.infradead.org/users/hch/misc.git

[PATCH 03/42] proc: don't detour through seq->private to get the inode

2018-05-16 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/proc/array.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/fs/proc/array.c b/fs/proc/array.c index 911f66924d81..4a8e413bf59b 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -677,20 +

[PATCH 10/42] ipv{4,6}/tcp: simplify procfs registration

2018-05-16 Thread Christoph Hellwig
Avoid most of the afinfo indirections and just call the proc helpers directly. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/net/tcp.h | 11 ++ net/ipv4/tcp_ipv4.c | 85 + net/ipv6/tcp_ipv6.c | 27 +- 3 files chang

[PATCH 08/42] proc: introduce proc_create_single{,_data}

2018-05-16 Thread Christoph Hellwig
Variants of proc_create{,_data} that directly take a seq_file show callback and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/arm/kernel/dma.c | 14 +--- ar

[PATCH 02/42] proc: introduce a proc_pid_ns helper

2018-05-16 Thread Christoph Hellwig
Factor out retrieving the per-sb pid namespaces from the sb private data into an easier to understand helper. Suggested-by: Eric W. Biederman <ebied...@xmission.com> Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/proc/array.c | 7 +-- fs/proc/base.c

[PATCH 07/42] proc: introduce proc_create_seq_private

2018-05-16 Thread Christoph Hellwig
Variant of proc_create_data that directly take a struct seq_operations argument + a private state size and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/locks.c

[PATCH 06/42] proc: introduce proc_create_seq{,_data}

2018-05-16 Thread Christoph Hellwig
Variants of proc_create{,_data} that directly take a struct seq_operations argument and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/ia64/hp/common/sba_iommu.c | 15 +- arch/ia64/

[PATCH 09/42] ipv{4,6}/udp{,lite}: simplify proc registration

2018-05-16 Thread Christoph Hellwig
Remove a couple indirections to make the code look like most other protocols. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/net/udp.h | 20 -- net/ipv4/udp.c | 99 +- net/ipv4/udplite.c | 21 +++--- net/ipv6/udp.c

[PATCH 04/42] proc: simplify proc_register calling conventions

2018-05-16 Thread Christoph Hellwig
Return registered entry on success, return NULL on failure and free the passed in entry. Also expose it in internal.h as we'll start using it in proc_net.c soon. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/proc/generic.c | 44 ++-- f

[PATCH 14/42] net/kcm: simplify proc registration

2018-05-16 Thread Christoph Hellwig
Remove a couple indirections to make the code look like most other protocols. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/kcm/kcmproc.c | 71 --- 1 file changed, 17 insertions(+), 54 deletions(-) diff --git a/net/kcm/kcmproc.c b/n

[PATCH 05/42] proc: add a proc_create_reg helper

2018-05-16 Thread Christoph Hellwig
Common code for creating a regular file. Factor out of proc_create_data, to be reused by other functions soon. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/proc/generic.c | 44 +--- fs/proc/internal.h | 2 ++ 2 files changed, 27 inse

[PATCH 12/42] ipv{4,6}/raw: simplify ѕeq_file code

2018-05-16 Thread Christoph Hellwig
Pass the hashtable to the proc private data instead of copying it into the per-file private data. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/net/raw.h | 4 net/ipv4/raw.c| 36 net/ipv6/raw.c| 6 -- 3 files chang

[PATCH 15/42] netfilter/x_tables: simplify ѕeq_file code

2018-05-16 Thread Christoph Hellwig
Just use the address family from the proc private data instead of copying it into per-file data. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/netfilter/x_tables.c | 39 +++ 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/net/net

[PATCH 11/42] ipv{4,6}/ping: simplify proc file creation

2018-05-16 Thread Christoph Hellwig
Remove the pointless ping_seq_afinfo indirection and make the code look like most other protocols. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/net/ping.h | 11 -- net/ipv4/ping.c| 50 +- net/ipv6/ping.c

[PATCH 19/42] acpi/battery: simplify procfs code

2018-05-16 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> ---

[PATCH 20/42] sgi-gru: simplify procfs code

2018-05-16 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/misc/sgi-gru/gruprocfs.c | 81 ++---

[PATCH 13/42] ipv6/flowlabel: simplify pid namespace lookup

2018-05-16 Thread Christoph Hellwig
The code should be using the pid namespace from the procfs mount instead of trying to look it up during open. Suggested-by: Eric W. Biederman <ebied...@xmission.com> Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/ipv6/ip6_flowlabel.c | 29 ++--- 1 fil

[PATCH 22/42] sg: simplify procfs code

2018-05-16 Thread Christoph Hellwig
will handle missing files gracefully. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/sg.c | 124 +- 1 file changed, 12 insertions(+), 112 deletions(-) diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index c198b96368dd..8ff687158704

[PATCH 17/42] proc: introduce proc_create_net{,_data}

2018-05-16 Thread Christoph Hellwig
Variants of proc_create{,_data} that directly take a struct seq_operations and deal with network namespaces in ->open and ->release. All callers of proc_create + seq_open_net converted over, and seq_{open,release}_net are removed entirely. Signed-off-by: Christoph Hellwig <h.

[PATCH 24/42] ext4: simplify procfs code

2018-05-16 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/ext4/ext4.h| 2 +- fs/ext4/mballoc.

[PATCH 31/42] hostap: switch to proc_create_{seq,single}_data

2018-05-16 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <h...@lst.de> --- .../net/wireless/intersil/hostap/hostap_ap.c | 70 ++--- .../net/wireless/intersil/hostap/hostap_hw.c | 17 +-- .../wireless/intersil/hostap/host

[PATCH 26/42] staging/rtl8192u: simplify procfs code

2018-05-16 Thread Christoph Hellwig
Unwind the registration loop into individual calls. Switch to use proc_create_single where applicable. Also don't bother handling proc_create* failures - the driver works perfectly fine without the proc files, and the cleanup will handle missing files gracefully. Signed-off-by: Christoph

[PATCH 25/42] jfs: simplify procfs code

2018-05-16 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/jfs/jfs_debug.c| 43 ++---

[PATCH 34/42] netfilter/x_tables: switch to proc_create_seq_private

2018-05-16 Thread Christoph Hellwig
And remove proc boilerplate code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/netfilter/x_tables.c | 42 ++-- 1 file changed, 6 insertions(+), 36 deletions(-) diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 344dd0

[PATCH 27/42] resource: switch to proc_create_seq_data

2018-05-16 Thread Christoph Hellwig
And use the root resource directly from the proc private data. Signed-off-by: Christoph Hellwig <h...@lst.de> --- kernel/resource.c | 43 +-- 1 file changed, 5 insertions(+), 38 deletions(-) diff --git a/kernel/resource.c b/kernel/resource.c

[PATCH 29/42] rtc/proc: switch to proc_create_single_data

2018-05-16 Thread Christoph Hellwig
And stop trying to get a reference on the submodule, procfs code deals with release after an unloaded module and thus removed proc entry. Signed-off-by: Christoph Hellwig <h...@lst.de> Acked-by: Alexandre Belloni <alexandre.bell...@bootlin.com> --- drivers/rtc/rtc

[PATCH 36/42] atm: simplify procfs code

2018-05-16 Thread Christoph Hellwig
will handle missing files gracefully. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/atm/proc.c | 65 ++ 1 file changed, 7 insertions(+), 58 deletions(-) diff --git a/net/atm/proc.c b/net/atm/proc.c index 55410c00c7e2..f272b0f59d82

[PATCH 30/42] bonding: switch to proc_create_seq_data

2018-05-16 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/net/bonding/bond_procfs.c | 36 ++- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/drivers/ne

[PATCH 39/42] ide: remove ide_driver_proc_write

2018-05-16 Thread Christoph Hellwig
The driver proc file hasn't been writeable for a long time, so this is just dead code. Signed-off-by: Christoph Hellwig <h...@lst.de> Acked-by: "Eric W. Biederman" <ebied...@xmission.com> --- drivers/ide/ide-proc.c | 46 -- 1 file

[PATCH 32/42] neigh: switch to proc_create_seq_data

2018-05-16 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/core/neighbour.c | 31 ++- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/net/core/neighbour.c b

[PATCH 40/42] ide: replace ->proc_fops with ->proc_show

2018-05-16 Thread Christoph Hellwig
Just set up the show callback in the tty_operations, and use proc_create_single_data to create the file without additional boilerplace code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/ide/ide-cd.c | 15 +--- drivers/ide/ide-disk_proc.c | 62 ++-- d

[PATCH 33/42] netfilter/xt_hashlimit: switch to proc_create_{seq,single}_data

2018-05-16 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/netfilter/xt_hashlimit.c | 92 +++- 1 file changed, 18 insertions(+), 74 deletions(-) diff --git a/net/

[PATCH 41/42] tty: replace ->proc_fops with ->proc_show

2018-05-16 Thread Christoph Hellwig
Just set up the show callback in the tty_operations, and use proc_create_single_data to create the file without additional boilerplace code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/ia64/hp/sim/simserial.c| 15 +-- arch/xtensa/platforms/iss/console.

[PATCH 42/42] proc: update SIZEOF_PDE_INLINE_NAME for the new pde fields

2018-05-16 Thread Christoph Hellwig
This makes Alexey happy and Al groan. Based on a patch from Alexey Dobriyan. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/proc/internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/proc/internal.h b/fs/proc/internal.h index 84c68508a256..a318ae

[PATCH 35/42] bluetooth: switch to proc_create_seq_data

2018-05-16 Thread Christoph Hellwig
And use proc private data directly instead of doing a detour through seq->private and private state. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/bluetooth/af_bluetooth.c | 40 +--- 1 file changed, 5 insertions(+), 35 deletions(-) diff --

[PATCH 37/42] atm: switch to proc_create_seq_private

2018-05-16 Thread Christoph Hellwig
And remove proc boilerplate code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- net/atm/proc.c | 72 +- 1 file changed, 13 insertions(+), 59 deletions(-) diff --git a/net/atm/proc.c b/net/atm/proc.c index f272b0f59d82..0b0495a41bbe

[PATCH 38/42] isdn: replace ->proc_fops with ->proc_show

2018-05-16 Thread Christoph Hellwig
And switch to proc_create_single_data. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/isdn/capi/kcapi.c | 3 ++- drivers/isdn/gigaset/capi.c| 16 +--- drivers/isdn/hardware/avm/avmcard.h| 4 ++-- drivers/isdn/hardware/avm/b1.c

[PATCH 23/42] afs: simplify procfs code

2018-05-16 Thread Christoph Hellwig
Use remove_proc_subtree to remove the whole subtree on cleanup, and unwind the registration loop into individual calls. Switch to use proc_create_seq where applicable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/afs/proc.c | 134 ++-

[PATCH 28/42] drbd: switch to proc_create_single

2018-05-16 Thread Christoph Hellwig
And stop messing with try_module_get on THIS_MODULE, which doesn't make any sense here. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/block/drbd/drbd_int.h | 2 +- drivers/block/drbd/drbd_main.c | 3 ++- drivers/block/drbd/drbd_proc.c | 34 +--

[PATCH 21/42] megaraid: simplify procfs code

2018-05-16 Thread Christoph Hellwig
files gracefully. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/megaraid.c | 140 +++- drivers/scsi/megaraid.h | 12 2 files changed, 36 insertions(+), 116 deletions(-) diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/mega

[PATCH 18/42] proc: introduce proc_create_net_single

2018-05-16 Thread Christoph Hellwig
Variant of proc_create_data that directly take a seq_file show callback and deals with network namespaces in ->open and ->release. All callers of proc_create + single_open_net converted over, and single_{open,release}_net are removed entirely. Signed-off-by: Christoph Hellwig <h.

[PATCH 16/42] net: move seq_file_single_net to

2018-05-16 Thread Christoph Hellwig
This helper deals with single_{open,release}_net internals and thus belongs here. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/linux/seq_file_net.h | 13 + include/net/ip_vs.h | 12 2 files changed, 13 insertions(+), 12 deletions(-) diff

Re: [PATCH 11/40] ipv6/flowlabel: simplify pid namespace lookup

2018-05-15 Thread Christoph Hellwig
On Sat, May 05, 2018 at 07:37:33AM -0500, Eric W. Biederman wrote: > Christoph Hellwig <h...@lst.de> writes: > > > The shole seq_file sequence already operates under a single RCU lock pair, > > so move the pid namespace lookup into it, and stop grabbing a reference

Re: [PATCH 04/40] proc: introduce proc_create_seq{,_data}

2018-05-15 Thread Christoph Hellwig
On Mon, Apr 30, 2018 at 02:19:25PM +0100, David Howells wrote: > Christoph Hellwig <h...@lst.de> wrote: > > > + > > +struct proc_dir_entry *proc_create_seq_data(const char *name, umode_t mode, > > + struct proc_dir_entry *parent, const struct seq_operati

Re: [PATCH 34/40] atm: simplify procfs code

2018-05-15 Thread Christoph Hellwig
On Sat, May 05, 2018 at 07:51:18AM -0500, Eric W. Biederman wrote: > Christoph Hellwig <h...@lst.de> writes: > > > Use remove_proc_subtree to remove the whole subtree on cleanup, and > > unwind the registration loop into individual calls. Switch to use > > pr

Re: simplify procfs code for seq_file instances V2

2018-05-15 Thread Christoph Hellwig
On Sun, May 06, 2018 at 08:19:49PM +0300, Alexey Dobriyan wrote: > On Wed, Apr 25, 2018 at 05:47:47PM +0200, Christoph Hellwig wrote: > > Changes since V1: > > - open code proc_create_data to avoid setting not fully initialized > >entries live > > - use unsigned i

Re: [PATCH 06/40] proc: introduce proc_create_single{,_data}

2018-05-15 Thread Christoph Hellwig
On Thu, Apr 26, 2018 at 11:45:50AM +1000, Finn Thain wrote: > > > > -/* > > - * /proc/nubus stuff > > - */ > > - > > I don't think that the introduction of proc_create_single{,_data} alters > the value of that comment. That comment and similar comments in the same > file do have a purpose,

Re: [PATCH v2] target: transport should allow st ILI reads

2018-05-10 Thread Christoph Hellwig
On Wed, May 09, 2018 at 01:59:21PM -0700, Lee Duncan wrote: > When a tape drive is exported via LIO using the > pscsi module, a read that requests more bytes per block > than the tape can supply returns an empty buffer. This > is because the pscsi pass-through target module sees > the "ILI"

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-03 Thread Christoph Hellwig
On Thu, May 03, 2018 at 02:03:38PM +0200, Michal Hocko wrote: > On Sat 28-04-18 19:10:47, Matthew Wilcox wrote: > > Another way we could approach this is to get rid of ZONE_DMA. Make GFP_DMA > > a flag which doesn't map to a zone. Rather, it redirects to a separate > > allocator. At boot, we hand

Re: [PATCH] usb-storage: stop using block layer bounce buffers

2018-05-02 Thread Christoph Hellwig
On Fri, Apr 27, 2018 at 10:09:17AM -0400, Alan Stern wrote: > On Fri, 27 Apr 2018, Christoph Hellwig wrote: > > > On Sun, Apr 15, 2018 at 11:24:11AM -0400, Alan Stern wrote: > > > On Sun, 15 Apr 2018, Christoph Hellwig wrote: > > > > > > > USB host cont

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-28 Thread Christoph Hellwig
On Fri, Apr 27, 2018 at 04:14:56PM +, Luis R. Rodriguez wrote: > But curious, on a standard qemu x86_x64 KVM guest, which of the > drivers do we know for certain *are* being used from the ones > listed? On a KVM guest probably none. But not all the world is relatively sane and standardized

<    1   2   3   4   5   6   7   8   9   10   >