From: David Woodhouse <dwmw2@infradead.org>
To: Jasmine Strong <jasmine@hex.linuxgrrls.org>
Cc: "Linux MTD list (E-mail)" <linux-mtd@lists.infradead.org>
Subject: Re: Stable cvs version for 2.4
Date: Wed, 04 Sep 2002 16:06:02 +0100 [thread overview]
Message-ID: <4414.1031151962@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0209041546020.22265-100000@hex.linuxgrrls.org>
jasmine@hex.linuxgrrls.org said:
> Is there nowhere that's not a pointer that you can stuff it?
struct jffs2_node_frag
{
rb_node_t rb;
struct jffs2_full_dnode *node; /* NULL for holes */
uint32_t size;
uint32_t ofs; /* Don't really need this, but optimisation */
};
Not really. 'size' and 'ofs' are within the file -- so if you open a file,
seek to 0xFFFFFFFD and write a byte, you can quite happily end up with a
hole frag with size=0xFFFFFFFD and a subsequent data frag with the same ofs.
So I can't abuse the high or low bits like I do with the physical offsets on
the flash in the jffs2_raw_node_ref.
And although I thought at the time that 'size' was an optimisation I don't
really think it is any more.
Although actually perhaps it is. Must investigate that possibility too -- no
reason why I can't assume that 'frag->size' is always equivalent to
'frag_next(frag)->ofs - frag->ofs', as long as I stick in an end-marker to
show the size of the last frag, if I can stick 0xFFFFFFFF in the 'node'
pointer to mark that or something. Or if you'd shoot me for that too I could
allocate something at boot and use _that_ address as the 'end marker' in the
knowledge that it's not ambiguous.
--
dwmw2
prev parent reply other threads:[~2002-09-04 15:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-03 10:09 Stable cvs version for 2.4 John Hall
2002-09-03 12:29 ` David Woodhouse
2002-09-04 0:18 ` David Woodhouse
2002-09-04 1:14 ` Jasmine Strong
2002-09-04 8:51 ` David Woodhouse
2002-09-04 14:21 ` Jasmine Strong
2002-09-04 14:37 ` David Woodhouse
2002-09-04 14:46 ` Allen Curtis
2002-09-04 14:54 ` Jasmine Strong
2002-09-04 15:17 ` Steve Wahl
2002-09-04 15:26 ` David Woodhouse
2002-09-04 15:20 ` David Woodhouse
2002-09-04 15:33 ` Jasmine Strong
2002-09-04 15:44 ` David Woodhouse
2002-09-04 15:50 ` Allen Curtis
2002-09-04 15:54 ` David Woodhouse
2002-09-04 14:49 ` Jasmine Strong
2002-09-04 15:06 ` David Woodhouse [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=4414.1031151962@redhat.com \
--to=dwmw2@infradead.org \
--cc=jasmine@hex.linuxgrrls.org \
--cc=linux-mtd@lists.infradead.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