[fedfs-utils] [PATCH fedfs-utils] libnsdb: Cannot resolve FSN if the pathname is "/"

Ditang Chen chendt.fnst at cn.fujitsu.com
Mon Jun 9 02:51:10 PDT 2014


I tested in Fedora20, when junction type is nfs-fedfs, the nfsref
cannot resolve FSN if the export path is "/".

# nfsref -d --type=nfs-fedfs add /.domainroot/example.net/s2 server2.example.net /
...
nfsref: nsdb_normalize_path: result = '/'
nfsref: nsdb_count_components: length = 4, count = 0, path = '/'
nfsref: nsdb_alloc_zero_component_pathname: Zero-component pathname
nfsref: nsdb_construct_nfsuri: NFS URI: nfs://Server2.example.net/
...

# nfsref -d lookup s2/
..
nfsref: nsdb_parse_nfs_uri: parsing 'nfs://server2.example.net/'
nfsref: nsdb_uri_pathname_to_path_array: NFS URI has short pathname component
nfsref: nsdb_resolve_fsn_parse_entry: parsing failed: FEDFS_ERR_BADNAME
nfsref: nfsref_lookup_resolve_fsn: Failed to resolve FSN 5f4bace9-14b3-4626-8d39-4b0624c18a22: FEDFS_ERR_ACCESS
...

Signed-off-by: chendt.fnst at cn.fujitsu.com
---
 src/libnsdb/path.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libnsdb/path.c b/src/libnsdb/path.c
index c58dc89..e269afc 100644
--- a/src/libnsdb/path.c
+++ b/src/libnsdb/path.c
@@ -630,7 +630,7 @@ nsdb_path_array_to_uri_pathname(char * const *path_array, UriUriA *uri)
 	char *component;
 	unsigned int i;
 
-	pos = nsdb_new_uri_path_segment("");
+	pos = nsdb_new_uri_path_segment("/");
 	if (pos == NULL)
 		return FEDFS_ERR_SVRFAULT;
 	result = pos;
-- 
1.8.4.2




More information about the fedfs-utils-devel mailing list