NFSv4.1/flexfiles: Fix incorrect usage of pnfs_generic_mark_devid_invalid()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 1 Sep 2015 10:31:33 +0000 (03:31 -0700)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 1 Sep 2015 22:12:11 +0000 (15:12 -0700)
Unlike the files layout, flexfiles does not test for the NFS_DEVICEID_INVALID
flag. Instead it relies on NFS_DEVICEID_UNAVAILABLE.
Fix is to replace with nfs4_mark_deviceid_unavailable().

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/flexfilelayout/flexfilelayoutdev.c

index b28fa4cbea5261622c4dbeb9b3765d12a2abdf9a..883d35c867788af7c7accfe301a3499f5675e65c 100644 (file)
@@ -344,7 +344,7 @@ nfs4_ff_layout_select_ds_fh(struct pnfs_layout_segment *lseg, u32 mirror_idx)
                        __func__, mirror_idx);
                if (mirror && mirror->mirror_ds) {
                        devid = &mirror->mirror_ds->id_node;
-                       pnfs_generic_mark_devid_invalid(devid);
+                       nfs4_mark_deviceid_unavailable(devid);
                }
                goto out;
        }
@@ -374,7 +374,7 @@ nfs4_ff_layout_prepare_ds(struct pnfs_layout_segment *lseg, u32 ds_idx,
                        __func__, ds_idx);
                if (mirror && mirror->mirror_ds) {
                        devid = &mirror->mirror_ds->id_node;
-                       pnfs_generic_mark_devid_invalid(devid);
+                       nfs4_mark_deviceid_unavailable(devid);
                }
                goto out;
        }