nuttx/drivers
Neil Berkman c1c6e26395 drivers/mtd/ftl: bypass rwbuffer when O_DIRECT is set
ftl_write() unconditionally routes writes through rwb_write() when
FTL_HAVE_RWBUFFER is defined, ignoring the O_DIRECT flag stored in
dev->oflags. This means callers that open with O_DIRECT expecting
unbuffered writes still get their data buffered in RAM.

The O_DIRECT flag is already checked in ftl_flush() to select
between direct and read-modify-write paths, but the buffering
decision in ftl_write() never consults it.

Add O_DIRECT checks in both ftl_write() and ftl_read() to bypass
rwbuffer entirely when the flag is set. For writes, go directly to
ftl_flush() and normalize the return value to match the block
driver convention (nsectors on success). For reads, go directly to
ftl_reload(), bypassing any read-ahead cache.

This gives O_DIRECT callers a complete bypass of the rwbuffer layer
for both reads and writes, matching the documented contract.

Signed-off-by: Neil Berkman <neil@xuku.com>
2026-03-18 13:05:20 +01:00
..
1wire
aie
analog drivers/analog: fix adc ads1115 driver 2026-02-03 08:27:59 -05:00
audio
bch
can netdev_driver: add carrier_on to xxx_ifup where carrier_on is absent 2026-02-02 13:23:05 +08:00
clk
contactless
coresight
crypto
devicetree
dma
dummy
eeprom mtd/at25ee: Use eeprom/spi_xx25xx internally 2025-12-17 19:03:54 +01:00
efuse
i2c drivers/i2c: add ioexpander-based lower-half implementation for I2C bit-bang 2026-01-01 17:08:47 +08:00
i2s
i3c Revert: "drivers/i3c: remove extra i3c_dev_register, do_daa has created them" 2025-12-09 08:23:46 -03:00
input drivers/input: remove nxsig_notification when signal support is disabled 2026-02-26 20:03:05 +08:00
ioexpander drivers/ioexpander: add DEV_GPIO_NSIGNALS dependency on signals 2026-02-26 20:03:05 +08:00
ipcc
lcd drivers/lcd: Refactor ST7796 to use Kconfig and add Power Management 2026-03-08 15:46:52 -03:00
leds drivers/leds: remove bo_closing as lu_lock can prevent race condition occurs 2026-01-08 11:17:17 +08:00
loop
math drivers/math: use small lock to replace enter_critical_section 2026-01-08 11:17:17 +08:00
misc drivers/misc/optee: add missing addrenv header include 2026-01-16 09:04:12 -03:00
mmcsd drivers/mmcsd: fix typo, it should be "Byte" by spec 2026-01-16 01:38:29 +08:00
modem drivers/alt1250: remove altmdm_timer for no signals 2026-02-26 20:03:05 +08:00
motor drivers/motor: use small lock to replace enter_critical_section 2026-01-08 11:17:17 +08:00
mtd drivers/mtd/ftl: bypass rwbuffer when O_DIRECT is set 2026-03-18 13:05:20 +01:00
net drivers/net: remove nxsig_notification when signal support is disabled 2026-02-26 20:03:05 +08:00
note drivers/note: noteram ioctl FIONBIO should return -ENOTTY 2026-02-10 08:01:59 -03:00
pci drivers/pci:fix pci_disable_irq/pci_enable_irq parameter 2026-01-30 12:50:42 +08:00
pinctrl
pipes drivers/pipe: fix POLLHUP handling in poll() 2026-01-22 22:09:01 +08:00
power drivers/power/pm: Fix typos in comments 2026-02-02 15:53:09 +01:00
rc
regmap
reset
rf
rmt
rpmsg drivers/rpmsg_virtio: Add VIRTIO_RPMSG_F_BUFADDR to support specify the address 2026-03-05 12:39:13 +08:00
rptun rpmsg_virtio/rptun: support fallback cpuname when VIRTIO_RPMSG_F_CPUNAME not set 2026-02-04 20:01:13 -03:00
segger
sensors drivers/sensors: Legacy sensor warning 2026-03-01 16:37:20 -03:00
serial serial/uart_rpmsg: Remove redundant CONFIG_RPMSG_UART_CONSOLE macro check 2026-03-03 11:55:34 -05:00
spi
syslog drivers/syslog: add millisecond option for syslog timestamp formatting 2026-02-27 08:09:31 -03:00
thermal
timers drivers/timers: remove nxsig_notification when signal support is disabled 2026-02-26 20:03:05 +08:00
usbdev rndis.c: move ifup in setconfig to the work queue 2026-02-27 15:39:38 +08:00
usbhost netdev_driver: add carrier_on to xxx_ifup where carrier_on is absent 2026-02-02 13:23:05 +08:00
usbmisc
usbmonitor
usrsock usrsock_rpmsg_server.c: replace net_lock with conn_lock 2026-01-07 09:17:49 -03:00
vhost drivers/vhost: add missing SCHED_WORKQUEUE dependency 2026-02-04 02:32:02 +08:00
video drivers/video: add GC0308 VGA CMOS image sensor driver 2026-03-16 17:26:27 -03:00
virtio drivers/virtio and vhost: auto-select parent config from sub-drivers 2026-02-04 02:32:02 +08:00
wireless wireless/cc1101: Make SPI burst and single frequencies configurable 2026-03-12 14:23:35 +01:00
.gitignore
CMakeLists.txt
drivers_initialize.c serial/uart_rpmsg: add _raw version of driver 2026-02-23 09:19:57 -03:00
Kconfig
Makefile Makefile: Remove make depend files by make distclean 2026-02-16 16:27:57 +01:00