Merge branch 'pnfs'
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 24 Jul 2016 21:08:59 +0000 (17:08 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 24 Jul 2016 21:08:59 +0000 (17:08 -0400)
1  2 
fs/nfs/nfs42proc.c
fs/nfs/nfs4proc.c
fs/nfs/pnfs.c
fs/nfs/pnfs.h

Simple merge
index a1a3b4c9a563b71f47198dcc0b319dde8b3eb82b,d38cc5f0282fc7b5d720e6e8a66cd141071f2319..d30f88c667b74ba31bfe30d80ed4c602ab671ae1
@@@ -7940,25 -7921,28 +7940,24 @@@ nfs4_layoutget_handle_exception(struct 
                        exception->state = lgp->args.ctx->state;
                        break;
                }
 -              lo = NFS_I(inode)->layout;
 -              if (lo && !test_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags) &&
 -                  nfs4_stateid_match_other(&lgp->args.stateid, &lo->plh_stateid)) {
 -                      LIST_HEAD(head);
 -
 -                      /*
 -                       * Mark the bad layout state as invalid, then retry
 -                       * with the current stateid.
 -                       */
 -                      pnfs_mark_layout_stateid_invalid(lo, &head);
 -                      spin_unlock(&inode->i_lock);
 -                      pnfs_free_lseg_list(&head);
 -                      status = -EAGAIN;
 -                      goto out;
 -              } else
 -                      spin_unlock(&inode->i_lock);
 -      }
  
 -      status = nfs4_handle_exception(server, status, exception);
 -      if (exception->retry)
 +              /*
 +               * Mark the bad layout state as invalid, then retry
 +               */
-               set_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags);
-               pnfs_mark_matching_lsegs_invalid(lo, &head, NULL, 0);
++              pnfs_mark_layout_stateid_invalid(lo, &head);
 +              spin_unlock(&inode->i_lock);
 +              pnfs_free_lseg_list(&head);
                status = -EAGAIN;
 +              goto out;
 +      }
 +
 +      err = nfs4_handle_exception(server, nfs4err, exception);
 +      if (!status) {
 +              if (exception->retry)
 +                      status = -EAGAIN;
 +              else
 +                      status = err;
 +      }
  out:
        dprintk("<-- %s\n", __func__);
        return status;
diff --cc fs/nfs/pnfs.c
Simple merge
diff --cc fs/nfs/pnfs.h
Simple merge