mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Update 6.12 kernel patches
This commit is contained in:
parent
bdb9b0046f
commit
9d83c70ced
247 changed files with 53301 additions and 589 deletions
|
@ -1,7 +1,34 @@
|
|||
From e07ace307ce598847074a096f408bec0e3a392ed Mon Sep 17 00:00:00 2001
|
||||
From patchwork Tue Jul 30 19:26:42 2024
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
|
||||
X-Patchwork-Id: 13747817
|
||||
Date: Tue, 30 Jul 2024 20:26:42 +0100
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Thu, 30 May 2024 03:14:34 +0100
|
||||
Subject: [PATCH 3/9] block: add support for notifications
|
||||
To: Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>,
|
||||
Conor Dooley <conor+dt@kernel.org>, Jens Axboe <axboe@kernel.dk>,
|
||||
Daniel Golle <daniel@makrotopia.org>, Christian Brauner <brauner@kernel.org>,
|
||||
Al Viro <viro@zeniv.linux.org.uk>, Li Lingfeng <lilingfeng3@huawei.com>,
|
||||
Ming Lei <ming.lei@redhat.com>, Christian Heusel <christian@heusel.eu>,
|
||||
=?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= <rafal@milecki.pl>,
|
||||
Felix Fietkau <nbd@nbd.name>, John Crispin <john@phrozen.org>,
|
||||
Chad Monroe <chad.monroe@adtran.com>, Yangyu Chen <cyy@cyyself.name>,
|
||||
Tianling Shen <cnsztl@immortalwrt.org>, Chuanhong Guo <gch981213@gmail.com>,
|
||||
Chen Minqiang <ptpt52@gmail.com>, devicetree@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, linux-block@vger.kernel.org
|
||||
Subject: [PATCH v5 3/4] block: add support for notifications
|
||||
Message-ID:
|
||||
<ca0022886e8f211a323a716653a1396a3bc91653.1722365899.git.daniel@makrotopia.org>
|
||||
References: <cover.1722365899.git.daniel@makrotopia.org>
|
||||
Precedence: bulk
|
||||
X-Mailing-List: linux-block@vger.kernel.org
|
||||
List-Id: <linux-block.vger.kernel.org>
|
||||
List-Subscribe: <mailto:linux-block+subscribe@vger.kernel.org>
|
||||
List-Unsubscribe: <mailto:linux-block+unsubscribe@vger.kernel.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Disposition: inline
|
||||
In-Reply-To: <cover.1722365899.git.daniel@makrotopia.org>
|
||||
|
||||
Add notifier block to notify other subsystems about the addition or
|
||||
removal of block devices.
|
||||
|
@ -10,14 +37,14 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||
---
|
||||
block/Kconfig | 6 +++
|
||||
block/Makefile | 1 +
|
||||
block/blk-notify.c | 88 ++++++++++++++++++++++++++++++++++++++++++
|
||||
include/linux/blkdev.h | 8 ++++
|
||||
4 files changed, 103 insertions(+)
|
||||
block/blk-notify.c | 87 ++++++++++++++++++++++++++++++++++++++++++
|
||||
include/linux/blkdev.h | 11 ++++++
|
||||
4 files changed, 105 insertions(+)
|
||||
create mode 100644 block/blk-notify.c
|
||||
|
||||
--- a/block/Kconfig
|
||||
+++ b/block/Kconfig
|
||||
@@ -208,6 +208,12 @@ config BLK_INLINE_ENCRYPTION_FALLBACK
|
||||
@@ -209,6 +209,12 @@ config BLK_INLINE_ENCRYPTION_FALLBACK
|
||||
by falling back to the kernel crypto API when inline
|
||||
encryption hardware is not present.
|
||||
|
||||
|
@ -32,14 +59,14 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||
config BLK_MQ_PCI
|
||||
--- a/block/Makefile
|
||||
+++ b/block/Makefile
|
||||
@@ -40,3 +40,4 @@ obj-$(CONFIG_BLK_INLINE_ENCRYPTION) += b
|
||||
@@ -38,3 +38,4 @@ obj-$(CONFIG_BLK_INLINE_ENCRYPTION) += b
|
||||
blk-crypto-sysfs.o
|
||||
obj-$(CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK) += blk-crypto-fallback.o
|
||||
obj-$(CONFIG_BLOCK_HOLDER_DEPRECATED) += holder.o
|
||||
+obj-$(CONFIG_BLOCK_NOTIFIERS) += blk-notify.o
|
||||
--- /dev/null
|
||||
+++ b/block/blk-notify.c
|
||||
@@ -0,0 +1,88 @@
|
||||
@@ -0,0 +1,87 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
+/*
|
||||
+ * Notifiers for addition and removal of block devices
|
||||
|
@ -97,7 +124,6 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||
+ list_add_tail(&new_blkdev->list, &blk_devices);
|
||||
+ raw_notifier_call_chain(&blk_notifier_list, BLK_DEVICE_ADD, dev);
|
||||
+ mutex_unlock(&blk_notifier_lock);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
|
@ -130,16 +156,19 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||
+device_initcall(blk_notifications_init);
|
||||
--- a/include/linux/blkdev.h
|
||||
+++ b/include/linux/blkdev.h
|
||||
@@ -1564,4 +1564,12 @@ struct io_comp_batch {
|
||||
@@ -1689,4 +1689,15 @@ static inline bool bdev_can_atomic_write
|
||||
|
||||
#define DEFINE_IO_COMP_BATCH(name) struct io_comp_batch name = { }
|
||||
|
||||
+
|
||||
+#ifdef CONFIG_BLOCK_NOTIFIERS
|
||||
+#define BLK_DEVICE_ADD 1
|
||||
+#define BLK_DEVICE_REMOVE 2
|
||||
+#if defined(CONFIG_BLOCK_NOTIFIERS)
|
||||
+void blk_register_notify(struct notifier_block *nb);
|
||||
+void blk_unregister_notify(struct notifier_block *nb);
|
||||
+#else
|
||||
+static inline void blk_register_notify(struct notifier_block *nb) { };
|
||||
+static inline void blk_unregister_notify(struct notifier_block *nb) { };
|
||||
+#endif
|
||||
+
|
||||
#endif /* _LINUX_BLKDEV_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue