ref: 326343362a401c6288eac841acb9b90044b7f37f
parent: c947228f7cf50bbbeb3f1e1b1808280e9ae9247f
author: 9ferno <gophone2015@gmail.com>
date: Wed Oct 19 09:25:14 EDT 2022
for 8192 span size
--- a/9p.c
+++ b/9p.c
@@ -1406,8 +1406,8 @@
for(written = 0; written < wbufsize; ){
if(chatty9p > 1)
- dprint("writefile(): d->name %s d->size %llud offset %llud\n"
- " written %d offset+written %llud wbufsize %llud\n",
+ dprint("writefile(): d->name %s d->size %llud offset %llud"
+ " written %d offset+written %llud wbufsize %llud\n",
d->name, d->size, offset, written, offset+written, wbufsize);
/* all the below functions only write upto the end of an extent.
Hence, the need for a loop to keep repeating.
--- a/dat.h
+++ b/dat.h
@@ -17,7 +17,7 @@
Nsec = 1000ULL*1000*1000,
Usec = 1000ULL*1000,
Msec = 1000ULL,
- Iounit = 65536,
+ MAXRPC = 8192ULL,
Nbkp = 2,
KiB = 1024ULL, /* Kibibytes */
MiB = KiB*KiB, /* Mibibytes */
@@ -204,7 +204,9 @@
enum {
Blocksize = Rawblocksize - sizeof(Tag),
Namelen = (Blocksize-sizeof(Dentry1)),/* max size of file name components */
- Maxspanlen = MiB/Rawblocksize, /* in blocks */
+
+ Iounit = MAXRPC-sizeof(Tag), /* in bytes */
+ Maxspanlen = MAXRPC/Rawblocksize, /* in blocks */
Maxspansize = (Maxspanlen*Rawblocksize)-sizeof(Tag), /* in bytes */
Ndentryperblock = 1, /* Blocksize / sizeof(Dentry), */
@@ -377,7 +379,7 @@
Tind0, /* points to Tdata blocks for files or Tdentry blocks for directories. */
Tind1, /* points to Tind0 blocks */
Tind2, /* points to Tind1 blocks */
- Tind3, /* list of Tind2 blocks. we can have a 12 TiB file */
+ Tind3, /* list of Tind2 blocks. we can have a 92 GiB file */
Maxtind, /* should be Tind0+Niblock */
/* gap for more indirect block depth in future */
MAXTAG,
--- a/tests/sizes.c
+++ b/tests/sizes.c
@@ -118,7 +118,7 @@
max = maxsize();
print("maximum possible spans %llud\n", max);
print(" (%llud*Maxspansize = %llud bytes)\n", max, max*Maxspansize);
- print(" (%llud*Maxspansize = %llud bytes = %llud TiB)\n",
- max, max*Maxspansize, (max*Maxspansize)/(MiB*MiB));
+ print(" (%llud*Maxspansize = %llud bytes = %llud GiB)\n",
+ max, max*Maxspansize, (max*Maxspansize)/(GiB));
exits(0);
}
--- a/tests/test.0/blocks/0
+++ b/tests/test.0/blocks/0
@@ -1,4 +1,4 @@
Tmagic 1 1
mafs device
512
-1048564
+8180
--- a/tests/test.1/blocks/0
+++ b/tests/test.1/blocks/0
@@ -1,4 +1,4 @@
Tmagic 1 1
mafs device
512
-1048564
+8180
--- a/tests/test.2/blocks/0
+++ b/tests/test.2/blocks/0
@@ -1,4 +1,4 @@
Tmagic 1 1
mafs device
512
-1048564
+8180
--- a/tests/test.2/blocks/20
+++ /dev/null
@@ -1,1 +1,0 @@
-Tblank 0 0
--- a/tests/test.2/blocks/21
+++ /dev/null
@@ -1,1 +1,0 @@
-Tblank 0 0
--- a/tests/test.2/blocks/22
+++ /dev/null
@@ -1,1 +1,0 @@
-Tblank 0 0
--- a/tests/test.3/blocks/0
+++ b/tests/test.3/blocks/0
@@ -1,4 +1,4 @@
Tmagic 1 1
mafs device
512
-1048564
+8180
--- a/tests/test.4/blocks/0
+++ b/tests/test.4/blocks/0
@@ -1,4 +1,4 @@
Tmagic 1 1
mafs device
512
-1048564
+8180
--- a/tests/test.5/blocks/0
+++ b/tests/test.5/blocks/0
@@ -1,4 +1,4 @@
Tmagic 1 1
mafs device
512
-1048564
+8180
--- a/tests/test.6/blocks/0
+++ b/tests/test.6/blocks/0
@@ -1,4 +1,4 @@
Tmagic 1 1
mafs device
512
-1048564
+8180
--- a/tests/test.7/blocks/0
+++ b/tests/test.7/blocks/0
@@ -1,4 +1,4 @@
Tmagic 1 1
mafs device
512
-1048564
+8180
--- a/tests/test.8/blocks/0
+++ b/tests/test.8/blocks/0
@@ -1,4 +1,4 @@
Tmagic 1 1
mafs device
512
-1048564
+8180
--- a/tests/test.9/blocks/0
+++ b/tests/test.9/blocks/0
@@ -1,4 +1,4 @@
Tmagic 1 1
mafs device
512
-1048564
+8180
--- a/tests/test.b/blocks/0
+++ b/tests/test.b/blocks/0
@@ -1,4 +1,4 @@
Tmagic 1 1
mafs device
512
-1048564
+8180
--- a/tests/test.d/blocks/0
+++ b/tests/test.d/blocks/0
@@ -1,4 +1,4 @@
Tmagic 1 1
mafs device
512
-1048564
+8180