These changes are a raw update to a vanilla kernel 4.1.10, with the
[kvmfornfv.git] / kernel / fs / nfs / flexfilelayout / flexfilelayout.c
index 7d05089..fecd920 100644 (file)
@@ -631,7 +631,7 @@ static void ff_layout_reset_write(struct nfs_pgio_header *hdr, bool retry_pnfs)
                        nfs_direct_set_resched_writes(hdr->dreq);
                        /* fake unstable write to let common nfs resend pages */
                        hdr->verf.committed = NFS_UNSTABLE;
-                       hdr->good_bytes = 0;
+                       hdr->good_bytes = hdr->args.count;
                }
                return;
        }
@@ -1039,6 +1039,11 @@ static int ff_layout_write_done_cb(struct rpc_task *task,
            hdr->res.verf->committed == NFS_DATA_SYNC)
                ff_layout_set_layoutcommit(hdr);
 
+       /* zero out fattr since we don't care DS attr at all */
+       hdr->fattr.valid = 0;
+       if (task->tk_status >= 0)
+               nfs_writeback_update_inode(hdr);
+
        return 0;
 }