Linux Device Mapper development
 help / color / mirror / Atom feed
From: John Garry <john.garry@linux.dev>
To: Hannes Reinecke <hare@suse.de>,
	John Garry <john.g.garry@oracle.com>,
	martin.petersen@oracle.com,
	james.bottomley@hansenpartnership.com, hare@suse.com
Cc: jmeneghi@redhat.com, linux-nvme@lists.infradead.org,
	linux-scsi@vger.kernel.org, michael.christie@oracle.com,
	snitzer@kernel.org, bmarzins@redhat.com,
	dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
	nilay@linux.ibm.com, hch@lst.de, kbusch@kernel.org,
	sagi@grimberg.me
Subject: Re: [PATCH v4 01/28] libmultipath: Add initial framework
Date: Fri, 24 Jul 2026 09:00:00 +0100	[thread overview]
Message-ID: <a762baf6-3e0c-44f4-9e3f-d7e9e85206bd@linux.dev> (raw)
In-Reply-To: <ba62d294-6954-44d3-af79-6c7da33a5ccd@suse.de>

>> new file mode 100644
>> index 0000000000000..e98b4b241020a
>> --- /dev/null
>> +++ b/include/linux/multipath.h
>> @@ -0,0 +1,28 @@
> 
> Please add an SPDX tag.

OK, will add

> And possibly a copyright.

I think that just the c file is fine.

> 
>> +
>> +#ifndef _LIBMULTIPATH_H
>> +#define _LIBMULTIPATH_H
>> +
>> +#include <linux/blkdev.h>
>> +#include <linux/srcu.h>
>> +
>> +struct mpath_device {
>> +    struct list_head    siblings;
>> +    struct gendisk        *disk;
>> +};
>> +
>> +struct mpath_head {
>> +    struct srcu_struct    srcu;
>> +    struct list_head    dev_list;    /* list of all mpath_devs */
>> +    struct mutex        lock;
>> +
>> +    refcount_t        refcount;
>> +
>> +    struct mpath_device __rcu         *current_path[MAX_NUMNODES];
>> +};
>> +
>> +int mpath_get_head(struct mpath_head *mpath_head);
>> +void mpath_put_head(struct mpath_head *mpath_head);
>> +int mpath_head_init(struct mpath_head *mpath_head);
>> +void mpath_head_uninit(struct mpath_head *mpath_head);
>> +
>> +#endif // _LIBMULTIPATH_H
>> diff --git a/lib/Kconfig b/lib/Kconfig
>> index 55748b68714e0..d0258bef374a1 100644
>> --- a/lib/Kconfig
>> +++ b/lib/Kconfig
>> @@ -636,3 +636,9 @@ config UNION_FIND
>>   config MIN_HEAP
>>       bool
>> +
>> +config LIBMULTIPATH
>> +    bool "MULTIPATH BLOCK DRIVER LIBRARY"
>> +    depends on BLOCK
>> +    help
>> +      If you say yes here then you get a multipath lib for block drivers
>> diff --git a/lib/Makefile b/lib/Makefile
>> index 7f75cc6edf94a..7ba5e13be4171 100644
>> --- a/lib/Makefile
>> +++ b/lib/Makefile
>> @@ -334,3 +334,5 @@ CONTEXT_ANALYSIS_test_context-analysis.o := y
>>   obj-$(CONFIG_CONTEXT_ANALYSIS_TEST) += test_context-analysis.o
>>   subdir-$(CONFIG_FORTIFY_SOURCE) += test_fortify
>> +
>> +obj-$(CONFIG_LIBMULTIPATH)    += multipath.o
>> diff --git a/lib/multipath.c b/lib/multipath.c
>> new file mode 100644
>> index 0000000000000..9cc398d266adf
>> --- /dev/null
>> +++ b/lib/multipath.c
>> @@ -0,0 +1,66 @@
>> +// SPDX-License-Identifier: GPL-2.0-only
>> +/*
>> + * Copyright (c) 2017-2018 Christoph Hellwig.
> A bit unusual, creating a new file and add a copyright
> from _another_ person ...
> 

This code is really just a refactoring of the NVMe multipath code. Since 
Christoph copyrighted that, I think it only proper to add his copyright 
here.

I'll remove it if Christoph wants.

> 
> Otherwise:
> Reviewed-by: Hannes Reinecke <hare@kernel.org>
> 

Thanks


      reply	other threads:[~2026-07-24  8:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260723093627.2327456-1-john.g.garry@oracle.com>
     [not found] ` <20260723093627.2327456-2-john.g.garry@oracle.com>
2026-07-24  6:50   ` [PATCH v4 01/28] libmultipath: Add initial framework Hannes Reinecke
2026-07-24  8:00     ` John Garry [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a762baf6-3e0c-44f4-9e3f-d7e9e85206bd@linux.dev \
    --to=john.garry@linux.dev \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=hare@suse.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=jmeneghi@redhat.com \
    --cc=john.g.garry@oracle.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=nilay@linux.ibm.com \
    --cc=sagi@grimberg.me \
    --cc=snitzer@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox