> That opens up a nasty race: if the dentry is released before the
> pointer is harvested, you get a bogus pointer.
>
You simply increase the reference count of every dentry you visit, and
free it when the log is read.
> How's that? It won't matter if read(2) synchronises, because I'll be
> issuing the requests in device bnum order.
>
Of course it does, because the kernel needs to wait for the next read()
system call from your application, which it can only do after the first
one completes, which adds another delay which will slow you down,
especially with high-latency I/O protocols.
-- Matthias Urlichs | noris network AG | http://smurf.noris.de/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/