From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kate-mail.whsl206.com ([49.50.249.47]) by ewsd; Sun Feb 16 04:19:20 EST 2020 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qs.co.nz; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date: Message-ID:Subject:From:To:Sender:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=C3gOVAowEDuUSV3gf0bgawQyfZmpJdfdC+UTqXW/cdM=; b=NYtMkXMiGPkGuZaKrJfKIG/QeJ 2izhrsVkdbACAixmAIKME0a3H+Anp/hKB70d1VukQ3oRaeROSayd6YHDs6YHdLLPekaJocb0sS02i M3mr5c/gukFQjb72VHLoOhcsSHX1gRXZrMs/7a9O52V7H6QjiWfrjWlZMsrMFrinaTlET8Sxd7SwY IlvBFdH2Er+WTx5MqY82tLcd0YvP/Q9NFICmK7TiwlyLLSWRzmLi7lrRmk2HusN8uNvVLoC7Zi6wN 7qCU28/is38eSgRzIQ38dZPfbXzLPKp9ZwwKqY5FcGBQCtV8Ru9ntXfjxdb4NGJuWgkspLLu3v3J+ QDBCArng==; Received: from 115-189-102-153.mobile.spark.co.nz ([115.189.102.153]:13938 helo=[192.168.43.80]) by kate.whsl206.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1j3G4I-001U6Q-0e for 9front@9front.org; Sun, 16 Feb 2020 22:18:26 +1300 To: 9front@9front.org From: Trevor Higgins Subject: Help wanted tracking down a bug in divergefs code Message-ID: Date: Sun, 16 Feb 2020 22:18:20 +1300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - kate.whsl206.com X-AntiAbuse: Original Domain - 9front.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - qs.co.nz X-Get-Message-Sender-Via: kate.whsl206.com: authenticated_id: phil@qs.co.nz X-Authenticated-Sender: kate.whsl206.com: phil@qs.co.nz X-Source: X-Source-Args: X-Source-Dir: List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: immutable markup shader XMPP blockchain-scale core strategy optimizer 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