diff options
| author | Benjamin Coddington <ben.coddington@hammerspace.com> | 2026-09-15 08:22:10 -0400 |
|---|---|---|
| committer | Anna Schumaker <anna.schumaker@hammerspace.com> | 2026-10-05 09:46:43 -0400 |
| commit | e85acae4cda89c075bc94520fdcf5901595fffae (patch) | |
| tree | 4863c31da4c3d74d6266b097b1afebd4553ade13 /include/linux | |
| parent | 7f2d221b01f356b6bb3bb6efef998f8b28339824 (diff) | |
NFSv4/flexfiles: Reference the device node across DS setup
The flexfiles I/O setup paths read the mirror's pinned per-stripe device
node (mirror->dss[dss_id].mirror_ds) repeatedly and locklessly, relying
on the mirror's lifetime pin. To prepare for re-resolving that pointer
in place on CB_NOTIFY_DEVICEID CHANGE, readers must hold their own
reference on the node they are using rather than trusting the pin.
Replace ff_layout_init_mirror_ds() with ff_layout_get_mirror_ds(), which
resolves on first use as before but returns the node with its own
reference held. Thread the referenced node through
nfs4_ff_layout_prepare_ds() and the DS selection helpers so each setup
path snapshots the node once, and drop the reference when setup is done.
No functional change: the pointer is still resolved once and pinned for
the life of the mirror. Each reference this adds is released on every
exit from the path that took it, error paths included.
Assisted-by: Claude:claude-fable-5
Signed-off-by: Benjamin Coddington <bcodding@hammerspace.com>
Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
