From: Johannes Kirchmair - SKIDATA <Johannes.Kirchmair@skidata.com>
To: "u-boot@lists.denx.de" <u-boot@lists.denx.de>
Cc: "joe.hershberger@ni.com" <joe.hershberger@ni.com>,
"rfried.dev@gmail.com" <rfried.dev@gmail.com>
Subject: [NFS] fetching kernel via nfs
Date: Wed, 15 May 2024 12:40:04 +0000 [thread overview]
Message-ID: <GVAP278MB045609BECD802008B0FEBD2C8CEC2@GVAP278MB0456.CHEP278.PROD.OUTLOOK.COM> (raw)
Dear u-boot people,
I encountered some problems trying to fetch the Linux kernel via nfs (v3).
One problem was that the nfs file lookup always returned NFS3ERR_BADHANDLE.
This is due to the following line in nfs_lookup_req() function (net/nfs.c):
len = (uint32_t *)p - (uint32_t *)&(data[0]);
rpc_req(PROG_NFS, NFS_LOOKUP, data, len);
} else { /* NFS_V3 */
*p++ = htonl(NFS_FHSIZE); /* Dir handle length */ <===== this line
memcpy(p, dirfh, NFS_FHSIZE);
p += (NFS_FHSIZE / 4);
*p++ = htonl(fnamelen);
In the NFS_V3 case we add the dir file handle size to data and then the dir file handle.
IUC, this is not correct here because dirfh includes already the size of the handle in the first 4 bytes.
Feel free to correct me if I am wrong.
As a result, if I remove the line "*p++ = htonl(NFS_FHSIZE);", it works fine.
Don't have an in deps understanding of nfs, so I am not sure if this is the root problem here.
Best regards Johannes
next reply other threads:[~2024-05-15 12:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 12:40 Johannes Kirchmair - SKIDATA [this message]
2024-05-15 16:53 ` [NFS] fetching kernel via nfs Sébastien Szymanski
2024-05-16 10:53 ` AW: " Johannes Kirchmair - SKIDATA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=GVAP278MB045609BECD802008B0FEBD2C8CEC2@GVAP278MB0456.CHEP278.PROD.OUTLOOK.COM \
--to=johannes.kirchmair@skidata.com \
--cc=joe.hershberger@ni.com \
--cc=rfried.dev@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).