On 6/20/23 7:29?AM, Christoph Hellwig wrote: > On Tue, Jun 20, 2023 at 07:24:56AM -0600, Jens Axboe wrote: >> I think we need stronger justification than that, it's much nicer to >> have it in the open path than doing the same check over and over for >> each IO. >> >> With your new proposed scheme, why can't the check and FMODE_NOWAIT set >> still be in open? > > Because I want to move the by now huge number of static flags out of > file->f_mode and into file->f_op.flags. It's just that with this patch > this one flag isn't static anymore for block devices. We could also > do two sets of file operations assuming we never allow run-time changes > for QUEUE_FLAG_NOWAIT. If we care about optimizing fo async I/O on the > few drivers not supporting QUEUE_FLAG_NOWAIT that's probably the next > best thing. Doing two sets of fops makes sense to me, and then hopefully down the line we can shave it down to 1 again once everything sets FMODE_NOWAIT. -- Jens Axboe