diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-02 19:46:07 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-02 19:46:07 -0500 |
| commit | 8d05b3771da8775799673212b57d62f57c70d68a (patch) | |
| tree | ebce0455032cec54428227022c92a480fa726da0 /fs/nfs/pnfs.c | |
| parent | b695188dd39162a1a6bff11fdbcc4c0b65b933ab (diff) | |
| parent | 512e4b291c0e97af24619a91f3e8963697da00d8 (diff) | |
Merge tag 'nfs-for-3.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client bugfixes from Trond Myklebust:
"We've just concluded another Connectathon interoperability testing
week, and so here are the fixes for the bugs that were discovered:
- Don't allow NFS silly-renamed files to be deleted
- Don't start the retransmission timer when out of socket space
- Fix a couple of pnfs-related Oopses.
- Fix one more NFSv4 state recovery deadlock
- Don't loop forever when LAYOUTGET returns NFS4ERR_LAYOUTTRYLATER"
* tag 'nfs-for-3.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
SUNRPC: One line comment fix
NFSv4.1: LAYOUTGET EDELAY loops timeout to the MDS
SUNRPC: add call to get configured timeout
PNFS: set the default DS timeout to 60 seconds
NFSv4: Fix another open/open_recovery deadlock
nfs: don't allow nfs_find_actor to match inodes of the wrong type
NFSv4.1: Hold reference to layout hdr in layoutget
pnfs: fix resend_to_mds for directio
SUNRPC: Don't start the retransmission timer when out of socket space
NFS: Don't allow NFS silly-renamed files to be deleted, no signal
Diffstat (limited to 'fs/nfs/pnfs.c')
| -rw-r--r-- | fs/nfs/pnfs.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 6be70f622b62..48ac5aad6258 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c | |||
| @@ -1181,7 +1181,7 @@ pnfs_update_layout(struct inode *ino, | |||
| 1181 | struct nfs_client *clp = server->nfs_client; | 1181 | struct nfs_client *clp = server->nfs_client; |
| 1182 | struct pnfs_layout_hdr *lo; | 1182 | struct pnfs_layout_hdr *lo; |
| 1183 | struct pnfs_layout_segment *lseg = NULL; | 1183 | struct pnfs_layout_segment *lseg = NULL; |
| 1184 | bool first = false; | 1184 | bool first; |
| 1185 | 1185 | ||
| 1186 | if (!pnfs_enabled_sb(NFS_SERVER(ino))) | 1186 | if (!pnfs_enabled_sb(NFS_SERVER(ino))) |
| 1187 | goto out; | 1187 | goto out; |
| @@ -1215,10 +1215,9 @@ pnfs_update_layout(struct inode *ino, | |||
| 1215 | goto out_unlock; | 1215 | goto out_unlock; |
| 1216 | atomic_inc(&lo->plh_outstanding); | 1216 | atomic_inc(&lo->plh_outstanding); |
| 1217 | 1217 | ||
| 1218 | if (list_empty(&lo->plh_segs)) | 1218 | first = list_empty(&lo->plh_layouts) ? true : false; |
| 1219 | first = true; | ||
| 1220 | |||
| 1221 | spin_unlock(&ino->i_lock); | 1219 | spin_unlock(&ino->i_lock); |
| 1220 | |||
| 1222 | if (first) { | 1221 | if (first) { |
| 1223 | /* The lo must be on the clp list if there is any | 1222 | /* The lo must be on the clp list if there is any |
| 1224 | * chance of a CB_LAYOUTRECALL(FILE) coming in. | 1223 | * chance of a CB_LAYOUTRECALL(FILE) coming in. |
| @@ -1422,13 +1421,15 @@ EXPORT_SYMBOL_GPL(pnfs_generic_pg_test); | |||
| 1422 | 1421 | ||
| 1423 | int pnfs_write_done_resend_to_mds(struct inode *inode, | 1422 | int pnfs_write_done_resend_to_mds(struct inode *inode, |
| 1424 | struct list_head *head, | 1423 | struct list_head *head, |
| 1425 | const struct nfs_pgio_completion_ops *compl_ops) | 1424 | const struct nfs_pgio_completion_ops *compl_ops, |
| 1425 | struct nfs_direct_req *dreq) | ||
| 1426 | { | 1426 | { |
| 1427 | struct nfs_pageio_descriptor pgio; | 1427 | struct nfs_pageio_descriptor pgio; |
| 1428 | LIST_HEAD(failed); | 1428 | LIST_HEAD(failed); |
| 1429 | 1429 | ||
| 1430 | /* Resend all requests through the MDS */ | 1430 | /* Resend all requests through the MDS */ |
| 1431 | nfs_pageio_init_write(&pgio, inode, FLUSH_STABLE, compl_ops); | 1431 | nfs_pageio_init_write(&pgio, inode, FLUSH_STABLE, compl_ops); |
| 1432 | pgio.pg_dreq = dreq; | ||
| 1432 | while (!list_empty(head)) { | 1433 | while (!list_empty(head)) { |
| 1433 | struct nfs_page *req = nfs_list_entry(head->next); | 1434 | struct nfs_page *req = nfs_list_entry(head->next); |
| 1434 | 1435 | ||
| @@ -1463,7 +1464,8 @@ static void pnfs_ld_handle_write_error(struct nfs_write_data *data) | |||
| 1463 | if (!test_and_set_bit(NFS_IOHDR_REDO, &hdr->flags)) | 1464 | if (!test_and_set_bit(NFS_IOHDR_REDO, &hdr->flags)) |
| 1464 | data->task.tk_status = pnfs_write_done_resend_to_mds(hdr->inode, | 1465 | data->task.tk_status = pnfs_write_done_resend_to_mds(hdr->inode, |
| 1465 | &hdr->pages, | 1466 | &hdr->pages, |
| 1466 | hdr->completion_ops); | 1467 | hdr->completion_ops, |
| 1468 | hdr->dreq); | ||
| 1467 | } | 1469 | } |
| 1468 | 1470 | ||
| 1469 | /* | 1471 | /* |
| @@ -1578,13 +1580,15 @@ EXPORT_SYMBOL_GPL(pnfs_generic_pg_writepages); | |||
| 1578 | 1580 | ||
| 1579 | int pnfs_read_done_resend_to_mds(struct inode *inode, | 1581 | int pnfs_read_done_resend_to_mds(struct inode *inode, |
| 1580 | struct list_head *head, | 1582 | struct list_head *head, |
| 1581 | const struct nfs_pgio_completion_ops *compl_ops) | 1583 | const struct nfs_pgio_completion_ops *compl_ops, |
| 1584 | struct nfs_direct_req *dreq) | ||
| 1582 | { | 1585 | { |
| 1583 | struct nfs_pageio_descriptor pgio; | 1586 | struct nfs_pageio_descriptor pgio; |
| 1584 | LIST_HEAD(failed); | 1587 | LIST_HEAD(failed); |
| 1585 | 1588 | ||
| 1586 | /* Resend all requests through the MDS */ | 1589 | /* Resend all requests through the MDS */ |
| 1587 | nfs_pageio_init_read(&pgio, inode, compl_ops); | 1590 | nfs_pageio_init_read(&pgio, inode, compl_ops); |
| 1591 | pgio.pg_dreq = dreq; | ||
| 1588 | while (!list_empty(head)) { | 1592 | while (!list_empty(head)) { |
| 1589 | struct nfs_page *req = nfs_list_entry(head->next); | 1593 | struct nfs_page *req = nfs_list_entry(head->next); |
| 1590 | 1594 | ||
| @@ -1615,7 +1619,8 @@ static void pnfs_ld_handle_read_error(struct nfs_read_data *data) | |||
| 1615 | if (!test_and_set_bit(NFS_IOHDR_REDO, &hdr->flags)) | 1619 | if (!test_and_set_bit(NFS_IOHDR_REDO, &hdr->flags)) |
| 1616 | data->task.tk_status = pnfs_read_done_resend_to_mds(hdr->inode, | 1620 | data->task.tk_status = pnfs_read_done_resend_to_mds(hdr->inode, |
| 1617 | &hdr->pages, | 1621 | &hdr->pages, |
| 1618 | hdr->completion_ops); | 1622 | hdr->completion_ops, |
| 1623 | hdr->dreq); | ||
| 1619 | } | 1624 | } |
| 1620 | 1625 | ||
| 1621 | /* | 1626 | /* |
