Re: [RFC PATCH v2 14/14] dcache: Implement object migration

From: Christopher Lameter
Date: Wed Apr 03 2019 - 13:56:31 EST

On Wed, 3 Apr 2019, Al Viro wrote:

> Let's do d_invalidate() on random dentries and hope they go away.
> With convoluted and brittle logics for deciding which ones to
> spare, which is actually wrong. This will pick mountpoints
> and tear them out, to start with.
> NAKed-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> And this is a NAK for the entire approach; if it has a positive refcount,
> LEAVE IT ALONE. Period. Don't play this kind of games, they are wrong.
> d_invalidate() is not something that can be done to an arbitrary dentry.

Well could you help us figure out how to do it the right way? We (the MM
guys) are having a hard time not being familiar with the filesystem stuff.

This is an RFC and we want to know how to do this right.