[PATCH]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 nfs4.0 server st_write: fix the amount of data sent in the testLargeData
    
    The maximum amount of data could be writen is NFSSVC_MAXBLKSIZE. The value of NFSSVC_MAXB
LKSIZE defined in the kernel is RPCSVC_MAXPLAYLOAD. If the value written exceeds NFSSVC_MAXBL
KSIZE, the value is fixed as the value of NFSSVC_MAXBLKSIZE. The value of RPCSVC_MAXPAYLOAD i
s 1*1024*1024u and "abcdefghijklmnopq"*0x10000 exceeds it. So the previous test is bound to f
ail and is meaningless.

    Signed-off-by: Lu Xinyu <luxy.fnst@xxxxxxxxxxxxxx>

diff --git a/nfs4.0/servertests/st_write.py b/nfs4.0/servertests/st_write.py
index 710452e..a7dae03 100644
--- a/nfs4.0/servertests/st_write.py
+++ b/nfs4.0/servertests/st_write.py
@@ -130,7 +130,7 @@ def testLargeData(t, env):
     c = env.c1
     c.init_connection()
     fh, stateid = c.create_confirm(t.code)
-    data = "abcdefghijklmnopq" * 0x10000
+    data = "a" * 1024 * 1024
     # Write the data
     pos = 0
     while pos < len(data):




>From 6adc3da0ab17eb7e52b47805e6999d65b043fa7f Mon Sep 17 00:00:00 2001
From: Lu Xinyu <luxy.fnst@xxxxxxxxxxxxxx>
Date: Thu, 30 Nov 2017 13:24:15 +0800
Subject: [PATCH] nfs4.0 server st_write: fix the amount of data sent in the
 testLargeData

The maximum amount of data could be writen is NFSSVC_MAXBLKSIZE. The value of NFSSVC_MAXBLKSIZE defined in the kernel is RPCSVC_MAXPLAYLOAD. If the value written exceeds NFSSVC_MAXBLKSIZE, the value is fixed as the value of NFSSVC_MAXBLKSIZE. The value of RPCSVC_MAXPAYLOAD is 1*1024*1024u and "abcdefghijklmnopq"*0x10000 exceeds it. So the previous test is bound to fail and is meaningless.

Signed-off-by: Lu Xinyu <luxy.fnst@xxxxxxxxxxxxxx>
---
 nfs4.0/servertests/st_write.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nfs4.0/servertests/st_write.py b/nfs4.0/servertests/st_write.py
index 710452e..a7dae03 100644
--- a/nfs4.0/servertests/st_write.py
+++ b/nfs4.0/servertests/st_write.py
@@ -130,7 +130,7 @@ def testLargeData(t, env):
     c = env.c1
     c.init_connection()
     fh, stateid = c.create_confirm(t.code)
-    data = "abcdefghijklmnopq" * 0x10000
+    data = "a" * 1024 * 1024
     # Write the data
     pos = 0
     while pos < len(data):
-- 
2.13.3



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux