Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 919888 Details for
Bug 1118311
After enabling nfs.mount-udp mounting server:/volume/subdir fails
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix
fix_bz1118311.patch (text/plain), 3.48 KB, created by
santosh pradhan
on 2014-07-22 11:24:29 UTC
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
santosh pradhan
Created:
2014-07-22 11:24:29 UTC
Size:
3.48 KB
patch
obsolete
>diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c >index 8d3e4a9..89ad25f 100644 >--- a/xlators/nfs/server/src/mount3.c >+++ b/xlators/nfs/server/src/mount3.c >@@ -31,6 +31,7 @@ > #include "nfs.h" > #include "common-utils.h" > #include "store.h" >+#include "syncop.h" > > #include <errno.h> > #include <sys/socket.h> >@@ -1999,27 +2000,66 @@ rpcsvc_program_t mnt3prog; > */ > > struct nfs3_fh * >-nfs3_rootfh (char* path) >+nfs3_rootfh (const char *path) > { > struct mount3_state *ms = NULL; > struct nfs3_fh *fh = NULL; > struct mnt3_export *exp = NULL; > inode_t *inode = NULL; >- char *tmp = NULL; >+ inode_t *lnkinode = NULL; >+ char *rpath = NULL; >+ char *volname; >+ gf_boolean_t subdir_mnt = _gf_false; >+ loc_t loc = {0, }; >+ struct iatt buf = {0, }; >+ int ret = -1; >+ >+ volname = gf_strdup (path); >+ if (volname == NULL) /* ENOMEM */ >+ goto err; >+ >+ rpath = strchr (volname, '/'); >+ if (rpath == NULL) { >+ rpath = "/"; >+ } else { >+ *rpath = '\0'; >+ rpath ++; >+ if (strlen (rpath)) >+ subdir_mnt = _gf_true; >+ } > > ms = mnt3prog.private; >- exp = mnt3_mntpath_to_export (ms, path); >+ exp = mnt3_mntpath_to_export (ms, volname); > if (exp == NULL) > goto err; > >- tmp = (char *)path; >- tmp = strchr (tmp, '/'); >- if (tmp == NULL) >- tmp = "/"; >+ switch (subdir_mnt) { >+ >+ case _gf_false: >+ inode = inode_from_path (exp->vol->itable, rpath); >+ if (inode == NULL) >+ goto err; >+ break; > >- inode = inode_from_path (exp->vol->itable, tmp); >- if (inode == NULL) >+ case _gf_true: >+ loc.parent = inode_ref (exp->vol->itable->root); >+ loc.inode = inode_new (exp->vol->itable); >+ loc.name = rpath; >+ ret = syncop_lookup (exp->vol, &loc, NULL, &buf, NULL, NULL); >+ if (ret) { >+ loc_wipe (&loc); >+ goto err; >+ } >+ lnkinode = inode_link (loc.inode, NULL, NULL, &buf); >+ inode_unref (loc.inode); >+ loc.inode = lnkinode; >+ inode = inode_ref (loc.inode); >+ loc_wipe (&loc); >+ break; >+ >+ default: > goto err; >+ } > > fh = GF_CALLOC (1, sizeof(*fh), gf_nfs_mt_nfs3_fh); > if (fh == NULL) >@@ -2029,6 +2069,8 @@ nfs3_rootfh (char* path) > err: > if (inode) > inode_unref (inode); >+ if (volname) >+ GF_FREE (volname); > return fh; > } > >diff --git a/xlators/nfs/server/src/mount3udp_svc.c b/xlators/nfs/server/src/mount3udp_svc.c >index 70aead6..a032408 100644 >--- a/xlators/nfs/server/src/mount3udp_svc.c >+++ b/xlators/nfs/server/src/mount3udp_svc.c >@@ -23,7 +23,7 @@ > #include <netinet/in.h> > > >-extern struct nfs3_fh* nfs3_rootfh (char *dp); >+extern struct nfs3_fh* nfs3_rootfh (const char *dp); > extern mountres3 mnt3svc_set_mountres3 (mountstat3 stat, struct nfs3_fh *fh, > int *authflavor, u_int aflen); > extern int
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1118311
: 919888