nfsroot: make nfsroot to accept the 1024 bytes long directory name
Subsystems (2)
PATCH 1/1 nfsroot: make nfsroot to accept the 1024 bytes long directory name
From: Li RongQing <[email protected]>
although NFS_MAXPATHLEN is defined to 1024, nfs client hopes to accept a 1024 byte path, but nfs_root_parms is limited to 256, and the nfs path will truncated when a user inputs nfs path from kernel cmdline
enlarge nfs_root_parms to 1024, to make it accept the 1024 bytes long directory name, since nfs_root_parms is defined as _initdata, it will be released after system bootup
--- fs/nfs/nfsroot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/nfsroot.c +1 -1
@@ -90,7 +90,7 @@#define NFS_DEF_OPTIONS "vers=2,udp,rsize=4096,wsize=4096"/* Parameters passed from the kernel command line */ -static char nfs_root_parms[256 ]__initdata ="" ; +static char nfs_root_parms[NFS_MAXPATHLEN +1 ]__initdata ="" ;/* Text-based mount options passed to super.c */ static char nfs_root_options[256 ]__initdata =NFS_DEF_OPTIONS ;
Signature · 1 line
2.1.4
Quoted 7 lines · On Thu, Sep 24, 2015 at 10:19 AM, <[email protected]> wrote:
although
NFS_MAXPATHLENis defined to 1024, nfs client hopes to accept a 1024 byte path, butnfs_root_parmsis limited to 256, and the nfs path will truncated when a user inputs nfs path from kernel cmdlineenlarge
nfs_root_parmsto 1024, to make it accept the 1024 bytes long directory name, sincenfs_root_parmsis defined as_initdata, it will be released after system bootup
ping
-R