History

NFSD: Add NFSD_CMD_UNLOCK_FILESYSTEM netlink command

Add NFSD_CMD_UNLOCK_FILESYSTEM as a dedicated netlink command for revoking NFS state under a filesystem path, providing a netlink equivalent of /proc/fs/nfsd/unlock_fs. The command requires a "path" string attribute containing the filesystem path whose state should be released. The handler resolves the path to its superblock, then cancels async copies, releases NLM locks, and revokes NFSv4 state on that superblock.

Chuck Lever committed 6 months ago

Commit 327c5161 parent 978cda85 files · +77 −0Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/linux/nfsd_netlink.h+8−0
@@ -211,6 +211,13 @@ enum { · 210 unmodified lines
211211 NFSD_A_UNLOCK_IP_MAX = (__NFSD_A_UNLOCK_IP_MAX - 1)
212212 };
213213
214+enum {
215+ NFSD_A_UNLOCK_FILESYSTEM_PATH = 1,
216+
217+ __NFSD_A_UNLOCK_FILESYSTEM_MAX,
218+ NFSD_A_UNLOCK_FILESYSTEM_MAX = (__NFSD_A_UNLOCK_FILESYSTEM_MAX - 1)
219+};
220+
214221 enum {
215222 NFSD_CMD_RPC_STATUS_GET = 1,
216223 NFSD_CMD_THREADS_SET,
@@ -228,6 +235,7 @@ enum { · 11 unmodified lines
228235 NFSD_CMD_EXPKEY_SET_REQS,
229236 NFSD_CMD_CACHE_FLUSH,
230237 NFSD_CMD_UNLOCK_IP,
238+ NFSD_CMD_UNLOCK_FILESYSTEM,
231239
232240 __NFSD_CMD_MAX,
233241 NFSD_CMD_MAX = (__NFSD_CMD_MAX - 1)