Rod, I'm having no problems from the command line with the full read.
I fixed the caching of partial data (eliminated it).

I'll need to write a comparable function to your C tester to replicate
your problems.

Paul

On 5/19/06, Spade, Rod <[EMAIL PROTECTED]> wrote:
I don't understand the debug output, but I have attached it below.

Thanks for the help!

Rod

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Alfille
Sent: Friday, May 19, 2006 4:13 PM
To: [email protected]
Subject: Re: [Owfs-developers] RE: problem writing to DS1996

Thanks for the debugging.

Can you tell me (running --foreground --error_level=9) if a second
request is made for the next 4096 bytes?

The cache problem is clear. We'll have to suppress caching of partial
reads.

Paul

On 5/19/06, Spade, Rod <[EMAIL PROTECTED]> wrote:
> It appears that the write problem has been fixed.  However, I am now
> having problems with reading.
>
> I wrote a very simple C program that just does open, lseek, read,
close.
> If I attempt to read more than 4096 bytes from a DS1996 (with a single
> call to "read"), it fails with errno EINVAL.
>
> Also, if I read 10 bytes from offset 0, then try to read 20 bytes from
> offset 0, "read" returns 10, indicating that it read only 10 bytes.
If
> I wait for the cache to time out, or use "uncached", I don't
experience
> this problem.  I suspect that when reading from cache, the operation
> terminates when it gets to a byte that is not cached, rather than
> fetching the missing data from the device.

====================================

[EMAIL PROTECTED] ~]# owfs --foreground --error_level=9 -d /dev/ttyS0
/mnt/1wire
CONNECT: fuse mount point: /mnt/1wire
   CALL: PARSENAME path=[]
unique: 1, opcode: INIT (26), nodeid: 0, insize: 48
INIT: 7.5
   INIT: 7.5
   unique: 1, error: 0 (Success), outsize: 40
unique: 2, opcode: LOOKUP (1), nodeid: 1, insize: 49
LOOKUP /uncached
   CALL: FSTAT path=/uncached
   CALL: PARSENAME path=[/uncached]
   CALL: ATTRIBUTES path=/uncached
   NODEID: 2
   unique: 2, error: 0 (Success), outsize: 136
unique: 3, opcode: OPENDIR (27), nodeid: 2, insize: 48
   unique: 3, error: 0 (Success), outsize: 32
unique: 4, opcode: READDIR (28), nodeid: 2, insize: 64
   CALL: GETDIR path=/uncached
   CALL: PARSENAME path=[/uncached]
   CALL: DIRECTORY path=/uncached
  DEBUG: Start of directory path=/uncached device=00 00 00 00 00 00 00
00
  DEBUG: Selecting a path (and device) path=/uncached SN=00 00 00 00 00
00 00 00 last path=01 00 00 00 00 00 00 00
  DEBUG: Clearing root branch
  DEBUG: DS9097U_next_both SN found: 0C 2D 54 10 00 00 00 4B
  DEBUG: BUS_next return = 0 0C 2D 54 10 00 00 00 4B
  DEBUG: Selecting a path (and device) path=/uncached SN=0C 2D 54 10 00
00 00 4B last path=00 00 00 00 00 00 00 00
  DEBUG: DS9097U_next_both SN found: 2D 8C 7E 20 00 00 00 FF
  DEBUG: BUS_next return = 0 2D 8C 7E 20 00 00 00 FF
  DEBUG: Selecting a path (and device) path=/uncached SN=2D 8C 7E 20 00
00 00 FF last path=00 00 00 00 00 00 00 00
  DEBUG: BUS_next return = -19 2D 8C 7E 20 00 00 00 FF
  DEBUG: Add to cache sn 00 00 00 00 00 00 00 00 in=0x804bb90 index=0
size=16
   unique: 4, error: 0 (Success), outsize: 336
unique: 5, opcode: READDIR (28), nodeid: 2, insize: 64
   unique: 5, error: 0 (Success), outsize: 16
unique: 6, opcode: RELEASEDIR (29), nodeid: 2, insize: 56
   unique: 6, error: 0 (Success), outsize: 16
unique: 7, opcode: LOOKUP (1), nodeid: 2, insize: 56
LOOKUP /uncached/0C.2D5410000000
   CALL: FSTAT path=/uncached/0C.2D5410000000
   CALL: PARSENAME path=[/uncached/0C.2D5410000000]
  DEBUG: Get from cache sn 0C 2D 54 10 00 00 00 4B in=(nil) index=-1
size=1073793184
  DEBUG: Not found in cache
 DETAIL: Checking presence of /uncached/0C.2D5410000000
  DEBUG: Selecting a path (and device) path=/uncached/0C.2D5410000000
SN=0C 2D 54 10 00 00 00 4B last path=00 00 00 00 00 00 00 00
  DEBUG: Add to cache sn 0C 2D 54 10 00 00 00 4B in=(nil) index=-1
size=4
   CALL: ATTRIBUTES path=/uncached/0C.2D5410000000
   NODEID: 3
   unique: 7, error: 0 (Success), outsize: 136
unique: 8, opcode: LOOKUP (1), nodeid: 1, insize: 49
LOOKUP /uncached
   CALL: FSTAT path=/uncached
   CALL: PARSENAME path=[/uncached]
   CALL: ATTRIBUTES path=/uncached
   NODEID: 2
   unique: 8, error: 0 (Success), outsize: 136
unique: 9, opcode: LOOKUP (1), nodeid: 2, insize: 56
LOOKUP /uncached/0C.2D5410000000
   CALL: FSTAT path=/uncached/0C.2D5410000000
   CALL: PARSENAME path=[/uncached/0C.2D5410000000]
  DEBUG: Get from cache sn 0C 2D 54 10 00 00 00 4B in=(nil) index=-1
size=1075570048
  DEBUG: Found in cache
   CALL: ATTRIBUTES path=/uncached/0C.2D5410000000
   NODEID: 3
   unique: 9, error: 0 (Success), outsize: 136
unique: 10, opcode: LOOKUP (1), nodeid: 3, insize: 47
LOOKUP /uncached/0C.2D5410000000/memory
   CALL: FSTAT path=/uncached/0C.2D5410000000/memory
   CALL: PARSENAME path=[/uncached/0C.2D5410000000/memory]
  DEBUG: Get from cache sn 0C 2D 54 10 00 00 00 4B in=(nil) index=-1
size=1075570048
  DEBUG: Found in cache
   CALL: ATTRIBUTES path=/uncached/0C.2D5410000000/memory
   NODEID: 4
   unique: 10, error: 0 (Success), outsize: 136
unique: 11, opcode: OPEN (14), nodeid: 4, insize: 48
   CALL: OPEN path=/uncached/0C.2D5410000000/memory
OPEN[0] flags: 0x0
   unique: 11, error: 0 (Success), outsize: 32
unique: 12, opcode: READ (15), nodeid: 4, insize: 64
READ[0] 8192 bytes from 0
   CALL: READ path=/uncached/0C.2D5410000000/memory size=8192 offset=0
   CALL: PARSENAME path=[/uncached/0C.2D5410000000/memory]
  DEBUG: Get from cache sn 0C 2D 54 10 00 00 00 4B in=(nil) index=-1
size=1075570048
  DEBUG: Found in cache
  DEBUG: READ_POSTPARSE /uncached/0C.2D5410000000/memory
   CALL: FS_parse_read: format=6 s=8192 offset=0
  DEBUG: Selecting a path (and device)
path=/uncached/0C.2D5410000000/memory SN=0C 2D 54 10 00 00 00 4B last
path=00 0000 00 00 00 00 00
   unique: 12, error: -22 (Invalid argument), outsize: 16
unique: 13, opcode: FLUSH (25), nodeid: 4, insize: 56
FLUSH[0]
   unique: 13, error: -38 (Function not implemented), outsize: 16
unique: 14, opcode: RELEASE (18), nodeid: 4, insize: 56
RELEASE[0] flags: 0x0
   CALL: RELEASE path=/uncached/0C.2D5410000000/memory
   unique: 14, error: 0 (Success), outsize: 16
unique: 15, opcode: GETATTR (3), nodeid: 1, insize: 40
   CALL: FSTAT path=/
   CALL: PARSENAME path=[/]
   CALL: ATTRIBUTES path=/
   unique: 15, error: 0 (Success), outsize: 112
unique: 16, opcode: GETATTR (3), nodeid: 1, insize: 40
   CALL: FSTAT path=/
   CALL: PARSENAME path=[/]
   CALL: ATTRIBUTES path=/
   unique: 16, error: 0 (Success), outsize: 112
unique: 17, opcode: GETATTR (3), nodeid: 1, insize: 40
   CALL: FSTAT path=/
   CALL: PARSENAME path=[/]
   CALL: ATTRIBUTES path=/
   unique: 17, error: 0 (Success), outsize: 112
unique: 18, opcode: OPENDIR (27), nodeid: 1, insize: 48
   unique: 18, error: 0 (Success), outsize: 32
unique: 19, opcode: GETATTR (3), nodeid: 1, insize: 40
   CALL: FSTAT path=/
   CALL: PARSENAME path=[/]
   CALL: ATTRIBUTES path=/
   unique: 19, error: 0 (Success), outsize: 112
unique: 20, opcode: READDIR (28), nodeid: 1, insize: 64
   CALL: GETDIR path=/
   CALL: PARSENAME path=[/]
   CALL: DIRECTORY path=/
  DEBUG: Get from cache sn 00 00 00 00 00 00 00 00 in=0x804bb90 index=0
  DEBUG: Found in cache
   unique: 20, error: 0 (Success), outsize: 368
unique: 21, opcode: RELEASEDIR (29), nodeid: 1, insize: 56
   unique: 21, error: 0 (Success), outsize: 16
unique: 22, opcode: GETATTR (3), nodeid: 1, insize: 40
   CALL: FSTAT path=/
   CALL: PARSENAME path=[/]
   CALL: ATTRIBUTES path=/
   unique: 22, error: 0 (Success), outsize: 112
unique: 23, opcode: GETATTR (3), nodeid: 1, insize: 40
   CALL: FSTAT path=/
   CALL: PARSENAME path=[/]
   CALL: ATTRIBUTES path=/
   unique: 23, error: 0 (Success), outsize: 112
unique: 24, opcode: GETATTR (3), nodeid: 1, insize: 40
   CALL: FSTAT path=/
   CALL: PARSENAME path=[/]
   CALL: ATTRIBUTES path=/
   unique: 24, error: 0 (Success), outsize: 112
unique: 25, opcode: OPENDIR (27), nodeid: 1, insize: 48
   unique: 25, error: 0 (Success), outsize: 32
unique: 26, opcode: GETATTR (3), nodeid: 1, insize: 40
   CALL: FSTAT path=/
   CALL: PARSENAME path=[/]
   CALL: ATTRIBUTES path=/
   unique: 26, error: 0 (Success), outsize: 112
unique: 27, opcode: READDIR (28), nodeid: 1, insize: 64
   CALL: GETDIR path=/
   CALL: PARSENAME path=[/]
   CALL: DIRECTORY path=/
  DEBUG: Get from cache sn 00 00 00 00 00 00 00 00 in=0x804bb90 index=0
  DEBUG: Found in cache
   unique: 27, error: 0 (Success), outsize: 368
unique: 28, opcode: READDIR (28), nodeid: 1, insize: 64
   unique: 28, error: 0 (Success), outsize: 16
unique: 29, opcode: RELEASEDIR (29), nodeid: 1, insize: 56
   unique: 29, error: 0 (Success), outsize: 16
   CALL: Starting Library cleanup
   CALL: Closing Cache
   CALL: Closing input devices
   CALL: Closing outout devices
   CALL: Finished Library cleanup
[EMAIL PROTECTED] ~]#


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to