mount: Writes signal number to kernel as command line
Subsystems (2)
PATCH 1/1 mount: Writes signal number to kernel as command line
When mounting nfs with -overs=4,minorversion=2, want getting nfs mounts with vers=4.2, but got vers=4.0 as,
# mount -t nfs -onfsvers=4,minorversion=2 127.0.0.1:/ /mnt/ # cat /proc/mounts | grep vers 127.0.0.1:/ /mnt nfs4 rw,relatime,vers=4.0,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=127.0.0.1,local_lock=none,addr=127.0.0.1 0 0
It's caused by mount.nfs writing bad vers to kernel. This patch lets mount.nfs writing signal number to kernel as command line.
Note: This patch is based on my last patch, "mount: make sure mounting nfs with v4,vers=4 and nfsvers=4"
--- utils/mount/stropts.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
utils/mount/stropts.c +7 -2
@@ -737,8 +737,13 @@ static int nfs_do_mount_v4(struct nfsmount_info *mi, }if (mi->version.v_mode !=V_SPECIFIC ) { -snprintf (version_opt,sizeof (version_opt) -1 , -"vers=%lu.%lu" , mi->version.major, mi->version.minor); +if (mi->version.v_mode ==V_GENERAL ) +snprintf (version_opt,sizeof (version_opt) -1 , +"vers=%lu" , mi->version.major); +else +snprintf (version_opt,sizeof (version_opt) -1 , +"vers=%lu.%lu" , mi->version.major, + mi->version.minor);if (po_append (options, version_opt) ==PO_FAILED ) { errno =EINVAL ;
Signature · 1 line
2.3.5
Quoted 7 lines · Kinglong Mee
When mounting nfs with -overs=4,minorversion=2, want getting nfs mounts with vers=4.2, but got vers=4.0 as,
# mount -t nfs -onfsvers=4,minorversion=2 127.0.0.1:/ /mnt/ # cat /proc/mounts | grep vers 127.0.0.1:/ /mnt nfs4 rw,relatime,vers=4.0,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=127.0.0.1,local_lock=none,addr=127.0.0.1 0 0
Quoted 7 lines
It's caused by mount.nfs writing bad vers to kernel. This patch lets mount.nfs writing signal number to kernel as command line.
Note: This patch is based on my last patch, "mount: make sure mounting nfs with v4,vers=4 and nfsvers=4"
Signed-off-by Kinglong Mee <[email protected]>
Looks good.
Quoted 32 lines
--- utils/mount/stropts.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)utils/mount/stropts.c +7
-3@@ -737,8 +737,13 @@ static int nfs_do_mount_v4(struct nfsmount_info *mi, }if (mi->version.v_mode !=V_SPECIFIC ) { -snprintf (version_opt,sizeof (version_opt) -1 , -"vers=%lu.%lu" , mi->version.major, mi->version.minor); +if (mi->version.v_mode ==V_GENERAL ) +snprintf (version_opt,sizeof (version_opt) -1 , +"vers=%lu" , mi->version.major); +else +snprintf (version_opt,sizeof (version_opt) -1 , +"vers=%lu.%lu" , mi->version.major, + mi->version.minor);if (po_append (options, version_opt) ==PO_FAILED ) { errno =EINVAL ; --2.3.5
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Benjamin Coddington
Quoted 10 lines · Kinglong Mee
When mounting nfs with -overs=4,minorversion=2, want getting nfs mounts with vers=4.2, but got vers=4.0 as,
# mount -t nfs -onfsvers=4,minorversion=2 127.0.0.1:/ /mnt/ # cat /proc/mounts | grep vers 127.0.0.1:/ /mnt nfs4 rw,relatime,vers=4.0,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=127.0.0.1,local_lock=none,addr=127.0.0.1 0 0It's caused by mount.nfs writing bad vers to kernel. This patch lets mount.nfs writing signal number to kernel as command line.
Quoted 8 lines
Quoted 4 lines
Note: This patch is based on my last patch, "mount: make sure mounting nfs with v4,vers=4 and nfsvers=4"
Signed-off-by Kinglong Mee <[email protected]>Looks good.
Reviewed-by Benjamin Coddington <[email protected]>
Add this one?
thanks,
Kinglong Mee
Quoted 33 lines
Quoted 32 lines
--- utils/mount/stropts.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)utils/mount/stropts.c +7
-3@@ -737,8 +737,13 @@ static int nfs_do_mount_v4(struct nfsmount_info *mi, }if (mi->version.v_mode !=V_SPECIFIC ) { -snprintf (version_opt,sizeof (version_opt) -1 , -"vers=%lu.%lu" , mi->version.major, mi->version.minor); +if (mi->version.v_mode ==V_GENERAL ) +snprintf (version_opt,sizeof (version_opt) -1 , +"vers=%lu" , mi->version.major); +else +snprintf (version_opt,sizeof (version_opt) -1 , +"vers=%lu.%lu" , mi->version.major, + mi->version.minor);if (po_append (options, version_opt) ==PO_FAILED ) { errno =EINVAL ; --2.3.5
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Kinglong Mee
When mounting nfs with -overs=4,minorversion=2, want getting nfs mounts with vers=4.2, but got vers=4.0 as,
# mount -t nfs -onfsvers=4,minorversion=2 127.0.0.1:/ /mnt/ # cat /proc/mounts | grep vers 127.0.0.1:/ /mnt nfs4 rw,relatime,vers=4.0,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=127.0.0.1,local_lock=none,addr=127.0.0.1 0 0
Quoted 7 lines
It's caused by mount.nfs writing bad vers to kernel. This patch lets mount.nfs writing signal number to kernel as command line.
Note: This patch is based on my last patch, "mount: make sure mounting nfs with v4,vers=4 and nfsvers=4"
Signed-off-by Kinglong Mee <[email protected]>
Committed...
steved.
Quoted 25 lines
--- utils/mount/stropts.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)utils/mount/stropts.c +7
-2@@ -737,8 +737,13 @@ static int nfs_do_mount_v4(struct nfsmount_info *mi, }if (mi->version.v_mode !=V_SPECIFIC ) { -snprintf (version_opt,sizeof (version_opt) -1 , -"vers=%lu.%lu" , mi->version.major, mi->version.minor); +if (mi->version.v_mode ==V_GENERAL ) +snprintf (version_opt,sizeof (version_opt) -1 , +"vers=%lu" , mi->version.major); +else +snprintf (version_opt,sizeof (version_opt) -1 , +"vers=%lu.%lu" , mi->version.major, + mi->version.minor);if (po_append (options, version_opt) ==PO_FAILED ) { errno =EINVAL ;