From: David Sterba <dsterba@suse.cz>
To: Simon Tatham <anakin@pobox.com>
Cc: David Sterba <dsterba@suse.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] affs: generate OFS sequence numbers starting at 1
Date: Wed, 26 Feb 2025 15:31:48 +0100 [thread overview]
Message-ID: <20250226143148.GT5777@suse.cz> (raw)
In-Reply-To: <20250220081444.3625446-1-anakin@pobox.com>
On Thu, Feb 20, 2025 at 08:14:43AM +0000, Simon Tatham wrote:
> If I write a file to an OFS floppy image, and try to read it back on
> an emulated Amiga running Workbench 1.3, the Amiga reports a disk
> error trying to read the file. (That is, it's unable to read it _at
> all_, even to copy it to the NIL: device. It isn't a matter of getting
> the wrong data and being unable to parse the file format.)
>
> This is because the 'sequence number' field in the OFS data block
> header is supposed to be based at 1, but affs writes it based at 0.
> All three locations changed by this patch were setting the sequence
> number to a variable 'bidx' which was previously obtained by dividing
> a file position by bsize, so bidx will naturally use 0 for the first
> block. Therefore all three should add 1 to that value before writing
> it into the sequence number field.
>
> With this change, the Amiga successfully reads the file.
>
> Signed-off-by: Simon Tatham <anakin@pobox.com>
Thanks for the fixes, I'll send them for merge soon and to stable as
well as they're both real fixes. I found the sequence documented at
https://wiki.osdev.org/FFS_(Amiga) so I added the reference to the
changelog.
prev parent reply other threads:[~2025-02-26 14:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 8:14 [PATCH 1/2] affs: generate OFS sequence numbers starting at 1 Simon Tatham
2025-02-20 8:14 ` [PATCH 2/2] affs: don't write overlarge OFS data block size fields Simon Tatham
2025-02-26 14:31 ` David Sterba [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250226143148.GT5777@suse.cz \
--to=dsterba@suse.cz \
--cc=anakin@pobox.com \
--cc=dsterba@suse.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox