All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfsroot: make nfsroot to accept the 1024 bytes long directory name
@ 2015-09-24  2:19 roy.qing.li
  2015-10-15  9:17 ` Li RongQing
  0 siblings, 1 reply; 2+ messages in thread
From: roy.qing.li @ 2015-09-24  2:19 UTC (permalink / raw)
  To: linux-nfs

From: Li RongQing <roy.qing.li@gmail.com>

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

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
 fs/nfs/nfsroot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c
index 9bc9f04..89a15db 100644
--- a/fs/nfs/nfsroot.c
+++ b/fs/nfs/nfsroot.c
@@ -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;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nfsroot: make nfsroot to accept the 1024 bytes long directory name
  2015-09-24  2:19 [PATCH] nfsroot: make nfsroot to accept the 1024 bytes long directory name roy.qing.li
@ 2015-10-15  9:17 ` Li RongQing
  0 siblings, 0 replies; 2+ messages in thread
From: Li RongQing @ 2015-10-15  9:17 UTC (permalink / raw)
  To: linux-nfs

On Thu, Sep 24, 2015 at 10:19 AM,  <roy.qing.li@gmail.com> wrote:
> 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




ping

-R

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-15  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-24  2:19 [PATCH] nfsroot: make nfsroot to accept the 1024 bytes long directory name roy.qing.li
2015-10-15  9:17 ` Li RongQing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.