Commit 0c9f4ac8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-6.10/block-20240511' of git://git.kernel.dk/linux

Pull block updates from Jens Axboe:

 - Add a partscan attribute in sysfs, fixing an issue with systemd
   relying on an internal interface that went away.

 - Attempt #2 at making long running discards interruptible. The
   previous attempt went into 6.9, but we ended up mostly reverting it
   as it had issues.

 - Remove old ida_simple API in bcache

 - Support for zoned write plugging, greatly improving the performance
   on zoned devices.

 - Remove the old throttle low interface, which has been experimental
   since 2017 and never made it beyond that and isn't being used.

 - Remove page->index debugging checks in brd, as it hasn't caught
   anything and prepares us for removing in struct page.

 - MD pull request from Song

 - Don't schedule block workers on isolated CPUs

* tag 'for-6.10/block-20240511' of git://git.kernel.dk/linux: (84 commits)
  blk-throttle: delay initialization until configuration
  blk-throttle: remove CONFIG_BLK_DEV_THROTTLING_LOW
  block: fix that util can be greater than 100%
  block: support to account io_ticks precisely
  block: add plug while submitting IO
  bcache: fix variable length array abuse in btree_iter
  bcache: Remove usage of the deprecated ida_simple_xx() API
  md: Revert "md: Fix overflow in is_mddev_idle"
  blk-lib: check for kill signal in ioctl BLKDISCARD
  block: add a bio_await_chain helper
  block: add a blk_alloc_discard_bio helper
  block: add a bio_chain_and_submit helper
  block: move discard checks into the ioctl handler
  block: remove the discard_granularity check in __blkdev_issue_discard
  block/ioctl: prefer different overflow check
  null_blk: Fix the WARNING: modpost: missing MODULE_DESCRIPTION()
  block: fix and simplify blkdevparts= cmdline parsing
  block: refine the EOF check in blkdev_iomap_begin
  block: add a partscan sysfs attribute for disks
  block: add a disk_has_partscan helper
  ...
parents 9961a785 a3166c51
Loading
Loading
Loading
Loading
+10 −12
Original line number Diff line number Diff line
@@ -101,6 +101,16 @@ Description:
		devices that support receiving integrity metadata.


What:		/sys/block/<disk>/partscan
Date:		May 2024
Contact:	Christoph Hellwig <hch@lst.de>
Description:
		The /sys/block/<disk>/partscan files reports if partition
		scanning is enabled for the disk.  It returns "1" if partition
		scanning is enabled, or "0" if not.  The value type is a 32-bit
		unsigned integer, but only "0" and "1" are valid values.


What:		/sys/block/<disk>/<partition>/alignment_offset
Date:		April 2009
Contact:	Martin K. Petersen <martin.petersen@oracle.com>
@@ -584,18 +594,6 @@ Description:
		the data.  If no such restriction exists, this file will contain
		'0'.  This file is writable for testing purposes.


What:		/sys/block/<disk>/queue/throttle_sample_time
Date:		March 2017
Contact:	linux-block@vger.kernel.org
Description:
		[RW] This is the time window that blk-throttle samples data, in
		millisecond.  blk-throttle makes decision based on the
		samplings. Lower time means cgroups have more smooth throughput,
		but higher CPU overhead. This exists only when
		CONFIG_BLK_DEV_THROTTLING_LOW is enabled.


What:		/sys/block/<disk>/queue/virt_boundary_mask
Date:		April 2021
Contact:	linux-block@vger.kernel.org
+0 −1
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_BLK_DEV_ZONED=y
CONFIG_BLK_DEV_THROTTLING=y
CONFIG_BLK_DEV_THROTTLING_LOW=y
CONFIG_BLK_WBT=y
CONFIG_BLK_CGROUP_IOLATENCY=y
CONFIG_BLK_CGROUP_FC_APPID=y
+0 −16
Original line number Diff line number Diff line
@@ -100,7 +100,6 @@ config BLK_DEV_WRITE_MOUNTED

config BLK_DEV_ZONED
	bool "Zoned block device support"
	select MQ_IOSCHED_DEADLINE
	help
	Block layer zoned block device support. This option enables
	support for ZAC/ZBC/ZNS host-managed and host-aware zoned block
@@ -120,17 +119,6 @@ config BLK_DEV_THROTTLING

	See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.

config BLK_DEV_THROTTLING_LOW
	bool "Block throttling .low limit interface support (EXPERIMENTAL)"
	depends on BLK_DEV_THROTTLING
	help
	Add .low limit interface for block throttling. The low limit is a best
	effort limit to prioritize cgroups. Depending on the setting, the limit
	can be used to protect cgroups in terms of bandwidth/iops and better
	utilize disk resource.

	Note, this is an experimental interface and could be changed someday.

config BLK_WBT
	bool "Enable support for block device writeback throttling"
	help
@@ -198,10 +186,6 @@ config BLK_DEBUG_FS
	Unless you are building a kernel for a tiny system, you should
	say Y here.

config BLK_DEBUG_FS_ZONED
       bool
       default BLK_DEBUG_FS && BLK_DEV_ZONED

config BLK_SED_OPAL
	bool "Logic for interfacing with Opal enabled SEDs"
	depends on KEYS
+0 −1
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ obj-$(CONFIG_BLK_MQ_VIRTIO) += blk-mq-virtio.o
obj-$(CONFIG_BLK_DEV_ZONED)	+= blk-zoned.o
obj-$(CONFIG_BLK_WBT)		+= blk-wbt.o
obj-$(CONFIG_BLK_DEBUG_FS)	+= blk-mq-debugfs.o
obj-$(CONFIG_BLK_DEBUG_FS_ZONED)+= blk-mq-debugfs-zoned.o
obj-$(CONFIG_BLK_SED_OPAL)	+= sed-opal.o
obj-$(CONFIG_BLK_PM)		+= blk-pm.o
obj-$(CONFIG_BLK_INLINE_ENCRYPTION)	+= blk-crypto.o blk-crypto-profile.o \
+41 −9
Original line number Diff line number Diff line
@@ -345,18 +345,29 @@ void bio_chain(struct bio *bio, struct bio *parent)
}
EXPORT_SYMBOL(bio_chain);

struct bio *blk_next_bio(struct bio *bio, struct block_device *bdev,
		unsigned int nr_pages, blk_opf_t opf, gfp_t gfp)
/**
 * bio_chain_and_submit - submit a bio after chaining it to another one
 * @prev: bio to chain and submit
 * @new: bio to chain to
 *
 * If @prev is non-NULL, chain it to @new and submit it.
 *
 * Return: @new.
 */
struct bio *bio_chain_and_submit(struct bio *prev, struct bio *new)
{
	struct bio *new = bio_alloc(bdev, nr_pages, opf, gfp);

	if (bio) {
		bio_chain(bio, new);
		submit_bio(bio);
	if (prev) {
		bio_chain(prev, new);
		submit_bio(prev);
	}

	return new;
}

struct bio *blk_next_bio(struct bio *bio, struct block_device *bdev,
		unsigned int nr_pages, blk_opf_t opf, gfp_t gfp)
{
	return bio_chain_and_submit(bio, bio_alloc(bdev, nr_pages, opf, gfp));
}
EXPORT_SYMBOL_GPL(blk_next_bio);

static void bio_alloc_rescue(struct work_struct *work)
@@ -1384,6 +1395,26 @@ int submit_bio_wait(struct bio *bio)
}
EXPORT_SYMBOL(submit_bio_wait);

static void bio_wait_end_io(struct bio *bio)
{
	complete(bio->bi_private);
	bio_put(bio);
}

/*
 * bio_await_chain - ends @bio and waits for every chained bio to complete
 */
void bio_await_chain(struct bio *bio)
{
	DECLARE_COMPLETION_ONSTACK_MAP(done,
			bio->bi_bdev->bd_disk->lockdep_map);

	bio->bi_private = &done;
	bio->bi_end_io = bio_wait_end_io;
	bio_endio(bio);
	blk_wait_io(&done);
}

void __bio_advance(struct bio *bio, unsigned bytes)
{
	if (bio_integrity(bio))
@@ -1576,6 +1607,8 @@ void bio_endio(struct bio *bio)
	if (!bio_integrity_endio(bio))
		return;

	blk_zone_bio_endio(bio);

	rq_qos_done_bio(bio);

	if (bio->bi_bdev && bio_flagged(bio, BIO_TRACE_COMPLETION)) {
@@ -1596,7 +1629,6 @@ void bio_endio(struct bio *bio)
		goto again;
	}

	blk_throtl_bio_endio(bio);
	/* release cgroup info */
	bio_uninit(bio);
	if (bio->bi_end_io)
Loading