9front - general discussion about 9front
 help / color / mirror / Atom feed
* Help wanted tracking down a bug in divergefs code
@ 2020-02-16  9:18 Trevor Higgins
  2020-02-17  5:59 ` [9front] " ori
  2020-02-17 15:44 ` [9front] Help wanted tracking down a bug in divergefs code kvik
  0 siblings, 2 replies; 8+ messages in thread
From: Trevor Higgins @ 2020-02-16  9:18 UTC (permalink / raw)
  To: 9front

I have been using divergefs (from the contrib directory) and everything 
looked fine. I have found a problem which I don't know how I track down 
the cause.

I was using it to rebuild the system but diverting all new files to a 
ramdisk. The problem showed up when using mkfs to make the rootfs.paq file.

I have traced through the code and ascertained why it causes an error 
but I don't know how to further debug the system as the problem may be 
started back in libdisk with the rdproto call.

When mkfs trys to rename the temporary file after coping it, it gets and 
error from the  dirfwstat call. Depending on what is the underlying FS 
serving the file the message is something like

         wstat -- attempt to change qid.type

         wstat can't convert between files and directories

The reason for this, is the the actual Dir * entry that gets passed down 
to the FS:wstat call is the entry for the parent directory   and not the 
entry for the file descriptor passed to the dirfwstat call (from mkfs).

I am not familiar enough with the mapping of QID->FID et all to sort out 
where the underlying problem occurs.

If I change the dirfwstat to a dirwstat using the file name, mkfs will 
run (very slowly) and change the file name and modes.

I am wondering if the bug is not somuch in divergefs, but in how the dir 
entries are constructed prior to calling the 9p wstat call.

Could it be stale data in the library functions or is it more likely a 
referencing error in divergefs code.

Any way, any ideas on where I can put more fprints to track down which 
bit of code is in the wrong?



-- 
We need another plan



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

end of thread, other threads:[~2020-02-20 11:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-16  9:18 Help wanted tracking down a bug in divergefs code Trevor Higgins
2020-02-17  5:59 ` [9front] " ori
2020-02-20  1:08   ` [9front] Help wanted tracking down a bug in divergefs code [Demonstration code] Trevor Higgins
2020-02-17 15:44 ` [9front] Help wanted tracking down a bug in divergefs code kvik
2020-02-17 20:03   ` raingloom
2020-02-19 23:50     ` raingloom
2020-02-20  1:25     ` [9front] Help wanted tracking down a bug in divergefs code [unionfs] Trevor Higgins
2020-02-20 11:21       ` kvik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).