Message ID | 4DDB8ED0.9000506@panasas.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c index c09066f..47e8cb5 100644 --- a/fs/nfs/objlayout/objio_osd.c +++ b/fs/nfs/objlayout/objio_osd.c @@ -110,6 +110,7 @@ _dev_list_add(const struct nfs_server *nfss, de = n; } + atomic_inc(&de->id_node.ref); return de; }
Take an extra reference on a device insert. So devices keep around in the cache until nfs_client release. (This was the behaviour of the old cache) The extra reference will be removed in nfs4_deviceid_purge_client(). I tested this and it works perfectly. TODO: Define an nfs4_get_deviceid() Currently accessing did->ref directly TODO: nfs4_insert_deviceid_node should check if there are too many devices and start purging them. Say by longest time from last use. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> --- fs/nfs/objlayout/objio_osd.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)