The fedfsNfsMajorVer and fedfsNfsMinorVer attributes are no longer supported in the latest NSDB schema. We didn't use them anyway.
This is a non-backwards compatible change. After this patch, NFS basic junctions do not contain NFS major and minor version information. Resolving these junctions with fedfs-utils-0.8 will fail. Signed-off-by: Chuck Lever <[email protected]> --- doc/man/nsdb-resolve-fsn.8 | 4 -- src/include/junction.h | 1 - src/include/nsdb.h | 2 - src/libjunction/nfs.c | 68 ------------------------------------------ src/libnsdb/administrator.c | 8 ----- src/libnsdb/fileserver.c | 8 ----- src/nfsref/add.c | 4 -- src/nfsref/lookup.c | 4 -- src/nsdbc/nsdb-resolve-fsn.c | 2 - src/plug-ins/nfs-plugin.c | 2 - 10 files changed, 0 insertions(+), 103 deletions(-) diff --git a/doc/man/nsdb-resolve-fsn.8 b/doc/man/nsdb-resolve-fsn.8 index 92d316e..b3c99e9 100644 --- a/doc/man/nsdb-resolve-fsn.8 +++ b/doc/man/nsdb-resolve-fsn.8 @@ -266,10 +266,6 @@ dn: fedfsFslUuid=323c5068-7c11-11e0-8d38-000c297fd679, .sp NFS fli_rootpath: /path .br - NFS major version: 4 -.br - NFS minor version: 0 -.br NFS fls_currency: -1 .sp .RE diff --git a/src/include/junction.h b/src/include/junction.h index f0d041f..acd3e8b 100644 --- a/src/include/junction.h +++ b/src/include/junction.h @@ -70,7 +70,6 @@ struct nfs_fsloc { uint8_t nfl_readorder, nfl_writeorder; } nfl_info; - int32_t nfl_majorver, nfl_minorver; int32_t nfl_ttl; }; diff --git a/src/include/nsdb.h b/src/include/nsdb.h index f5b98b7..a9d113b 100644 --- a/src/include/nsdb.h +++ b/src/include/nsdb.h @@ -55,8 +55,6 @@ struct fedfs_secdata { */ struct fedfs_nfs_fsl { char **fn_nfspath; - int fn_majorver; - int fn_minorver; int fn_currency; _Bool fn_gen_writable; _Bool fn_gen_going; diff --git a/src/libjunction/nfs.c b/src/libjunction/nfs.c index b141392..8e65b75 100644 --- a/src/libjunction/nfs.c +++ b/src/libjunction/nfs.c @@ -356,35 +356,6 @@ nfs_location_path_xml(const char *pathname, xmlNodePtr parent, } /** - * Add a "version" child to a "location" element - * - * @param pathname NUL-terminated C string containing pathname of a junction - * @param parent parent element to which to add "host" child - * @param fsloc NFS location containing host information to add - * @return a FedFsStatus code - */ -static FedFsStatus -nfs_location_version_xml(const char *pathname, xmlNodePtr parent, - struct nfs_fsloc *fsloc) -{ - xmlNodePtr new; - - new = xmlNewTextChild(parent, NULL, NFS_XML_VERSION_TAG, NULL); - if (new == NULL) { - xlog(D_GENERAL, "%s: Failed to add version element for %s", - __func__, pathname); - return FEDFS_ERR_SVRFAULT; - } - - junction_xml_set_int_attribute(new, NFS_XML_VERSION_MAJOR_ATTR, - fsloc->nfl_majorver); - junction_xml_set_int_attribute(new, NFS_XML_VERSION_MINOR_ATTR, - fsloc->nfl_minorver); - - return FEDFS_OK; -} - -/** * Add a "currency" child to a "location" element * * @param pathname NUL-terminated C string containing pathname of a junction @@ -646,9 +617,6 @@ nfs_location_xml(const char *pathname, xmlNodePtr fileset, retval = nfs_location_path_xml(pathname, new, fsloc); if (retval != FEDFS_OK) return retval; - retval = nfs_location_version_xml(pathname, new, fsloc); - if (retval != FEDFS_OK) - return retval; retval = nfs_location_currency_xml(pathname, new, fsloc); if (retval != FEDFS_OK) return retval; @@ -1005,39 +973,6 @@ nfs_parse_location_path(const char *pathname, xmlNodePtr location, } /** - * Parse the first "version" child of "location" - * - * @param pathname NUL-terminated C string containing pathname of a junction - * @param location XML parse tree containing fileset location element - * @param fsloc a blank nfs_fsloc to fill in - * @return a FedFsStatus code - */ -static FedFsStatus -nfs_parse_location_version(const char *pathname, xmlNodePtr location, - struct nfs_fsloc *fsloc) -{ - xmlNodePtr node; - - node = junction_xml_find_child_by_name(location, NFS_XML_VERSION_TAG); - if (node == NULL) - goto out_err; - - if (!junction_xml_get_int_attribute(node, NFS_XML_VERSION_MAJOR_ATTR, - &fsloc->nfl_majorver)) - goto out_err; - if (!junction_xml_get_int_attribute(node, NFS_XML_VERSION_MINOR_ATTR, - &fsloc->nfl_minorver)) - goto out_err; - - return FEDFS_OK; - -out_err: - xlog(D_GENERAL, "%s: Missing or invalid version element in %s", - __func__, pathname); - return FEDFS_ERR_NOTJUNCT; -} - -/** * Parse the first "currency" child of "location" * * @param pathname NUL-terminated C string containing pathname of a junction @@ -1373,9 +1308,6 @@ nfs_parse_location_children(const char *pathname, xmlNodePtr location, retval = nfs_parse_location_path(pathname, location, fsloc); if (retval != FEDFS_OK) return retval; - retval = nfs_parse_location_version(pathname, location, fsloc); - if (retval != FEDFS_OK) - return retval; retval = nfs_parse_location_currency(pathname, location, fsloc); if (retval != FEDFS_OK) return retval; diff --git a/src/libnsdb/administrator.c b/src/libnsdb/administrator.c index 8dfa365..d8df76a 100644 --- a/src/libnsdb/administrator.c +++ b/src/libnsdb/administrator.c @@ -566,8 +566,6 @@ nsdb_create_nfs_fsl_entry_s(LDAP *ld, const char *nce, struct fedfs_fsl *fsl, * attributes would go here */ struct berval *xdrpathvals[2], xdr_path; - char *majversvals[2], majversbuf[12]; - char *minversvals[2], minversbuf[12]; char *currvals[2], currbuf[12]; char *flagwvals[2], *flaggvals[2], *flagsvals[2], *flagrvals[2], *varsubvals[2]; @@ -627,12 +625,6 @@ nsdb_create_nfs_fsl_entry_s(LDAP *ld, const char *nce, struct fedfs_fsl *fsl, attr[i].mod_type = "fedfsNfsPath"; attr[i++].mod_bvalues = xdrpathvals; - sprintf(majversbuf, "%d", nfsfsl->fn_majorver); - nsdb_init_add_attribute(attrs[i++], "fedfsNfsMajorVer", - majversvals, majversbuf); - sprintf(minversbuf, "%d", nfsfsl->fn_minorver); - nsdb_init_add_attribute(attrs[i++], "fedfsNfsMinorVer", - minversvals, minversbuf); sprintf(currbuf, "%d", nfsfsl->fn_currency); nsdb_init_add_attribute(attrs[i++], "fedfsNfsCurrency", currvals, currbuf); diff --git a/src/libnsdb/fileserver.c b/src/libnsdb/fileserver.c index 01bbe11..dcda3cc 100644 --- a/src/libnsdb/fileserver.c +++ b/src/libnsdb/fileserver.c @@ -114,8 +114,6 @@ nsdb_init_fedfs_nfs_fsl(struct fedfs_fsl *fsl) { struct fedfs_nfs_fsl *nfsfsl = &fsl->fl_u.fl_nfsfsl; - nfsfsl->fn_majorver = 4; - nfsfsl->fn_minorver = 0; nfsfsl->fn_currency = -1; nfsfsl->fn_gen_writable = false; nfsfsl->fn_gen_going = false; @@ -685,12 +683,6 @@ nsdb_resolve_fsn_parse_attribute(LDAP *ld, LDAPMessage *entry, char *attr, else if (strcasecmp(attr, "fedfsNfsPath") == 0) retval = nsdb_parse_singlevalue_xdrpath(attr, values, &nfsl->fn_nfspath); - else if (strcasecmp(attr, "fedfsNfsMajorVer") == 0) - retval = nsdb_parse_singlevalue_int(attr, values, - &nfsl->fn_majorver); - else if (strcasecmp(attr, "fedfsNfsMinorVer") == 0) - retval = nsdb_parse_singlevalue_int(attr, values, - &nfsl->fn_minorver); else if (strcasecmp(attr, "fedfsNfsCurrency") == 0) retval = nsdb_parse_singlevalue_int(attr, values, &nfsl->fn_currency); diff --git a/src/nfsref/add.c b/src/nfsref/add.c index deb894f..a23b1c4 100644 --- a/src/nfsref/add.c +++ b/src/nfsref/add.c @@ -74,8 +74,6 @@ nfsref_add_fsloc_defaults(struct nfs_fsloc *new) new->nfl_info.nfl_readorder = 0; new->nfl_info.nfl_writerank = 0; new->nfl_info.nfl_writeorder = 0; - new->nfl_majorver = 4; - new->nfl_minorver = 0; new->nfl_ttl = 300; } @@ -284,8 +282,6 @@ nfsref_add_nfs_fsl_defaults(const char *rootpath, struct fedfs_nfs_fsl *new) if (retval != FEDFS_OK) return retval; - new->fn_majorver = 4; - new->fn_minorver = 0; new->fn_currency = -1; new->fn_gen_writable = false; new->fn_gen_going = false; diff --git a/src/nfsref/lookup.c b/src/nfsref/lookup.c index 861a4d0..fcbce42 100644 --- a/src/nfsref/lookup.c +++ b/src/nfsref/lookup.c @@ -63,8 +63,6 @@ nfsref_lookup_display_nfs_location(struct nfs_fsloc *fsloc) printf("%s: - Invalid root path -\n", fsloc->nfl_hostname); printf("\n"); - printf("\tNFS Version:\t%d.%d\n", - fsloc->nfl_majorver, fsloc->nfl_minorver); printf("\tNFS port:\t%u\n", fsloc->nfl_hostport); printf("\tValid for:\t%d\n", fsloc->nfl_validfor); printf("\tCache TTL:\t%d\n", fsloc->nfl_ttl); @@ -178,8 +176,6 @@ nfsref_lookup_display_fedfs_nfs_fsl(struct fedfs_nfs_fsl *nfsl) } else printf("\tfedfsNfsPath:\t\t\tInvalid\n"); - printf("\tfedfsNfsMajorVer:\t\t%d\n", nfsl->fn_majorver); - printf("\tfedfsNfsMinorVer:\t\t%d\n", nfsl->fn_minorver); printf("\tfedfsNfsCurrency:\t\t%d\n", nfsl->fn_currency); printf("\tfedfsNfsGenFlagWritable:\t%s\n", nfsref_lookup_display_ldap_boolean(nfsl->fn_gen_writable)); diff --git a/src/nsdbc/nsdb-resolve-fsn.c b/src/nsdbc/nsdb-resolve-fsn.c index e2a29ac..f222742 100644 --- a/src/nsdbc/nsdb-resolve-fsn.c +++ b/src/nsdbc/nsdb-resolve-fsn.c @@ -116,8 +116,6 @@ nsdb_resolve_fsn_display_nfs_fsl(struct fedfs_nfs_fsl *nfsl) return; printf(" NFS fli_rootpath:\t\t%s\n", rootpath); free(rootpath); - printf(" NFS major version:\t\t%d\n", nfsl->fn_majorver); - printf(" NFS minor version:\t\t%d\n", nfsl->fn_minorver); printf(" NFS fls_currency:\t\t%d\n", nfsl->fn_currency); printf(" NFS FSLI4GF_WRITABLE:\t\t%s\n", _display_bool(nfsl->fn_gen_writable)); printf(" NFS FSLI4GF_GOING:\t\t%s\n", _display_bool(nfsl->fn_gen_going)); diff --git a/src/plug-ins/nfs-plugin.c b/src/plug-ins/nfs-plugin.c index ba7c2e0..fb6f4c5 100644 --- a/src/plug-ins/nfs-plugin.c +++ b/src/plug-ins/nfs-plugin.c @@ -279,8 +279,6 @@ nfs_jp_convert_fedfs_fsl(struct fedfs_fsl *fsl, struct nfs_fsloc **fsloc) new->nfl_info.nfl_writerank = nfs_fsl->fn_writerank; new->nfl_info.nfl_readorder = nfs_fsl->fn_readorder; new->nfl_info.nfl_writeorder = nfs_fsl->fn_writeorder; - new->nfl_majorver = nfs_fsl->fn_majorver; - new->nfl_minorver = nfs_fsl->fn_minorver; *fsloc = new; return JP_OK; _______________________________________________ fedfs-utils-devel mailing list [email protected] https://oss.oracle.com/mailman/listinfo/fedfs-utils-devel
