On Tue, Feb 25, 2025 at 05:40:14PM +0800, Ming Lei wrote: > On Mon, Feb 24, 2025 at 01:31:12PM -0800, Keith Busch wrote: > > + > > + if (op_is_write(req_op(rq))) > > + imu->perm = IO_IMU_WRITEABLE; > > + else > > + imu->perm = IO_IMU_READABLE; > > Looks the above is wrong, if request is for write op, the buffer > should be readable & !writeable. > > IO_IMU_WRITEABLE is supposed to mean the buffer is writeable, isn't it? In the setup I used here, IMU_WRITEABLE means this can be used in a write command. You can write from this buffer, not to it. I think this is the kind of ambiguity that lead iov iter to call these buffers SOURCE and DEST instead of WRITE and READ.