On Mon, Jan 25, 2021 at 1:36 PM Jens Axboe <axboe@xxxxxxxxx> wrote: > > Patch 2 is the > mostly ugly part, but not sure how we can do this any better - we need > to ensure that any sort of revalidation or sync in ->getattr() honors > it too. Yeah, that's not pretty, but I agree - it looks like this just requires the filesystem to check whether it needs to revalidate or not. But I think that patch could do better than what your patch does. Some of them are "filesystems could decide to be more finegrained") - your cifs patch comes to mind - but some of your "return -EAGAIN if cached" seem to be just plain pointless. In afs, for example, you return -EAGAIN instead of just doing the read-seqlock thing. That's a really cheap CPU-only operation. We're talking "cheaper than a spinlock" sequence. Linus