NFSv4.1: Allow getdeviceinfo to return notification info back to caller
[linux-2.6-block.git] / fs / nfs / nfs4proc.c
index 627f37c44456752d6bd90a8882ae373ec6d70718..ba8b2b5e98a165d22a103bad909f4ba7ac5944b7 100644 (file)
@@ -7944,6 +7944,8 @@ _nfs4_proc_getdeviceinfo(struct nfs_server *server,
 {
        struct nfs4_getdeviceinfo_args args = {
                .pdev = pdev,
+               .notify_types = NOTIFY_DEVICEID4_CHANGE |
+                       NOTIFY_DEVICEID4_DELETE,
        };
        struct nfs4_getdeviceinfo_res res = {
                .pdev = pdev,
@@ -7958,6 +7960,9 @@ _nfs4_proc_getdeviceinfo(struct nfs_server *server,
 
        dprintk("--> %s\n", __func__);
        status = nfs4_call_sync(server->client, server, &msg, &args.seq_args, &res.seq_res, 0);
+       if (res.notification & ~args.notify_types)
+               dprintk("%s: unsupported notification\n", __func__);
+
        dprintk("<-- %s status=%d\n", __func__, status);
 
        return status;