diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-08-19 18:12:27 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-08-19 18:22:15 -0400 |
commit | e571cbf1a4f8d8b6cfd4898df718dae84c75a8e1 (patch) | |
tree | 0fc9da9692a1e63cff03053fc87cc807fab5e266 /fs/nfs/inode.c | |
parent | 96c61cbd0f30496bfa57ed80f7131a57aea3e4de (diff) |
NFS: Add a dns resolver for use with NFSv4 referrals and migration
The NFSv4 and NFSv4.1 protocols both allow for the redirection of a client
from one server to another in order to support filesystem migration and
replication. For full protocol support, we need to add the ability to
convert a DNS host name into an IP address that we can feed to the RPC
client.
We'll reuse the sunrpc cache, now that it has been converted to work with
rpc_pipefs.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index fe5a8b45d867..060022b4651c 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include "iostat.h" | 46 | #include "iostat.h" |
47 | #include "internal.h" | 47 | #include "internal.h" |
48 | #include "fscache.h" | 48 | #include "fscache.h" |
49 | #include "dns_resolve.h" | ||
49 | 50 | ||
50 | #define NFSDBG_FACILITY NFSDBG_VFS | 51 | #define NFSDBG_FACILITY NFSDBG_VFS |
51 | 52 | ||
@@ -1506,6 +1507,10 @@ static int __init init_nfs_fs(void) | |||
1506 | { | 1507 | { |
1507 | int err; | 1508 | int err; |
1508 | 1509 | ||
1510 | err = nfs_dns_resolver_init(); | ||
1511 | if (err < 0) | ||
1512 | goto out8; | ||
1513 | |||
1509 | err = nfs_fscache_register(); | 1514 | err = nfs_fscache_register(); |
1510 | if (err < 0) | 1515 | if (err < 0) |
1511 | goto out7; | 1516 | goto out7; |
@@ -1564,6 +1569,8 @@ out5: | |||
1564 | out6: | 1569 | out6: |
1565 | nfs_fscache_unregister(); | 1570 | nfs_fscache_unregister(); |
1566 | out7: | 1571 | out7: |
1572 | nfs_dns_resolver_destroy(); | ||
1573 | out8: | ||
1567 | return err; | 1574 | return err; |
1568 | } | 1575 | } |
1569 | 1576 | ||
@@ -1575,6 +1582,7 @@ static void __exit exit_nfs_fs(void) | |||
1575 | nfs_destroy_inodecache(); | 1582 | nfs_destroy_inodecache(); |
1576 | nfs_destroy_nfspagecache(); | 1583 | nfs_destroy_nfspagecache(); |
1577 | nfs_fscache_unregister(); | 1584 | nfs_fscache_unregister(); |
1585 | nfs_dns_resolver_destroy(); | ||
1578 | #ifdef CONFIG_PROC_FS | 1586 | #ifdef CONFIG_PROC_FS |
1579 | rpc_proc_unregister("nfs"); | 1587 | rpc_proc_unregister("nfs"); |
1580 | #endif | 1588 | #endif |