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 299222 Details for
Bug 438723
32bit NFS server returns -EIO for readdirplus request when backing file system has 32bit inodes
[?]
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]
Proposed patch
438723.rhel-4 (text/plain), 6.48 KB, created by
Peter Staubach
on 2008-03-26 20:10:47 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Peter Staubach
Created:
2008-03-26 20:10:47 UTC
Size:
6.48 KB
patch
obsolete
>--- linux-2.6.9/include/linux/nfsd/nfsd.h.org >+++ linux-2.6.9/include/linux/nfsd/nfsd.h >@@ -55,6 +55,8 @@ struct readdir_cd { > }; > typedef int (*encode_dent_fn)(struct readdir_cd *, const char *, > int, loff_t, u64, unsigned int); >+typedef int (*encode_dent_fn32)(struct readdir_cd *, const char *, >+ int, loff_t, u32, unsigned int); > typedef int (*nfsd_dirop_t)(struct inode *, struct dentry *, int, int); > > extern struct svc_program nfsd_program; >@@ -118,7 +120,8 @@ int nfsd_unlink(struct svc_rqst *, stru > int nfsd_truncate(struct svc_rqst *, struct svc_fh *, > unsigned long size); > int nfsd_readdir(struct svc_rqst *, struct svc_fh *, >- loff_t *, struct readdir_cd *, encode_dent_fn); >+ loff_t *, struct readdir_cd *, >+ encode_dent_fn, encode_dent_fn32); > int nfsd_statfs(struct svc_rqst *, struct svc_fh *, > struct kstatfs *); > >--- linux-2.6.9/include/linux/nfsd/xdr3.h.org >+++ linux-2.6.9/include/linux/nfsd/xdr3.h >@@ -335,9 +335,15 @@ int nfs3svc_release_fhandle2(struct svc_ > int nfs3svc_encode_entry(struct readdir_cd *, const char *name, > int namlen, loff_t offset, u64 ino, > unsigned int); >+int nfs3svc_encode_entry32(struct readdir_cd *, const char *name, >+ int namlen, loff_t offset, u32 ino, >+ unsigned int); > int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name, > int namlen, loff_t offset, u64 ino, > unsigned int); >+int nfs3svc_encode_entry_plus32(struct readdir_cd *, const char *name, >+ int namlen, loff_t offset, u32 ino, >+ unsigned int); > /* Helper functions for NFSv3 ACL code */ > u32 *nfs3svc_encode_post_op_attr(struct svc_rqst *rqstp, u32 *p, > struct svc_fh *fhp); >--- linux-2.6.9/include/linux/nfsd/xdr.h.org >+++ linux-2.6.9/include/linux/nfsd/xdr.h >@@ -166,6 +166,8 @@ int nfssvc_encode_readdirres(struct svc_ > > int nfssvc_encode_entry(struct readdir_cd *, const char *name, > int namlen, loff_t offset, u64 ino, unsigned int); >+int nfssvc_encode_entry32(struct readdir_cd *, const char *name, >+ int namlen, loff_t offset, u32 ino, unsigned int); > > int nfssvc_release_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *); > >--- linux-2.6.9/fs/nfsd/nfs3proc.c.org >+++ linux-2.6.9/fs/nfsd/nfs3proc.c >@@ -438,7 +438,7 @@ nfsd3_proc_readdir(struct svc_rqst *rqst > resp->buffer = argp->buffer; > resp->rqstp = rqstp; > nfserr = nfsd_readdir(rqstp, &resp->fh, (loff_t*) &argp->cookie, >- &resp->common, nfs3svc_encode_entry); >+ &resp->common, nfs3svc_encode_entry, nfs3svc_encode_entry32); > memcpy(resp->verf, argp->verf, 8); > resp->count = resp->buffer - argp->buffer; > if (resp->offset) >@@ -479,7 +479,8 @@ nfsd3_proc_readdirplus(struct svc_rqst * > nfserr = nfsd_readdir(rqstp, &resp->fh, > &offset, > &resp->common, >- nfs3svc_encode_entry_plus); >+ nfs3svc_encode_entry_plus, >+ nfs3svc_encode_entry_plus32); > memcpy(resp->verf, argp->verf, 8); > for (i=1; i<rqstp->rq_resused ; i++) { > page_addr = page_address(rqstp->rq_respages[i]); >--- linux-2.6.9/fs/nfsd/nfs4xdr.c.org >+++ linux-2.6.9/fs/nfsd/nfs4xdr.c >@@ -1896,6 +1896,13 @@ nospc: > return -EINVAL; > } > >+static int >+nfsd4_encode_dirent32(struct readdir_cd *ccd, const char *name, int namlen, >+ loff_t offset, u32 ino, unsigned int d_type) >+{ >+ return nfsd4_encode_dirent(ccd, name, namlen, offset, (u64) ino, d_type); >+} >+ > static void > nfsd4_encode_access(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_access *access) > { >@@ -2324,8 +2331,8 @@ nfsd4_encode_readdir(struct nfsd4_compou > > offset = readdir->rd_cookie; > nfserr = nfsd_readdir(readdir->rd_rqstp, readdir->rd_fhp, >- &offset, >- &readdir->common, nfsd4_encode_dirent); >+ &offset, &readdir->common, >+ nfsd4_encode_dirent, nfsd4_encode_dirent32); > if (nfserr == nfs_ok && > readdir->common.err == nfserr_toosmall && > readdir->buffer == page) >--- linux-2.6.9/fs/nfsd/nfsproc.c.org >+++ linux-2.6.9/fs/nfsd/nfsproc.c >@@ -472,8 +472,8 @@ nfsd_proc_readdir(struct svc_rqst *rqstp > resp->common.err = nfs_ok; > /* Read directory and encode entries on the fly */ > offset = argp->cookie; >- nfserr = nfsd_readdir(rqstp, &argp->fh, &offset, >- &resp->common, nfssvc_encode_entry); >+ nfserr = nfsd_readdir(rqstp, &argp->fh, &offset, &resp->common, >+ nfssvc_encode_entry, nfssvc_encode_entry32); > > resp->count = resp->buffer - argp->buffer; > if (resp->offset) >--- linux-2.6.9/fs/nfsd/vfs.c.org >+++ linux-2.6.9/fs/nfsd/vfs.c >@@ -1642,9 +1642,11 @@ out_nfserr: > * Read entries from a directory. > * The NFSv3/4 verifier we ignore for now. > */ >+/* ARGSUSED */ > int > nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp, >- struct readdir_cd *cdp, encode_dent_fn func) >+ struct readdir_cd *cdp, >+ encode_dent_fn func, encode_dent_fn32 func32) > { > int err; > struct file *file; >@@ -1670,6 +1672,8 @@ nfsd_readdir(struct svc_rqst *rqstp, str > cdp->err = nfserr_eof; /* will be cleared on successful read */ > #if BITS_PER_LONG < 64 > err = vfs_readdir64(file, (filldir64_t) func, cdp); >+ if (err == -ENOSYS) >+ err = vfs_readdir(file, (filldir_t) func32, cdp); > #else > err = vfs_readdir(file, (filldir_t) func, cdp); > #endif >--- linux-2.6.9/fs/nfsd/nfs3xdr.c.org >+++ linux-2.6.9/fs/nfsd/nfs3xdr.c >@@ -1041,6 +1041,13 @@ nfs3svc_encode_entry(struct readdir_cd * > } > > int >+nfs3svc_encode_entry32(struct readdir_cd *cd, const char *name, >+ int namlen, loff_t offset, u32 ino, unsigned int d_type) >+{ >+ return encode_entry(cd, name, namlen, offset, (u64) ino, d_type, 0); >+} >+ >+int > nfs3svc_encode_entry_plus(struct readdir_cd *cd, const char *name, > int namlen, loff_t offset, u64 ino, > unsigned int d_type) >@@ -1048,6 +1055,14 @@ nfs3svc_encode_entry_plus(struct readdir > return encode_entry(cd, name, namlen, offset, ino, d_type, 1); > } > >+int >+nfs3svc_encode_entry_plus32(struct readdir_cd *cd, const char *name, >+ int namlen, loff_t offset, u32 ino, >+ unsigned int d_type) >+{ >+ return encode_entry(cd, name, namlen, offset, (u64) ino, d_type, 1); >+} >+ > /* FSSTAT */ > int > nfs3svc_encode_fsstatres(struct svc_rqst *rqstp, u32 *p, >--- linux-2.6.9/fs/nfsd/nfsxdr.c.org >+++ linux-2.6.9/fs/nfsd/nfsxdr.c >@@ -490,6 +490,13 @@ nfssvc_encode_statfsres(struct svc_rqst > } > > int >+nfssvc_encode_entry32(struct readdir_cd *ccd, const char *name, >+ int namlen, loff_t offset, u32 ino, unsigned int d_type) >+{ >+ return nfssvc_encode_entry(ccd, name, namlen, offset, (u64) ino, d_type); >+} >+ >+int > nfssvc_encode_entry(struct readdir_cd *ccd, const char *name, > int namlen, loff_t offset, u64 ino, unsigned int d_type) > {
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 438723
: 299222