mirror of
https://github.com/torvalds/linux.git
synced 2026-07-12 16:23:17 +02:00
prepare_discard_fn() was being called in a place where memory allocation was effectively impossible. This makes it inappropriate for all but the most trivial translations of Linux's DISCARD operation to the block command set. Additionally adding a payload there makes the ownership of the bio backing unclear as it's now allocated by the device driver and not the submitter as usual. It is replaced with QUEUE_FLAG_DISCARD which is used to indicate whether the queue supports discard operations or not. blkdev_issue_discard now allocates a one-page, sector-length payload which is the right thing for the common ATA and SCSI implementations. The mtd implementation of prepare_discard_fn() is replaced with simply checking for the request being a discard. Largely based on a previous patch from Matthew Wilcox <matthew@wil.cx> which did the prepare_discard_fn but not the different payload allocation yet. Signed-off-by: Christoph Hellwig <hch@lst.de> |
||
|---|---|---|
| .. | ||
| as-iosched.c | ||
| blk-barrier.c | ||
| blk-core.c | ||
| blk-exec.c | ||
| blk-integrity.c | ||
| blk-ioc.c | ||
| blk-iopoll.c | ||
| blk-map.c | ||
| blk-merge.c | ||
| blk-settings.c | ||
| blk-softirq.c | ||
| blk-sysfs.c | ||
| blk-tag.c | ||
| blk-timeout.c | ||
| blk.h | ||
| bsg.c | ||
| cfq-iosched.c | ||
| compat_ioctl.c | ||
| deadline-iosched.c | ||
| elevator.c | ||
| genhd.c | ||
| ioctl.c | ||
| Kconfig | ||
| Kconfig.iosched | ||
| Makefile | ||
| noop-iosched.c | ||
| scsi_ioctl.c | ||