Linux PARISC architecture development
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Helge Deller <deller@gmx.de>, linux-parisc@vger.kernel.org
Subject: Re: palo not working on ext2/ext3 partitions
Date: Mon, 01 Jul 2019 14:41:41 -0700	[thread overview]
Message-ID: <1562017301.2762.21.camel@HansenPartnership.com> (raw)
In-Reply-To: <1562016779.2762.19.camel@HansenPartnership.com>

On Mon, 2019-07-01 at 14:32 -0700, James Bottomley wrote:
[...]
> Empirically, I've found that as long as the badblocks don't include
> any block from 0-250 ext2/3 seems to be happy creating a valid
> filesystem.  Unfortunately with the label being 64k (so even if the
> palo partition is first it starts at an offset of 64k) and our
> alignment being on 256k  absolute, we usually end up starting the
> badblocks at around block 224.

Based on this observation, this fixes palo for me ... at least I can
create and check a palo ext2 partition after this.

James

---

diff --git a/palo/palo.c b/palo/palo.c
index 68b85cf..ce36612 100644
--- a/palo/palo.c
+++ b/palo/palo.c
@@ -443,8 +443,9 @@ do_cdrom(int media, int kernel32, int kernel64,
 #define EXT2_HOLE	((MAXBLSIZE + 1) / EXT2_BLOCKSIZE)
 
 /* offset in bytes before start of hole,  ext2 doesn't allow holes at
- * to cover the first four blocks of the filesystem */
-#define EXT2_OFFSET	(4*EXT2_BLOCKSIZE)
+ * to cover the first four blocks of the filesystem
+ * FIXME: a problem in mke2fs doesn't allow bad block under 250 */
+#define EXT2_OFFSET	(251*EXT2_BLOCKSIZE)
 
 int
 do_formatted(int init, int media, const char *medianame, int partition,

      reply	other threads:[~2019-07-01 21:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 19:54 palo not working on ext2/ext3 partitions James Bottomley
2019-07-01 20:05 ` Helge Deller
2019-07-01 21:32   ` James Bottomley
2019-07-01 21:41     ` James Bottomley [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=1562017301.2762.21.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=deller@gmx.de \
    --cc=linux-parisc@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