[pnfs] [PATCH 0/6] Rewrite layout cache reference counting

Andy Adamson andros at netapp.com
Wed Jul 23 15:05:23 EDT 2008


This patch set rewrites the reference counting for pnfs_layout_type and
fixes the pnfs_layout_segment reference counting. It also separates the
nfs_inode lo_lock from the pnfs_layout_type referencing.

This code passes the connectathon tests. Here is an overview of the
pnfs_layout_type referencing.

A reference for pnfs_layout_type is taken across LAYOUTGET and
LAYOUTRETURN calls. 
A reference is also taken (briefly) across pnfs_getboundary and
pnfs_find_get_lseg calls which are called early-on in the I/O path
potentially prior to getting a layout.

A reference is taken at pnfs_layout_segment init (and dropped in
destroy_lseg). This means that the pnfs_layout_type is referenced as
long as there are any lsegs in the cache which protects I/O
(READ/WRITE/COMMIT) using the pnfs_layout_type.

We do not hold a reference across a LAYOUTCOMMIT call.

0001-pnfs-fix-commit-lseg-reference-counting.patch
0002-pnfs-Remove-check-for-RECALL_FILE-from-layout-retur.patch
0003-pnfs-use-kref-for-pnfs_layout_type-reference-counti.patch
0004-pnfs-remove-spin_unlock-from-put_unlock_current_lay.patch
0005-pnfs-don-t-call-put_lseg-with-lo_lock-held.patch
0006-pnfs-reference-pnfs_layout_type-across-lseg-life.patch

-->Andy


More information about the pNFS mailing list