android_kernel_msm-6.1_noth.../include
Bart Van Assche 4fd9a46455 ANDROID: block: Support configuring limits below the page size
Allow block drivers to configure the following:
* Maximum number of hardware sectors values smaller than
  PAGE_SIZE >> SECTOR_SHIFT. For PAGE_SIZE = 4096 this means that values
  below 8 become supported.
* A maximum segment size below the page size. This is most useful
  for page sizes above 4096 bytes.

The blk_sub_page_segments static branch will be used in later patches to
prevent that performance of block drivers that support segments >=
PAGE_SIZE and max_hw_sectors >= PAGE_SIZE >> SECTOR_SHIFT would be affected.

This patch may change the behavior of existing block drivers from not
working into working. If a block driver calls
blk_queue_max_hw_sectors() or blk_queue_max_segment_size(), this is
usually done to configure the maximum supported limits. An attempt to
configure a limit below what is supported by the block layer causes the
block layer to select a larger value. If that value is not supported by
the block driver, this may cause other data to be transferred than
requested, a kernel crash or other undesirable behavior.

Keeps the ABI stable by taking advantage of hole in struct queue_limits.

Bug: 308663717
Bug: 319125789
Bug: 324152549

Change-Id: I7358f3e16aa0c80a6d345cb7887fbe9276e52912
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
[jyescas@google.com: disable subpage limits in block/blk-sysfs.c
                     instead block/blk-core.c because the function
                     blk_free_queue() is not defined in 6.1 kernel]
Signed-off-by: Juan Yescas <jyescas@google.com>
2024-03-20 23:00:23 +00:00
..
acpi ACPI: sleep: Avoid breaking S3 wakeup due to might_sleep() 2023-06-28 11:12:22 +02:00
asm-generic Revert "Merge tag 'android14-6.1.75_r00' into android14-6.1" 2024-03-07 21:18:27 +00:00
clocksource
crypto Revert "Merge tag 'android14-6.1.75_r00' into android14-6.1" 2024-03-07 21:18:27 +00:00
drm Revert "Merge tag 'android14-6.1.75_r00' into android14-6.1" 2024-03-07 21:18:27 +00:00
dt-bindings Revert "Merge tag 'android14-6.1.75_r00' into android14-6.1" 2024-03-07 21:18:27 +00:00
keys
kunit kunit: add macro to allow conditionally exposing static symbols to tests 2023-11-20 11:52:08 +01:00
kvm Merge 6.1.47 into android14-6.1-lts 2023-09-13 19:35:46 +00:00
linux ANDROID: block: Support configuring limits below the page size 2024-03-20 23:00:23 +00:00
math-emu
media Revert "media: cec: core: add adap_nb_transmit_canceled() callback" 2023-10-12 14:10:23 +00:00
memory
misc
net Revert "Merge tag 'android14-6.1.75_r00' into android14-6.1" 2024-03-07 21:18:27 +00:00
pcmcia
ras
rdma RDMA/core: Fix umem iterator when PAGE_SIZE is greater then HCA pgsz 2023-12-13 18:39:15 +01:00
rv
scsi scsi: sd: Fix system start for ATA devices 2023-12-08 08:51:14 +01:00
soc net: mscc: ocelot: don't keep PTP configuration of all ports in single structure 2023-07-19 16:22:01 +02:00
sound Revert "ASoC: soc-card: Add storage for PCI SSID" 2023-12-12 18:42:07 +00:00
target
trace ANDROID: sound: usb: add vendor hook for cpu suspend support 2024-03-20 19:56:33 +00:00
uapi Revert "Merge tag 'android14-6.1.75_r00' into android14-6.1" 2024-03-07 21:18:27 +00:00
ufs FROMLIST: scsi: ufs: core: Export symbols for MTK driver module 2023-07-04 09:08:44 +00:00
vdso
video
xen xen: simplify evtchn_do_upcall() call maze 2023-12-08 08:51:20 +01:00