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.