Assuming you're saying "dynamically tell the FSAL, hey, I'm changing Protocols to just V4 now", how would that work for say v3/NLM lock state?

For NLM, you can't just drop the information as someone needs to go through each lock and < do something >. The most obvious would be to pretend that the server crashed, disable v3, and then allow recovery to proceed.

Adding a protocol might be easier. For the V4 Proxy, I think it also only (optionally) builds up V3 filehandles on demand, and those would presumably not have been setup during the "I was just being a V4 proxy until you came along" preamble. Other in-tree FSALs don't seem to care much about V3 vs V4 client-ness. Though on that note, I don't see a particularly good way for my new V3 proxy to allow V4 clients (and it would be nice to signal as such to the upper layers).

At the very least, it seems like you'd need to ask FSALs if they can be adjusted like this, and if not, do an un-export followed by create_export (but in the interim claim to be in grace?).